Skip to content

Commit 7f4d94e

Browse files
committed
Sync llama-vocab code 20250401
1 parent 83e53f0 commit 7f4d94e

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

llama_cpp/llama_cpp.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,8 @@
239239
# LLAMA_VOCAB_PRE_TYPE_DEEPSEEK3_LLM = 28,
240240
# LLAMA_VOCAB_PRE_TYPE_GPT4O = 29,
241241
# LLAMA_VOCAB_PRE_TYPE_SUPERBPE = 30,
242+
# LLAMA_VOCAB_PRE_TYPE_TRILLION = 31,
243+
# LLAMA_VOCAB_PRE_TYPE_BAILINGMOE = 32,
242244
# };
243245
LLAMA_VOCAB_PRE_TYPE_DEFAULT = 0
244246
LLAMA_VOCAB_PRE_TYPE_LLAMA3 = 1
@@ -271,6 +273,8 @@
271273
LLAMA_VOCAB_PRE_TYPE_DEEPSEEK3_LLM = 28
272274
LLAMA_VOCAB_PRE_TYPE_GPT4O = 29
273275
LLAMA_VOCAB_PRE_TYPE_SUPERBPE = 30
276+
LLAMA_VOCAB_PRE_TYPE_TRILLION = 31
277+
LLAMA_VOCAB_PRE_TYPE_BAILINGMOE = 32
274278

275279

276280
# // note: these values should be synchronized with ggml_rope
@@ -3906,6 +3910,10 @@ def llama_sampler_init_mirostat_v2(
39063910
...
39073911

39083912

3913+
# /// @details Intializes a GBNF grammar, see grammars/README.md for details.
3914+
# /// @param vocab The vocabulary that this grammar will be used with.
3915+
# /// @param grammar_str The production rules for the grammar, encoded as a string. Returns an empty grammar if empty. Returns NULL if parsing of grammar_str fails.
3916+
# /// @param grammar_root The name of the start symbol for the grammar.
39093917
# LLAMA_API struct llama_sampler * llama_sampler_init_grammar(
39103918
# const struct llama_vocab * vocab,
39113919
# const char * grammar_str,

0 commit comments

Comments
 (0)