Failed to initialize samplers: failed to parse grammar.

#2
by Exostyle81 - opened

image

llama-server.exe -m F:\IQ3_S\MiniMax-M3-IQ3_S-00001-of-00005.gguf --ctx-size 100000 --threads 16 --host 127.0.0.1 --no-mmap --jinja --fit on --flash-attn on --device CUDA0,Vulkan1,Vulkan2 -lv 4 --parallel 1

12.07.334.676 E failed to parse grammar
12.07.336.405 E srv send_error: task id = 0, error: Failed to initialize samplers: failed to parse grammar
12.07.336.415 E srv process_sing: failed to launch slot with task, id_task = 0
12.07.336.439 I srv update_slots: all slots are idle
12.07.336.625 W srv stop: cancel task, id_task = 0
12.07.336.652 I srv update_slots: all slots are idle
12.38.117.117 I srv server_strea: conv_id=43014fd5-8f16-4bc2-9c4b-d006ea8cb42b (empty=0)
12.38.124.004 I srv operator(): chat format: peg-native
12.38.124.949 I slot get_availabl: id 0 | task -1 | selected slot by LRU, t_last = -1
12.38.124.955 I srv get_availabl: updating prompt cache
12.38.124.961 I srv load: - looking for better prompt, base f_keep = -1.000, sim = 0.000
12.38.124.964 I srv update: - cache state: 0 prompts, 0.000 MiB (limits: 8192.000 MiB, 100096 tokens, 8589934592 est)
12.38.124.966 I srv get_availabl: prompt cache update took 0.01 ms
parse: error parsing grammar: expecting newline or end at ::= [^"\\x7F\x00-\x1F] | [\] (["\bfnrt] | "u" [0-9a-fA-F]{4})
decimal-part ::= [0-9]{1,16}
integral-part ::= [0] | [1-9] [0-9]{0,15}
json-array ::= "[" space ("]" | json-value (space "," space json-value)* space "]")
json-bool ::= "true" | "false"
json-null ::= "null"
json-number ::= "-"? ("0" | [1-9] [0-9]) ("." [0-9]+)? (("e" | "E") [+-]? [0-9]+)?
json-object ::= "{" space ("}" | json-string space ":" space json-value (space "," space json-string space ":" space json-value)
space "}")
json-string ::= """ ( [^"\] | "\" ( ["\/ bfnrt] | "u" [0-9a-fA-F]{4} ) )* """
json-value ::= json-object | json-array | json-string | json-number | json-bool | json-null
number ::= ("-"? integral-part) ("." decimal-part)? ([eE] [-+]? integral-part)?
root ::= tool-call | tool-calls
space ::= | " " | "\n"{1,2} [ \t]{0,20}
string ::= """ char* """
tool-call ::= "[\n]" space (tool-web-search-exa | tool-web-fetch-exa) space "" (space "[\n]" space (tool-web-search-exa | tool-web-fetch-exa) space "")* space
tool-calls ::= "<]minimax[>" space tool-call space
tool-web-fetch-exa ::= ("<]minimax[>[<invoke name="" "web_fetch_exa" "">]") space tool-web-fetch-exa-arg-urls (space (tool-web-fetch-exa-arg-maxCharacters))* space
tool-web-fetch-exa-arg-maxCharacters ::= ("[<" "maxCharacters" ">") "" number ""
tool-web-fetch-exa-arg-urls ::= ("[<" "urls" ">") "" tool-web-fetch-exa-arg-urls-schema ""
tool-web-fetch-exa-arg-urls-schema ::= "[" space (string ("," space string))? space "]"
tool-web-search-exa ::= ("<]minimax[>[<invoke name="" "web_search_exa" "">]") space tool-web-search-exa-arg-query (space (tool-web-search-exa-arg-numResults))
space
tool-web-search-exa-arg-numResults ::= ("[<" "numResults" ">") "" number ""
tool-web-search-exa-arg-query ::= ("[<" "query" ">") "" ac-33
until-13 ::= |
until-suffix ::= until-13

