A special token is a reserved marker that carries structure or control information through a model’s token sequence. Chat templates use such markers to separate system, user, and assistant messages, while generation prompts and end-of-sequence tokens define where the assistant should begin and stop. section 4.1
Special tokens can control several parts of an inference or training pipeline:
- Separate conversational turns with role and message-boundary markers such as <|im_start|> and <|im_end|>. section 4.1
- Signal the assistant-generation position by appending an assistant marker after the user’s message. section 4.1
- Encode tool calls and tool outputs so external execution can interrupt generation and return results to the model. section 13.2
- Represent structured data either through architecture-specific delimiters or through structured formatting retained inside the token stream. section 13.5
Chat and tool-use sequence
A formatted conversation may end with <|im_start|>assistant so the model knows to continue generating. During tool use, generation can emit a tool call, receive an injected result, and then continue producing the answer. section 4.1 section 13.2
<|im_start|>system You are a friendly chatbot who always responds in the style of a pirate<|im_end|> <|im_start|>user How many helicopters can a human eat in one sitting?<|im_end|> <|im_start|>assistant
Inspect a concrete token sequence showing system, user, and assistant boundaries in a pirate-style chatbot prompt. section 4.1




