Checkpoint tokenizer

×

The tokenizers file, tokenizer configuration and chat template shipped with the checkpoint.

Unverified: the full token-to-ID mapping. The atlas pins tokenizer.json by its checksum, the same object as GLM-5’s, and keeps no copy.

Explanation

The generic TokenizersBackend loads tokenizer.json (tokenizer_config.json 32).

Sources

In codeTokenizersBackend

Open pinned code ↗

Contextual evidence

The checkpoint’s tokenizer is a Hugging Face tokenizers file (tokenizer.json) loaded by the generic TokenizersBackend; the configuration declares its special tokens, among them the role markers and [gMASK] and <sop>.

tokenizer_config.json 1–33 ↗ · zai-org/GLM-5.2 @ cf457fa734ab

Excerpt
{
  "backend": "tokenizers",
  "clean_up_tokenization_spaces": false,
  "do_lower_case": false,
  "eos_token": "<|endoftext|>",
  "extra_special_tokens": [
    "<|endoftext|>",
    "[MASK]",
    "[gMASK]",
    "[sMASK]",
    "<sop>",
    "<eop>",
    "<|system|>",
    "<|user|>",
    "<|assistant|>",
    "<|observation|>",
    "<|begin_of_image|>",
    "<|end_of_image|>",
    "<|begin_of_video|>",
    "<|end_of_video|>",
    "<|begin_of_audio|>",
    "<|end_of_audio|>",
    "<|begin_of_transcription|>",
    "<|end_of_transcription|>"
  ],
  "is_local": true,
  "model_max_length": 1048576,
  "model_specific_special_tokens": {},
  "pad_token": "<|endoftext|>",
  "padding_side": "left",
  "remove_space": false,
  "tokenizer_class": "TokenizersBackend"
}

The chat template opens with [gMASK]<sop> and, unless thinking is turned off, a system line naming the reasoning effort (high if passed, otherwise max), marks each message with its role (<|system|>, <|user|>, <|assistant|>, and <|observation|> for tool results) and opens the assistant’s turn with <think> unless thinking is turned off.

chat_template.jinja 1–119 ↗ · zai-org/GLM-5.2 @ cf457fa734ab

Excerpt
[gMASK]<sop>
{%- set effective_reasoning_effort = 'high' if reasoning_effort is defined and reasoning_effort == 'high' else 'max' -%}
{%- if (enable_thinking is not defined or enable_thinking) and effective_reasoning_effort is not none -%}<|system|>Reasoning Effort: {{ effective_reasoning_effort | capitalize }}{%- endif -%}

… lines 4–60 omitted …

{%- if m.role == 'user' -%}<|user|>{{ visible_text(m.content) }}
{%- elif m.role == 'assistant' -%}
<|assistant|>

… lines 64–86 omitted …

{%- elif m.role == 'tool' -%}
{%- if loop.first or (messages[loop.index0 - 1].role != "tool") %}
    {{- '<|observation|>' -}}

… lines 90–112 omitted …

{%- elif m.role == 'system' -%}
<|system|>{{ visible_text(m.content) }}
{%- endif -%}
{%- endfor -%}
{%- if add_generation_prompt -%}
    <|assistant|>{{- '<think></think>' if (enable_thinking is defined and not enable_thinking) else '<think>' -}}
{%- endif -%}