ac-33 ::= |
char ::= [^"\\x7F\x00-\x1F] | [\] (["\bfnrt] | "u" [0-9a-fA-F]{4})
decimal-part ::= [0-9]{1,16}
integral-part ::= [0] | [1-9] [0-9]{0,15}
json-array ::= "[" space ("]" | json-value (space "," space json-value)* space "]")
json-bool ::= "true" | "false"
json-null ::= "null"
json-number ::= "-"? ("0" | [1-9] [0-9]) ("." [0-9]+)? (("e" | "E") [+-]? [0-9]+)?
json-object ::= "{" space ("}" | json-string space ":" space json-value (space "," space json-string space ":" space json-value)
space "}")
json-string ::= """ ( [^"\] | "\" ( ["\/ bfnrt] | "u" [0-9a-fA-F]{4} ) )* """
json-value ::= json-object | json-array | json-string | json-number | json-bool | json-null
number ::= ("-"? integral-part) ("." decimal-part)? ([eE] [-+]? integral-part)?
root ::= tool-call | tool-calls
space ::= | " " | "\n"{1,2} [ \t]{0,20}
string ::= """ char* """
tool-call ::= "[\n]" space (tool-web-search-exa | tool-web-fetch-exa) space "" (space "[\n]" space (tool-web-search-exa | tool-web-fetch-exa) space "")* space
tool-calls ::= "<]minimax[>" space tool-call space
tool-web-fetch-exa ::= ("<]minimax[>[<invoke name="" "web_fetch_exa" "">]") space tool-web-fetch-exa-arg-urls (space (tool-web-fetch-exa-arg-maxCharacters))* space
tool-web-fetch-exa-arg-maxCharacters ::= ("[<" "maxCharacters" ">") "" number ""
tool-web-fetch-exa-arg-urls ::= ("[<" "urls" ">") "" tool-web-fetch-exa-arg-urls-schema ""
tool-web-fetch-exa-arg-urls-schema ::= "[" space (string ("," space string))? space "]"
tool-web-search-exa ::= ("<]minimax[>[<invoke name="" "web_search_exa" "">]") space tool-web-search-exa-arg-query (space (tool-web-search-exa-arg-numResults))
space
tool-web-search-exa-arg-numResults ::= ("[<" "numResults" ">") "" number ""
tool-web-search-exa-arg-query ::= ("[<" "query" ">") "" ac-33
until-13 ::= |
until-suffix ::= until-13

12.38.126.127 E failed to parse grammar
12.38.126.150 E srv send_error: task id = 2, error: Failed to initialize samplers: failed to parse grammar
12.38.126.157 E srv process_sing: failed to launch slot with task, id_task = 2
12.38.126.168 W srv stop: cancel task, id_task = 2
12.38.126.170 I srv update_slots: all slots are idle
12.38.126.177 I srv update_slots: all slots are idle
13.26.581.394 I srv server_strea: conv_id=a1053ac5-67ff-447a-8a91-f70a331cea68 (empty=0)
13.26.588.451 I srv operator(): chat format: peg-native
13.26.589.384 I slot get_availabl: id 0 | task -1 | selected slot by LRU, t_last = -1
13.26.589.390 I srv get_availabl: updating prompt cache
13.26.589.395 I srv load: - looking for better prompt, base f_keep = -1.000, sim = 0.000
13.26.589.401 I srv update: - cache state: 0 prompts, 0.000 MiB (limits: 8192.000 MiB, 100096 tokens, 8589934592 est)
13.26.589.403 I srv get_availabl: prompt cache update took 0.01 ms
parse: error parsing grammar: expecting newline or end at ::= [^"\\x7F\x00-\x1F] | [\] (["\bfnrt] | "u" [0-9a-fA-F]{4})
decimal-part ::= [0-9]{1,16}
integral-part ::= [0] | [1-9] [0-9]{0,15}
json-array ::= "[" space ("]" | json-value (space "," space json-value)* space "]")
json-bool ::= "true" | "false"
json-null ::= "null"
json-number ::= "-"? ("0" | [1-9] [0-9]) ("." [0-9]+)? (("e" | "E") [+-]? [0-9]+)?
json-object ::= "{" space ("}" | json-string space ":" space json-value (space "," space json-string space ":" space json-value)
space "}")
json-string ::= """ ( [^"\] | "\" ( ["\/ bfnrt] | "u" [0-9a-fA-F]{4} ) )* """
json-value ::= json-object | json-array | json-string | json-number | json-bool | json-null
number ::= ("-"? integral-part) ("." decimal-part)? ([eE] [-+]? integral-part)?
root ::= tool-call | tool-calls
space ::= | " " | "\n"{1,2} [ \t]{0,20}
string ::= """ char* """
tool-call ::= "[\n]" space (tool-web-search-exa | tool-web-fetch-exa) space "" (space "[\n]" space (tool-web-search-exa | tool-web-fetch-exa) space "")* space
tool-calls ::= "<]minimax[>" space tool-call space
tool-web-fetch-exa ::= ("<]minimax[>[<invoke name="" "web_fetch_exa" "">]") space tool-web-fetch-exa-arg-urls (space (tool-web-fetch-exa-arg-maxCharacters))* space
tool-web-fetch-exa-arg-maxCharacters ::= ("[<" "maxCharacters" ">") "" number ""
tool-web-fetch-exa-arg-urls ::= ("[<" "urls" ">") "" tool-web-fetch-exa-arg-urls-schema ""
tool-web-fetch-exa-arg-urls-schema ::= "[" space (string ("," space string))? space "]"
tool-web-search-exa ::= ("<]minimax[>[<invoke name="" "web_search_exa" "">]") space tool-web-search-exa-arg-query (space (tool-web-search-exa-arg-numResults))
space
tool-web-search-exa-arg-numResults ::= ("[<" "numResults" ">") "" number ""
tool-web-search-exa-arg-query ::= ("[<" "query" ">") "" ac-33
until-13 ::= |
until-suffix ::= until-13

