template error?

#71
by osos49 - opened

I have been testing the new qwen3.8 27b q4 - q8 (unsloth version) but with your template.

Run a tool-eval-bench for all the quants.

Noticed this is llama.cpp logs on some tests:

llama-server | 2026-08-14T22:38:04.340105932Z [41237] parse: error parsing grammar: expecting newline or end at ::= | " " | "\n"{1,2} [ \t]{0,20}
llama-server | 2026-08-14T22:38:04.340123068Z [41237]
llama-server | 2026-08-14T22:38:04.340124348Z [41237]
llama-server | 2026-08-14T22:38:04.340125452Z [41237] root ::=
llama-server | 2026-08-14T22:38:04.340126588Z [41237] space ::= | " " | "\n"{1,2} [ \t]{0,20}

Could it be template related?

No, this is not related to the chat template.

That error comes from llama-server itself when it tries to parse GBNF grammars. When you run tool-eval-bench, the benchmark passes JSON tool schemas in its requests. llama-server tries to convert those schemas into sampling grammar rules, and when a schema has certain optional fields, llama-server accidentally generates invalid grammar syntax (the leading pipe in space ::= | " ").

Chat templates only format prompt text and have no control over llama-server's internal grammar converter.

To resolve it, grab a recent pre-built release of llama.cpp, as newer builds have fixes for schema-to-grammar conversion. You can also check if tool-eval-bench has an option to disable grammar constraints and evaluate raw tool outputs instead.

froggeric changed discussion status to closed

Ahh... thank you for the enlightenment... and thank you for your chat template.

Sign up or log in to comment