failed to parse grammar with llama.cpp on master

#4
by nervousapps - opened

When running llama-server with these args :

./build/bin/llama-server -m ../models/Qwopus3.6-27B-Coder-Compat-MTP-Q8_0.gguf --host 0.0.0.0 --port 11435 --mlock --cache-type-k q8_0 --cache-type-v q8_0 --flash-attn on -b 4096 -ub 2048 --no-webui --offline -c 262144 --ctx-checkpoints 32 --keep -1 --split-mode tensor -np 1 --log-verbosity 4 --jinja --no-mmap --kv-unified --spec-type draft-mtp --spec-draft-type-v q8_0 --spec-draft-type-k q8_0 --spec-draft-n-max 4 --mmproj ../models/mmproj-F32-QW36compat.gguf

I got this error :

2.44.107.624 I srv get_availabl: prompt cache update took 1.00 ms
parse: error parsing grammar: unknown escape at \w-]+) """
tool-RemoteTrigger-schema-trigger-id-kv ::= ""trigger_id"" space ":" space tool-RemoteTrigger-schema-trigger-id
.
.
.
tool-memory-update-schema-memory-id-kv ::= ""memory_id"" space ":" space string
tool-memory-update-schema-new-content-kv ::= ""new_content"" space ":" space string
tool-memory-update-schema-reason-kv ::= ""reason"" space ":" space string
value ::= object | array | string | number | boolean | null

2.43.628.098 E failed to parse grammar
2.43.628.603 E srv send_error: task id = 11, error: Failed to initialize samplers: failed to parse grammar
2.43.628.618 E srv process_sing: failed to launch slot with task, id_task = 11
2.43.628.768 W srv stop: cancel task, id_task = 11

Any thoughts about what is happening? Template needs to be defined?

Hello @nervousapps , I had the same error with the sampler initializing, but I've found this chat template version: https://huggingface.co/froggeric/Qwen-Fixed-Chat-Templates, then I put it in the launch command like that:

./build/bin/llama-server \
     --model /home/linukso1d/LLM/models/MTP/Qwopus3.6-27B-Coder-Compat-MTP-Q5_K_M.gguf \
     --jinja --chat-template-file /home/linukso1d/LLM/models/MTP/chat_template.jinja \
...

So the connected Claude code doesn't crash anymore, tool call is working, try it out, maybe it will help

I had the same error with the sampler initializing, but I've found this chat template version: https://huggingface.co/froggeric/Qwen-Fixed-Chat-Templates, then I put it in the launch command like that:
@Linukso1D

without this template pi tool call also not work

Sign up or log in to comment