GLM-5.2 tokenizer_config with embedded chat template for TGI
Browse files- tokenizer_config.json +12 -0
tokenizer_config.json
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"model_type": "chatglm",
|
| 3 |
+
"tokenizer_class": "ChatGLMTokenizer",
|
| 4 |
+
"auto_map": {
|
| 5 |
+
"AutoTokenizer": "tokenization_chatglm.AutoTokenizer"
|
| 6 |
+
},
|
| 7 |
+
"bos_token": "[gMASK]<sop>",
|
| 8 |
+
"eos_token": "<|endoftext|>",
|
| 9 |
+
"pad_token": "<|endoftext|>",
|
| 10 |
+
"model_max_length": 131072,
|
| 11 |
+
"chat_template": "{{ bos_token }}{% for message in messages %}{% if message['role'] == 'system' %}<|system|>\n{{ message['content'] }}{% elif message['role'] == 'user' %}<|user|>\n{{ message['content'] }}<|assistant|>\n{% elif message['role'] == 'assistant' %}{{ message['content'] }}{% endif %}{% endfor %}{% if add_generation_prompt %}<|assistant|>\n{% endif %}"
|
| 12 |
+
}
|