Skip to content

Commit 80322eb

Browse files
authored
model: codefuse-ai/F2LLM-v2 support
1 parent 44c51e5 commit 80322eb

3 files changed

Lines changed: 6 additions & 1 deletion

File tree

convert_hf_to_gguf.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1503,6 +1503,9 @@ def get_vocab_base_pre(self, tokenizer) -> str:
15031503
if chkhsh == "e4d54df1ebc1f2b91acd986c5b51aa50837d5faf7c7398e73c1f9e9ee5d19869":
15041504
# ref: https://huggingface.co/kakaocorp/kanana-2-30b-a3b-instruct-2601
15051505
res = "kanana2"
1506+
if chkhsh == "862f827721df956049dff5ca81a57f29e575280bc622e290d3bf4e35eca29015":
1507+
# ref: https://huggingface.co/codefuse-ai/F2LLM-v2-4B
1508+
res = "f2llmv2"
15061509

15071510
if res is None:
15081511
logger.warning("\n")

convert_hf_to_gguf_update.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,7 @@ class TOKENIZER_TYPE(IntEnum):
154154
{"name": "qwen35", "tokt": TOKENIZER_TYPE.BPE, "repo": "https://huggingface.co/Qwen/Qwen3.5-9B-Instruct", },
155155
{"name": "joyai-llm", "tokt": TOKENIZER_TYPE.BPE, "repo": "https://huggingface.co/jdopensource/JoyAI-LLM-Flash", },
156156
{"name": "kanana2", "tokt": TOKENIZER_TYPE.BPE, "repo": "https://huggingface.co/kakaocorp/kanana-2-30b-a3b-instruct-2601", },
157+
{"name": "f2llmv2", "tokt": TOKENIZER_TYPE.BPE, "repo": "https://huggingface.co/codefuse-ai/F2LLM-v2-4B", },
157158
]
158159

159160
# some models are known to be broken upstream, so we will skip them as exceptions

src/llama-vocab.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1952,7 +1952,8 @@ void llama_vocab::impl::load(llama_model_loader & ml, const LLM_KV & kv) {
19521952
} else if (
19531953
tokenizer_pre == "qwen2" ||
19541954
tokenizer_pre == "deepseek-r1-qwen" ||
1955-
tokenizer_pre == "kormo") {
1955+
tokenizer_pre == "kormo" ||
1956+
tokenizer_pre == "f2llmv2") {
19561957
pre_type = LLAMA_VOCAB_PRE_TYPE_QWEN2;
19571958
clean_spaces = false;
19581959
} else if (

0 commit comments

Comments
 (0)