Fix Conversational Widget
Browse filesThis PR will fix the widget for this model by setting explicit eos_token/bos_token. It should not affect existing users loading the model/tokenizers from the libraries.
PR changes have been generated using:
```py
from transformers import AutoTokenizer
tokenizer = AutoTokenizer.from_pretrained("microsoft/DialoGPT-small")
tokenizer.save_pretrained('path/to/local/dir')
```
(related to PR [microsoft/DialoGPT-medium/discussions/17](https://huggingface.co/microsoft/DialoGPT-medium/discussions/16))
- tokenizer_config.json +21 -2
tokenizer_config.json
CHANGED
@@ -1,4 +1,23 @@
|
|
1 |
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
"model_max_length": 1024,
|
3 |
-
"
|
4 |
-
|
|
|
|
|
|
1 |
{
|
2 |
+
"add_bos_token": false,
|
3 |
+
"add_prefix_space": false,
|
4 |
+
"added_tokens_decoder": {
|
5 |
+
"50256": {
|
6 |
+
"content": "<|endoftext|>",
|
7 |
+
"lstrip": false,
|
8 |
+
"normalized": true,
|
9 |
+
"rstrip": false,
|
10 |
+
"single_word": false,
|
11 |
+
"special": true
|
12 |
+
}
|
13 |
+
},
|
14 |
+
"bos_token": "<|endoftext|>",
|
15 |
+
"chat_template": "{% for message in messages %}{{ message.content }}{{ eos_token }}{% endfor %}",
|
16 |
+
"clean_up_tokenization_spaces": true,
|
17 |
+
"eos_token": "<|endoftext|>",
|
18 |
+
"errors": "replace",
|
19 |
"model_max_length": 1024,
|
20 |
+
"pad_token": null,
|
21 |
+
"tokenizer_class": "GPT2Tokenizer",
|
22 |
+
"unk_token": "<|endoftext|>"
|
23 |
+
}
|