ac-33 ::= |
char ::= [^"\\x7F\x00-\x1F] | [\] (["\bfnrt] | "u" [0-9a-fA-F]{4})
decimal-part ::= [0-9]{1,16}
integral-part ::= [0] | [1-9] [0-9]{0,15}
json-array ::= "[" space ("]" | json-value (space "," space json-value)* space "]")
json-bool ::= "true" | "false"
json-null ::= "null"
json-number ::= "-"? ("0" | [1-9] [0-9]) ("." [0-9]+)? (("e" | "E") [+-]? [0-9]+)?
json-object ::= "{" space ("}" | json-string space ":" space json-value (space "," space json-string space ":" space json-value)
space "}")
json-string ::= """ ( [^"\] | "\" ( ["\/ bfnrt] | "u" [0-9a-fA-F]{4} ) )* """
json-value ::= json-object | json-array | json-string | json-number | json-bool | json-null
number ::= ("-"? integral-part) ("." decimal-part)? ([eE] [-+]? integral-part)?
root ::= tool-call | tool-calls
space ::= | " " | "\n"{1,2} [ \t]{0,20}
string ::= """ char* """
tool-call ::= "[\n]" space (tool-web-search-exa | tool-web-fetch-exa) space "" (space "[\n]" space (tool-web-search-exa | tool-web-fetch-exa) space "")* space
tool-calls ::= "<]minimax[>" space tool-call space
tool-web-fetch-exa ::= ("<]minimax[>[<invoke name="" "web_fetch_exa" "">]") space tool-web-fetch-exa-arg-urls (space (tool-web-fetch-exa-arg-maxCharacters))* space
tool-web-fetch-exa-arg-maxCharacters ::= ("[<" "maxCharacters" ">") "" number ""
tool-web-fetch-exa-arg-urls ::= ("[<" "urls" ">") "" tool-web-fetch-exa-arg-urls-schema ""
tool-web-fetch-exa-arg-urls-schema ::= "[" space (string ("," space string))? space "]"
tool-web-search-exa ::= ("<]minimax[>[<invoke name="" "web_search_exa" "">]") space tool-web-search-exa-arg-query (space (tool-web-search-exa-arg-numResults))
space
tool-web-search-exa-arg-numResults ::= ("[<" "numResults" ">") "" number ""
tool-web-search-exa-arg-query ::= ("[<" "query" ">") "" ac-33
until-13 ::= |
until-suffix ::= until-13

13.26.592.687 E failed to parse grammar
13.26.592.709 E srv send_error: task id = 4, error: Failed to initialize samplers: failed to parse grammar
13.26.592.714 E srv process_sing: failed to launch slot with task, id_task = 4
13.26.592.724 W srv stop: cancel task, id_task = 4
13.26.592.726 I srv update_slots: all slots are idle
13.26.592.734 I srv update_slots: all slots are idle

I'm getting the same errors.

I'll poke a couple of the parser maintainers and see if they've got an idea.

Brought that error up to @pwilkin / @aldehir , I think they'll look into it (~tomorrow).

Weirdly I’m not experiencing this with the Q5_K_M quant. Latest build of llama.cpp.

./llama-server -m ~/models/MinimaxM3/Minimax-M3-Q5_K_M-00001-of-00008.gguf —fit on -t 12 —jinja -c 50000 —keep -1 -lv 4

Tested with mmproj as well and works fine.

IMG_6090

It looks like the issue is related to the tools in the chat template, so if you're using just a normal chat completions UI without tools then it's not erroring.

Ah, ya I want to use this model mainly with coding harnesses, so claude code cli, but even opewebui I would imagine will need tool calling for web search, so any way we can get this fixed?

It's going to have to wait for an upstream fix from alde or pwilkin. The parser in lcpp is the issue so the quants themselves shouldn't need updating I think.

ggerganov fixed the issue in PR #26210

Testing

now it works but yeah... very slow VS old implementation. 24tokens/sec VS 59tokens/sec (old unsloth before the real implementation

Ya I noticed it was slower then I anticipated as well.

Sign up or log in to comment