Skip to content

Commit 996c578

Browse files
committed
fixed merge conflicts
Signed-off-by: ryan-mangeno <[email protected]>
1 parent ea265fe commit 996c578

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

include/llama.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,8 @@ extern "C" {
117117
LLAMA_VOCAB_PRE_TYPE_LLAMA4 = 33,
118118
LLAMA_VOCAB_PRE_TYPE_PIXTRAL = 34,
119119
LLAMA_VOCAB_PRE_TYPE_SEED_CODER = 35,
120-
LLAMA_VOCAB_PRE_TYPE_SMOLDOCLING = 36,
120+
LLAMA_VOCAB_PRE_TYPE_HUNYUAN = 36,
121+
LLAMA_VOCAB_PRE_TYPE_SMOLDOCLING = 37,
121122
};
122123

123124
enum llama_rope_type {

src/llama-vocab.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -351,6 +351,7 @@ struct llm_tokenizer_bpe : llm_tokenizer {
351351
break;
352352
case LLAMA_VOCAB_PRE_TYPE_STABLELM2:
353353
case LLAMA_VOCAB_PRE_TYPE_QWEN2:
354+
case LLAMA_VOCAB_PRE_TYPE_HUNYUAN:
354355
regex_exprs = {
355356
// original regex from tokenizer.json
356357
// "(?i:'s|'t|'re|'ve|'m|'ll|'d)|[^\\r\\n\\p{L}\\p{N}]?\\p{L}+|\\p{N}| ?[^\\s\\p{L}\\p{N}]+[\\r\\n]*|\\s*[\\r\\n]+|\\s+(?!\\S)|\\s+"
@@ -1663,6 +1664,10 @@ void llama_vocab::impl::load(llama_model_loader & ml, const LLM_KV & kv) {
16631664
tokenizer_pre == "seed-coder") {
16641665
pre_type = LLAMA_VOCAB_PRE_TYPE_SEED_CODER;
16651666
clean_spaces = false;
1667+
} else if (
1668+
tokenizer_pre == "hunyuan") {
1669+
pre_type = LLAMA_VOCAB_PRE_TYPE_HUNYUAN;
1670+
clean_spaces = false;
16661671
} else if (
16671672
tokenizer_pre == "smoldocling") {
16681673
pre_type = LLAMA_VOCAB_PRE_TYPE_SMOLDOCLING;

0 commit comments

Comments
 (0)