{ "audio_token": "<|audio|>", "backend": "tokenizers", "boa_token": "<|audio>", "boi_token": "<|image>", "bos_token": "", "eoa_token": "", "eoc_token": "", "eoi_token": "", "eos_token": "", "eot_token": "", "escape_token": "<|\"|>", "etc_token": "", "etd_token": "", "etr_token": "", "extra_special_tokens": [ "<|video|>" ], "image_token": "<|image|>", "is_local": false, "local_files_only": false, "mask_token": "", "model_max_length": 262144, "model_specific_special_tokens": { "audio_token": "<|audio|>", "boa_token": "<|audio>", "boi_token": "<|image>", "eoa_token": "", "eoc_token": "", "eoi_token": "", "eot_token": "", "escape_token": "<|\"|>", "etc_token": "", "etd_token": "", "etr_token": "", "image_token": "<|image|>", "soc_token": "<|channel>", "sot_token": "<|turn>", "stc_token": "<|tool_call>", "std_token": "<|tool>", "str_token": "<|tool_response>", "think_token": "<|think|>" }, "pad_token": "", "padding_side": "right", "processor_class": "Gemma4Processor", "response_schema": { "properties": { "content": { "type": "string" }, "role": { "const": "assistant" }, "thinking": { "type": "string" }, "tool_calls": { "items": { "properties": { "function": { "properties": { "arguments": { "additionalProperties": {}, "type": "object", "x-parser": "gemma4-tool-call" }, "name": { "type": "string" } }, "type": "object", "x-regex": "call\\:(?P\\w+)(?P\\{.*\\})" }, "type": { "const": "function" } }, "type": "object" }, "type": "array", "x-regex-iterator": "<\\|tool_call>(.*?)" } }, "type": "object", "x-regex": "(\\<\\|channel\\>thought\\n(?P.*?)\\)?(?P\\<\\|tool_call\\>.*\\)?(?P(?:(?!\\)(?!\\<\\|tool_response\\>).)+)?(?:\\|\\<\\|tool_response\\>)?" }, "soc_token": "<|channel>", "sot_token": "<|turn>", "stc_token": "<|tool_call>", "std_token": "<|tool>", "str_token": "<|tool_response>", "think_token": "<|think|>", "tokenizer_class": "GemmaTokenizer", "unk_token": "", "added_tokens_decoder": { "0": { "content": "", "single_word": false, "lstrip": false, "rstrip": false, "normalized": false, "special": true }, "1": { "content": "", "single_word": false, "lstrip": false, "rstrip": false, "normalized": false, "special": true }, "2": { "content": "", "single_word": false, "lstrip": false, "rstrip": false, "normalized": false, "special": true }, "3": { "content": "", "single_word": false, "lstrip": false, "rstrip": false, "normalized": false, "special": true }, "4": { "content": "", "single_word": false, "lstrip": false, "rstrip": false, "normalized": false, "special": true }, "46": { "content": "<|tool>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": false, "special": true }, "47": { "content": "", "single_word": false, "lstrip": false, "rstrip": false, "normalized": false, "special": true }, "48": { "content": "<|tool_call>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": false, "special": true }, "49": { "content": "", "single_word": false, "lstrip": false, "rstrip": false, "normalized": false, "special": true }, "50": { "content": "<|tool_response>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": false, "special": true }, "51": { "content": "", "single_word": false, "lstrip": false, "rstrip": false, "normalized": false, "special": true }, "52": { "content": "<|\"|>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": false, "special": true }, "98": { "content": "<|think|>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": false, "special": true }, "100": { "content": "<|channel>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": false, "special": true }, "101": { "content": "", "single_word": false, "lstrip": false, "rstrip": false, "normalized": false, "special": true }, "105": { "content": "<|turn>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": false, "special": true }, "106": { "content": "", "single_word": false, "lstrip": false, "rstrip": false, "normalized": false, "special": true }, "255999": { "content": "<|image>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": false, "special": true }, "256000": { "content": "<|audio>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": false, "special": true }, "258880": { "content": "<|image|>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": false, "special": true }, "258881": { "content": "<|audio|>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": false, "special": true }, "258882": { "content": "", "single_word": false, "lstrip": false, "rstrip": false, "normalized": false, "special": true }, "258883": { "content": "", "single_word": false, "lstrip": false, "rstrip": false, "normalized": false, "special": true }, "258884": { "content": "<|video|>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": false, "special": true } }, "chat_template": "{{ bos_token }}{%- macro strip_thinking(text) -%}\n {%- set ns = namespace(result='') -%}\n {%- for part in text.split('') -%}\n {%- if '<|channel>' in part -%}\n {%- set ns.result = ns.result + part.split('<|channel>')[0] -%}\n {%- else -%}\n {%- set ns.result = ns.result + part -%}\n {%- endif -%}\n {%- endfor -%}\n {{- ns.result | trim -}}\n{%- endmacro -%}\n{%- set thinking = enable_thinking is defined and enable_thinking -%}\n{%- set loop_messages = messages -%}\n{%- if messages[0]['role'] in ['system', 'developer'] or thinking -%}\n {{ '<|turn>system\n' }}\n {%- if thinking -%}\n {{ '<|think|>\n' }}\n {%- endif -%}\n {%- if messages[0]['role'] in ['system', 'developer'] -%}\n {{ messages[0]['content'] | trim }}\n {%- set loop_messages = messages[1:] -%}\n {%- endif -%}\n {{ '\n' }}\n{%- endif -%}\n{%- for message in loop_messages -%}\n {%- if (message['role'] == 'user') != (loop.index0 % 2 == 0) -%}\n {{ raise_exception(\"Conversation roles must alternate user/assistant/user/assistant/...\") }}\n {%- endif -%}\n {%- if (message['role'] == 'assistant') -%}\n {%- set role = \"model\" -%}\n {%- else -%}\n {%- set role = message['role'] -%}\n {%- endif -%}\n {{ '<|turn>' + role + '\n' }}\n {%- if message['content'] is string -%}\n {%- if role == \"model\" -%}\n {{ strip_thinking(message['content']) }}\n {%- else -%}\n {{ message['content'] | trim }}\n {%- endif -%}\n {%- elif message['content'] is iterable -%}\n {%- for item in message['content'] -%}\n {%- if item['type'] == 'audio' -%}\n {{ '<|audio|>' }}\n {%- elif item['type'] == 'image' -%}\n {{ '<|image|>' }}\n {%- elif item['type'] == 'video' -%}\n {{ '<|video|>' }}\n {%- elif item['type'] == 'text' -%}\n {%- if role == \"model\" -%}\n {{ strip_thinking(item['text']) }}\n {%- else -%}\n {{ item['text'] | trim }}\n {%- endif -%}\n {%- endif -%}\n {%- endfor -%}\n {%- else -%}\n {{ raise_exception(\"Invalid content type\") }}\n {%- endif -%}\n {{ '\n' }}\n{%- endfor -%}\n{%- if add_generation_prompt -%}\n {{'<|turn>model\n'}}\n {%- if not thinking -%}\n {{ '<|channel>thought\n' }}\n {%- endif -%}\n{%- endif -%}\n" }