(Trained with Unsloth)
Browse files- chat_template.jinja +4 -15
- special_tokens_map.json +32 -4
- tokenizer.json +2 -2
- tokenizer.model +3 -0
- tokenizer_config.json +14 -10
chat_template.jinja
CHANGED
|
@@ -1,15 +1,4 @@
|
|
| 1 |
-
{% if 'role'
|
| 2 |
-
' + message['content'] + '
|
| 3 |
-
'}}{%
|
| 4 |
-
'
|
| 5 |
-
' }}{% else %}{{ '<|im_start|>system
|
| 6 |
-
' + message['content'] + '<|im_end|>
|
| 7 |
-
' }}{% endif %}{% endfor %}{% if add_generation_prompt %}{{ '<|im_start|>assistant
|
| 8 |
-
' }}{% endif %}{% else %}{{ bos_token }}{% for message in messages %}{% if message['from'] == 'human' %}{{'<|im_start|>user
|
| 9 |
-
' + message['value'] + '<|im_end|>
|
| 10 |
-
'}}{% elif message['from'] == 'gpt' %}{{'<|im_start|>assistant
|
| 11 |
-
' + message['value'] + '<|im_end|>
|
| 12 |
-
' }}{% else %}{{ '<|im_start|>system
|
| 13 |
-
' + message['value'] + '<|im_end|>
|
| 14 |
-
' }}{% endif %}{% endfor %}{% if add_generation_prompt %}{{ '<|im_start|>assistant
|
| 15 |
-
' }}{% endif %}{% endif %}
|
|
|
|
| 1 |
+
{{ bos_token }}{% if messages[0]['role'] == 'system' %}{{ raise_exception('System role not supported') }}{% endif %}{% for message in messages %}{% if (message['role'] == 'user') != (loop.index0 % 2 == 0) %}{{ raise_exception('Conversation roles must alternate user/assistant/user/assistant/...') }}{% endif %}{% if (message['role'] == 'assistant') %}{% set role = 'model' %}{% else %}{% set role = message['role'] %}{% endif %}{{ '<start_of_turn>' + role + '
|
| 2 |
+
' + message['content'] | trim + '<end_of_turn>
|
| 3 |
+
' }}{% endfor %}{% if add_generation_prompt %}{{'<start_of_turn>model
|
| 4 |
+
'}}{% endif %}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
special_tokens_map.json
CHANGED
|
@@ -1,6 +1,34 @@
|
|
| 1 |
{
|
| 2 |
-
"
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
}
|
|
|
|
| 1 |
{
|
| 2 |
+
"additional_special_tokens": [
|
| 3 |
+
"<start_of_turn>",
|
| 4 |
+
"<end_of_turn>"
|
| 5 |
+
],
|
| 6 |
+
"bos_token": {
|
| 7 |
+
"content": "<bos>",
|
| 8 |
+
"lstrip": false,
|
| 9 |
+
"normalized": false,
|
| 10 |
+
"rstrip": false,
|
| 11 |
+
"single_word": false
|
| 12 |
+
},
|
| 13 |
+
"eos_token": {
|
| 14 |
+
"content": "<eos>",
|
| 15 |
+
"lstrip": false,
|
| 16 |
+
"normalized": false,
|
| 17 |
+
"rstrip": false,
|
| 18 |
+
"single_word": false
|
| 19 |
+
},
|
| 20 |
+
"pad_token": {
|
| 21 |
+
"content": "<pad>",
|
| 22 |
+
"lstrip": false,
|
| 23 |
+
"normalized": false,
|
| 24 |
+
"rstrip": false,
|
| 25 |
+
"single_word": false
|
| 26 |
+
},
|
| 27 |
+
"unk_token": {
|
| 28 |
+
"content": "<unk>",
|
| 29 |
+
"lstrip": false,
|
| 30 |
+
"normalized": false,
|
| 31 |
+
"rstrip": false,
|
| 32 |
+
"single_word": false
|
| 33 |
+
}
|
| 34 |
}
|
tokenizer.json
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b7eb818e7f83838615f7d3ca8b4f7690af124ce01dbf4870378d65aad732c22a
|
| 3 |
+
size 34356140
|
tokenizer.model
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:61a7b147390c64585d6c3543dd6fc636906c9af3865a5548f27f31aee1d4c8e2
|
| 3 |
+
size 4241003
|
tokenizer_config.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
| 11 |
"special": true
|
| 12 |
},
|
| 13 |
"1": {
|
| 14 |
-
"content": "
|
| 15 |
"lstrip": false,
|
| 16 |
"normalized": false,
|
| 17 |
"rstrip": false,
|
|
@@ -851,7 +851,7 @@
|
|
| 851 |
"special": false
|
| 852 |
},
|
| 853 |
"106": {
|
| 854 |
-
"content": "
|
| 855 |
"lstrip": false,
|
| 856 |
"normalized": false,
|
| 857 |
"rstrip": false,
|
|
@@ -1739,16 +1739,20 @@
|
|
| 1739 |
"special": false
|
| 1740 |
}
|
| 1741 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1742 |
"bos_token": "<bos>",
|
| 1743 |
"clean_up_tokenization_spaces": false,
|
| 1744 |
-
"eos_token": "
|
| 1745 |
"extra_special_tokens": {},
|
| 1746 |
-
"
|
| 1747 |
-
"model_max_length": 1000000000000000019884624838656,
|
| 1748 |
"pad_token": "<pad>",
|
| 1749 |
-
"
|
| 1750 |
-
"
|
| 1751 |
-
"
|
| 1752 |
-
"
|
| 1753 |
-
"unk_token": "<unk>"
|
|
|
|
| 1754 |
}
|
|
|
|
| 11 |
"special": true
|
| 12 |
},
|
| 13 |
"1": {
|
| 14 |
+
"content": "<eos>",
|
| 15 |
"lstrip": false,
|
| 16 |
"normalized": false,
|
| 17 |
"rstrip": false,
|
|
|
|
| 851 |
"special": false
|
| 852 |
},
|
| 853 |
"106": {
|
| 854 |
+
"content": "<start_of_turn>",
|
| 855 |
"lstrip": false,
|
| 856 |
"normalized": false,
|
| 857 |
"rstrip": false,
|
|
|
|
| 1739 |
"special": false
|
| 1740 |
}
|
| 1741 |
},
|
| 1742 |
+
"additional_special_tokens": [
|
| 1743 |
+
"<start_of_turn>",
|
| 1744 |
+
"<end_of_turn>"
|
| 1745 |
+
],
|
| 1746 |
"bos_token": "<bos>",
|
| 1747 |
"clean_up_tokenization_spaces": false,
|
| 1748 |
+
"eos_token": "<eos>",
|
| 1749 |
"extra_special_tokens": {},
|
| 1750 |
+
"model_max_length": 8192,
|
|
|
|
| 1751 |
"pad_token": "<pad>",
|
| 1752 |
+
"padding_side": "right",
|
| 1753 |
+
"sp_model_kwargs": {},
|
| 1754 |
+
"spaces_between_special_tokens": false,
|
| 1755 |
+
"tokenizer_class": "GemmaTokenizer",
|
| 1756 |
+
"unk_token": "<unk>",
|
| 1757 |
+
"use_default_system_prompt": false
|
| 1758 |
}
|