IMPORTANT: To view this page as Markdown, append `.md` to the URL (e.g. /max/get-started.md). For the complete documentation index, see llms.txt.
Skip to main content
For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /max/get-started.md).

Python class

ReasoningPipelineTokenizer

ReasoningPipelineTokenizer​

class max.pipelines.modeling.types.ReasoningPipelineTokenizer(*args, **kwargs)

source

Bases: PipelineTokenizer[UnboundContextType, TokenizerEncoded, RequestType], Protocol[UnboundContextType, TokenizerEncoded, RequestType]

PipelineTokenizer that exposes its reasoning-delimiter token ids.

Implemented by architecture-specific tokenizers that drive a reasoning parser (Gemma 4, Kimi K2.5, MiniMax M2). The tokenizer resolves the delimiter ids once at construction and exposes them as instance attributes so callers β€” for example OverlapTextGenerationPipeline’s thinking-mode temperature scaling β€” can read them directly without re-encoding <think>/</think> or depending on the reasoning parser registry.

reasoning_end_token_id​

property reasoning_end_token_id: int

source

The token id that closes a reasoning span (e.g. <channel|>).

reasoning_start_token_id​

property reasoning_start_token_id: int

source

The token id that opens a reasoning span (e.g. <|channel>).