diff options
author | Aleksey Nikiforov <lexn82@gmail.com> | 2025-07-14 12:43:52 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-07-14 18:43:52 +0200 |
commit | f5353047ef461e6fc9d527e09a06c9802c699929 (patch) | |
tree | 206c8c56efd3dcac1e39655e73788affe6c02832 /src/llama.cpp | |
parent | 255c22046bcaef41850125be924f3e42e2a65571 (diff) |
Ported kimi-k2 support from llama.cpp (#609)
Original patch by @gabriellarson:
https://github.com/ggml-org/llama.cpp/pull/14654
Co-authored-by: anikifoss <anikifoss>
Diffstat (limited to 'src/llama.cpp')
-rw-r--r-- | src/llama.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/llama.cpp b/src/llama.cpp index 5777689e..ac02abf6 100644 --- a/src/llama.cpp +++ b/src/llama.cpp @@ -116,7 +116,7 @@ // bump if necessary #define LLAMA_MAX_LAYERS 512 -#define LLAMA_MAX_EXPERTS 256 // DeepSeekV2 +#define LLAMA_MAX_EXPERTS 384 // Kimi-K2 // // helpers @@ -6402,6 +6402,10 @@ static void llm_load_vocab( tokenizer_pre == "hunyuan") { vocab.type_pre = LLAMA_VOCAB_PRE_TYPE_HUNYUAN; vocab.tokenizer_clean_spaces = false; + } else if ( + tokenizer_pre == "kimi-k2") { + vocab.type_pre = LLAMA_VOCAB_PRE_TYPE_KIMI_K2; + vocab.tokenizer_clean_spaces = false; } else { throw std::runtime_error(format("unknown pre-tokenizer type: '%s'", tokenizer_pre.c_str())); } |