gemma-4-e2b-it-text-only-4bit / tokenizer_config.json
leecrossley's picture
Add text-only Gemma 4 E2B 4-bit repack
194ed1b verified
{
"audio_token": "<|audio|>",
"backend": "tokenizers",
"boa_token": "<|audio>",
"boi_token": "<|image>",
"bos_token": "<bos>",
"eoa_token": "<audio|>",
"eoc_token": "<channel|>",
"eoi_token": "<image|>",
"eos_token": "<eos>",
"eot_token": "<turn|>",
"escape_token": "<|\"|>",
"etc_token": "<tool_call|>",
"etd_token": "<tool|>",
"etr_token": "<tool_response|>",
"extra_special_tokens": [
"<|video|>"
],
"image_token": "<|image|>",
"mask_token": "<mask>",
"model_max_length": 1000000000000000019884624838656,
"pad_token": "<pad>",
"padding_side": "left",
"processor_class": "Gemma4Processor",
"response_schema": {
"type": "object",
"properties": {
"role": {
"const": "assistant"
},
"thinking": {
"type": "string"
},
"content": {
"type": "string"
},
"tool_calls": {
"x-regex-iterator": "<\\|tool_call>(.*?)<tool_call\\|>",
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {
"const": "function"
},
"function": {
"type": "object",
"x-regex": "call\\:(?P<name>\\w+)(?P<arguments>\\{.*\\})",
"properties": {
"name": {
"type": "string"
},
"arguments": {
"type": "object",
"x-parser": "gemma4-tool-call",
"additionalProperties": {}
}
}
}
}
}
}
},
"x-regex": "(\\<\\|channel\\>thought\\n(?P<thinking>.*?)\\<channel\\|\\>)?(?P<tool_calls>\\<\\|tool_call\\>.*\\<tool_call\\|\\>)?(?P<content>(?:(?!\\<turn\\|\\>)(?!\\<\\|tool_response\\>).)+)?(?:\\<turn\\|\\>|\\<\\|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": "<unk>",
"chat_template": "{% for message in messages %}{% if message['role'] == 'user' %}<|turn>user\n{{ message['content'] }}<turn|>\n{% elif message['role'] == 'model' or message['role'] == 'assistant' %}<|turn>model\n{{ message['content'] }}<turn|>\n{% elif message['role'] == 'system' %}<|turn>system\n{{ message['content'] }}<turn|>\n{% endif %}{% endfor %}{% if add_generation_prompt %}<|turn>model\n{% endif %}"
}