Skip to content

Commit b6d31b2

Browse files
committed
Initial DeepSeek-3.1-Base changes
1 parent fb22dd0 commit b6d31b2

File tree

3 files changed

+8
-0
lines changed

3 files changed

+8
-0
lines changed

convert_hf_to_gguf.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -842,6 +842,9 @@ def get_vocab_base_pre(self, tokenizer) -> str:
842842
if chkhsh == "877081d19cf6996e2c4ff0e1236341e9b7bde288f5311a56a937f0afbbb3aeb5":
843843
# ref: https://huggingface.co/deepseek-ai/DeepSeek-V3
844844
res = "deepseek-v3"
845+
if chkhsh == "877081d19cf6996e2c4ff0e1236341e9b7bde288f5311a56a937f0afbbb3aeb5":
846+
# ref: https://huggingface.co/deepseek-ai/DeepSeek-V3.1-Base
847+
res = "deepseek-v3.1"
845848
if chkhsh == "b3f499bb4255f8ca19fccd664443283318f2fd2414d5e0b040fbdd0cc195d6c5":
846849
# ref: https://huggingface.co/deepseek-ai/DeepSeek-R1-Distill-Qwen-1.5B
847850
res = "deepseek-r1-qwen"

convert_hf_to_gguf_update.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@ class TOKENIZER_TYPE(IntEnum):
126126
{"name": "gigachat", "tokt": TOKENIZER_TYPE.BPE, "repo": "https://huggingface.co/ai-sage/GigaChat-20B-A3B-instruct"},
127127
{"name": "megrez", "tokt": TOKENIZER_TYPE.BPE, "repo": "https://huggingface.co/Infinigence/Megrez-3B-Instruct"},
128128
{"name": "deepseek-v3", "tokt": TOKENIZER_TYPE.BPE, "repo": "https://huggingface.co/deepseek-ai/DeepSeek-V3"},
129+
{"name": "deepseek-v3.1", "tokt": TOKENIZER_TYPE.BPE, "repo": "https://huggingface.co/deepseek-ai/DeepSeek-V3.1-Base"},
129130
{"name": "deepseek-r1-qwen", "tokt": TOKENIZER_TYPE.BPE, "repo": "https://huggingface.co/deepseek-ai/DeepSeek-R1-Distill-Qwen-1.5B"},
130131
{"name": "gpt-4o", "tokt": TOKENIZER_TYPE.BPE, "repo": "https://huggingface.co/Xenova/gpt-4o", },
131132
{"name": "superbpe", "tokt": TOKENIZER_TYPE.BPE, "repo": "https://huggingface.co/UW/OLMo2-8B-SuperBPE-t180k", },

src/llama-vocab.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1839,6 +1839,10 @@ void llama_vocab::impl::load(llama_model_loader & ml, const LLM_KV & kv) {
18391839
tokenizer_pre == "deepseek-v3") {
18401840
pre_type = LLAMA_VOCAB_PRE_TYPE_DEEPSEEK3_LLM;
18411841
clean_spaces = false;
1842+
} else if (
1843+
tokenizer_pre == "deepseek-v3.1") {
1844+
pre_type = LLAMA_VOCAB_PRE_TYPE_DEEPSEEK3_LLM;
1845+
clean_spaces = false;
18421846
} else if (
18431847
tokenizer_pre == "falcon") {
18441848
pre_type = LLAMA_VOCAB_PRE_TYPE_FALCON;

0 commit comments

Comments
 (0)