Skip to content

Commit a0fc2a2

Browse files
committed
Add DeepSeek-V3.1
1 parent 97ae596 commit a0fc2a2

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
@@ -851,6 +851,9 @@ def get_vocab_base_pre(self, tokenizer) -> str:
851851
if chkhsh == "b3f499bb4255f8ca19fccd664443283318f2fd2414d5e0b040fbdd0cc195d6c5":
852852
# ref: https://huggingface.co/deepseek-ai/DeepSeek-R1-Distill-Qwen-1.5B
853853
res = "deepseek-r1-qwen"
854+
if chkhsh == "877081d19cf6996e2c4ff0e1236341e9b7bde288f5311a56a937f0afbbb3aeb5":
855+
# ref: https://huggingface.co/deepseek-ai/DeepSeek-V3.1
856+
res = "deepseek-v3.1"
854857
if chkhsh == "ccc2ef013c104be7bae2965776d611e1d7a8a2a9c547dd93a682c9a9fc80352e":
855858
# ref: https://huggingface.co/Xenova/gpt-4o
856859
res = "gpt-4o"

convert_hf_to_gguf_update.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ class TOKENIZER_TYPE(IntEnum):
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"},
129129
{"name": "deepseek-r1-qwen", "tokt": TOKENIZER_TYPE.BPE, "repo": "https://huggingface.co/deepseek-ai/DeepSeek-R1-Distill-Qwen-1.5B"},
130+
{"name": "deepseek-v3.1", "tokt": TOKENIZER_TYPE.BPE, "repo": "https://huggingface.co/deepseek-ai/DeepSeek-V3.1"},
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", },
132133
{"name": "trillion", "tokt": TOKENIZER_TYPE.BPE, "repo": "https://huggingface.co/trillionlabs/Trillion-7B-preview", },

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)