Open
Description
Name and Version
with official-complied ollama 0.6.6 (dont know exact version of llama.cpp)
Operating systems
Windows
GGML backends
CUDA
Hardware
11th Gen Intel(R) Core(TM) i7-11800H
NVIDIA GeForce RTX 3050 Laptop
Models
deepseek-ai/DeepSeek-R1-Distill-Llama-8B
Problem description & steps to reproduce
(created an issue in ollama project, they pointed out that the regex part came from this project)
reges express \s and \S will not be transfered correctly
also, it cracks when got (?:ExpA|ExpB) Regex Expression
First Bad Commit
No response
Relevant log output
**All following output comes from ollama**
\S expression:
parse: error parsing grammar: unknown escape at \S\s]* "\n</think>\n") "\"" space
space ::= | " " | "\n"{1,2} [ \t]{0,20}
root ::= "\"" ("<think>\n" [\S\s]* "\n<\/think>\n") "\"" space
space ::= | " " | "\n"{1,2} [ \t]{0,20}
llama_grammar_init_impl: failed to parse grammar
(?:ExpA|ExpB) got simple in console and ended ollama