vibhorag101
commited on
Commit
•
8cd0db2
1
Parent(s):
526311b
For TGI, removed content.strip() from tokenizer
Browse files- tokenizer_config.json +1 -1
tokenizer_config.json
CHANGED
@@ -36,7 +36,7 @@
|
|
36 |
}
|
37 |
},
|
38 |
"bos_token": "<s>",
|
39 |
-
"chat_template": "{% if messages[0]['role'] == 'system' %}{% set loop_messages = messages[1:] %}{% set system_message = messages[0]['content'] %}{% else %}{% set loop_messages = messages %}{% set system_message = false %}{% endif %}{% for message in loop_messages %}{% if (message['role'] == 'user') != (loop.index0 % 2 == 0) %}{{ raise_exception('Conversation roles must alternate user/assistant/user/assistant/...') }}{% endif %}{% if loop.index0 == 0 and system_message != false %}{% set content = '<<SYS>>\\n' + system_message + '\\n<</SYS>>\\n\\n' + message['content'] %}{% else %}{% set content = message['content'] %}{% endif %}{% if message['role'] == 'user' %}{{ bos_token + '[INST] ' + content
|
40 |
"clean_up_tokenization_spaces": false,
|
41 |
"eos_token": "</s>",
|
42 |
"legacy": false,
|
|
|
36 |
}
|
37 |
},
|
38 |
"bos_token": "<s>",
|
39 |
+
"chat_template": "{% if messages[0]['role'] == 'system' %}{% set loop_messages = messages[1:] %}{% set system_message = messages[0]['content'] %}{% else %}{% set loop_messages = messages %}{% set system_message = false %}{% endif %}{% for message in loop_messages %}{% if (message['role'] == 'user') != (loop.index0 % 2 == 0) %}{{ raise_exception('Conversation roles must alternate user/assistant/user/assistant/...') }}{% endif %}{% if loop.index0 == 0 and system_message != false %}{% set content = '<<SYS>>\\n' + system_message + '\\n<</SYS>>\\n\\n' + message['content'] %}{% else %}{% set content = message['content'] %}{% endif %}{% if message['role'] == 'user' %}{{ bos_token + '[INST] ' + content + ' [/INST]' }}{% elif message['role'] == 'assistant' %}{{ ' ' + content + ' ' + eos_token }}{% endif %}{% endfor %}",
|
40 |
"clean_up_tokenization_spaces": false,
|
41 |
"eos_token": "</s>",
|
42 |
"legacy": false,
|