You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The problem happens because the string definition in the JSON grammar doesn't exclude emitting raw \n, \r, etc. A model can thus produce a string split into multiple lines, which is not valid JSON.
File llama_cpp/llama_grammar.py needs the string grammar definition fixed in several places:
At the JSON_GBNF definition and others that have a string rule, like JSON_ARR_GBNF, etc.
At the string definition inside PRIMITIVE_RULES.
It's a single line change in the above PR.
Regards
The text was updated successfully, but these errors were encountered:
This llama.cpp PR fixed a random problem that I've observed in the past but never been able to reproduce:
ggerganov/llama.cpp#5888
The problem happens because the string definition in the JSON grammar doesn't exclude emitting raw \n, \r, etc. A model can thus produce a string split into multiple lines, which is not valid JSON.
File llama_cpp/llama_grammar.py needs the string grammar definition fixed in several places:
It's a single line change in the above PR.
Regards
The text was updated successfully, but these errors were encountered: