Checkpoint tokenizer
×The vocabulary and merge rules shipped with the checkpoint; it ships no Jinja chat template.
Unverified: the full token-to-ID mapping. The atlas pins tokenizer.json by its checksum and keeps no copy; against V3.2-Exp’s it renames three placeholder tokens: 128793 becomes |DSML|, the marker of the new tool-call format, and 128794–128795 become <dsml: and </dsml:, which the chat encoding does not use; the vocabulary keeps its size.
Explanation
The reference generator loads them from the checkpoint directory with Hugging Face AutoTokenizer (generate.py 117).
Sources
In codeAutoTokenizer.from_pretrained(ckpt_path)
Contextual evidence
The reference generator loads the checkpoint’s tokenizer with Hugging Face AutoTokenizer and encodes each prompt through its chat template. The tokenizer’s vocabulary and rules ship with the checkpoint; these sources do not include them.
generate.py 117–150 ↗ · deepseek-ai/DeepSeek-V3.2 @ a7e62ac04ecb
Excerpt
tokenizer = AutoTokenizer.from_pretrained(ckpt_path)… lines 118–149 omitted …
prompt_tokens = [tokenizer.apply_chat_template([{"role": "user", "content": prompt}], add_generation_prompt=True) for prompt in prompts]The model card: the release ships no Jinja chat template; a prompt string is built from the messages by encode_messages in encoding/encoding_dsv32.py and encoded with the tokenizer.
README.md 69–98 ↗ · deepseek-ai/DeepSeek-V3.2 @ a7e62ac04ecb
Excerpt
To assist the community in understanding and adapting to this new template, we have provided a dedicated `encoding` folder, which contains Python scripts and test cases demonstrating how to encode messages in OpenAI-compatible format into input strings for the model and how to parse the model's text output.… lines 70–74 omitted …
# encoding/encoding_dsv32.py
from encoding_dsv32 import encode_messages, parse_message_from_completion_text
tokenizer = transformers.AutoTokenizer.from_pretrained("deepseek-ai/DeepSeek-V3.2")
messages = [
{"role": "user", "content": "hello"},
{"role": "assistant", "content": "Hello! I am DeepSeek.", "reasoning_content": "thinking..."},
{"role": "user", "content": "1+1=?"}
]
encode_config = dict(thinking_mode="thinking", drop_thinking=True, add_default_bos_token=True)
# messages -> string
prompt = encode_messages(messages, **encode_config)
# Output: "<|begin▁of▁sentence|><|User|>hello<|Assistant|></think>Hello! I am DeepSeek.<|end▁of▁sentence|><|User|>1+1=?<|Assistant|><think>"
# string -> tokens
tokens = tokenizer.encode(prompt)… lines 93–97 omitted …
1. This release does not include a Jinja-format chat template. Please refer to the Python code mentioned above.