Update tokenizer_config.json
Browse filesAt inference, the model does not generate <|im_end|> but <|endoftext|> instead. Using <|im_end|> results in infinite generation, <|endoftext|> fixes it but this may not be the most relevant fix, there seems to be a broader issue with this tokenizer: https://x.com/danielhanchen/status/1856442699689414970.
based on this post, you may also consider removing the chat template for this model. I typically ignore the chat template but, when I tested with the chat template to verify the post, and I ran into the infinite generation issue
- tokenizer_config.json +2 -2
tokenizer_config.json
CHANGED
@@ -195,9 +195,9 @@
|
|
195 |
"<|video_pad|>"
|
196 |
],
|
197 |
"bos_token": null,
|
198 |
-
"chat_template":
|
199 |
"clean_up_tokenization_spaces": false,
|
200 |
-
"eos_token": "<|
|
201 |
"errors": "replace",
|
202 |
"model_max_length": 131072,
|
203 |
"pad_token": "<|endoftext|>",
|
|
|
195 |
"<|video_pad|>"
|
196 |
],
|
197 |
"bos_token": null,
|
198 |
+
"chat_template": null,
|
199 |
"clean_up_tokenization_spaces": false,
|
200 |
+
"eos_token": "<|endoftext|>",
|
201 |
"errors": "replace",
|
202 |
"model_max_length": 131072,
|
203 |
"pad_token": "<|endoftext|>",
|