Replies: 1 comment 2 replies
-
After sampling the token, make sure to call |
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.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi I'm trying to add json grammar to my llama sampler. But have been struggling for a bit. I've been following this example:
https://github.com/ggerganov/llama.cpp/blob/master/examples/llama.android/llama/src/main/cpp/llama-android.cpp#L319C5-L319C28
And using this function in the library: https://github.com/ggerganov/llama.cpp/blob/53ff6b9b9fb25ed0ec0a213e05534fe7c3d0040f/include/llama.h#L1159
And by following some of the source code for llama-cli, this is what I came up with:
However all my model generates is the opening brace "{" , repeatedly. Am I doing this correctly, can anyone help point out whats wrong?
Also do I need the greedy sampler, it seems to crash without it. https://github.com/ggerganov/llama.cpp/blob/53ff6b9b9fb25ed0ec0a213e05534fe7c3d0040f/include/llama.h#L1037
Beta Was this translation helpful? Give feedback.
All reactions