Reference code deepseek-ai/DeepSeek-V3.2-Exp @ 87e509a · checkpoint, tokenizer and tensors not verified · How to read

Raw text

×

tensorprompts

Text supplied for tokenization.

Codegenerate.py 117, 150
generate.py 117
    tokenizer = AutoTokenizer.from_pretrained(ckpt_path)
generate.py 150
        prompt_tokens = [tokenizer.apply_chat_template([{"role": "user", "content": prompt}], add_generation_prompt=True) for prompt in prompts]
Sources1

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.

tokenizer · deepseek-ai/DeepSeek-V3.2-Exp / inference/generate.py
Pinned revision 87e509a2e5a1 ↗ · lines 117–150

Read code 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]