Replies: 1 comment 2 replies
-
Grammar has worked correctly so far for me. Here's an example GBNF file: https://github.com/ggerganov/llama.cpp/blob/master/grammars/chess.gbnf try pasting that into the webui, then generating? |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello! ^^
I've been playing with the api endpoints (in
particular api/v1/generate
) and I noticed that no matter what I do, it seems that koboldcpp inserts escapes before backslashes, even if the string sent already does all the escaping.To illustrate, my payload is:
However, when I run koboldcpp, it claims that the grammar was:
That exact same grammar, when supplied through the webui looks like this:
Note the lack of double escapes.
I'm not sure how stable grammar support is but I did my best to verify that what's posted to the api endpoint has single escapes. I was going to open an issue about it but I thought I'd ask here first (as I imagine I could simply be overlooking something). Am I doing something obviously wrong? Or maybe that's just not what grammars expect as inputs?
Beta Was this translation helpful? Give feedback.
All reactions