XGrammar structural tags for Gemma 4 and Harmony tool calls

Parent: Mac local LLMs: Chat templates, reasoning and tool calling · Published reference · snapshot 2026-10-05

↓ Facts as markdownall context files

Issue 587 (opened 2026-04-09) gives the Gemma 4 thinking format as `<|channel>thought\n...<channel|>` with `<|channel>` token ID 100 and `<channel|>` token ID 101, and says `enable_thinking=False` makes the template pre-close an empty channel `<|channel>thought\n<channel|>`.

These notes link each claim to its source. A source may be a research report hosted on this site rather than the primary document. A published reference means the content is available; it does not certify independent review or accuracy.Read the editorial policy and follow the sources before relying on a claim.

Facts

Children

← the whole tree · 3D view· how to read this page