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
-
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:
llama.cpp/include/llama.h
Line 1159 in 53ff6b9
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.
llama.cpp/include/llama.h
Line 1037 in 53ff6b9
Beta Was this translation helpful? Give feedback.
All reactions