Upload 2 files
Browse files- chat_template.jinja +1 -2
- tokenizer_config.json +1 -1
chat_template.jinja
CHANGED
|
@@ -1,9 +1,8 @@
|
|
| 1 |
{% set has_system = messages|selectattr('role', 'equalto', 'system')|list|length > 0 %}{% if not has_system %}{{ '<|im_start|>system
|
| 2 |
You are Olmo, a helpful AI assistant built by Ai2. Your date cutoff is December 2024, and your model weights are available at https://huggingface.co/allenai.<|im_end|>
|
| 3 |
' }}{% endif %}{% for message in messages %}{% if message['role'] == 'system' %}{{ '<|im_start|>system
|
| 4 |
-
' + message['content'] }}{% if message.get('functions', none) is not none %}{
|
| 5 |
' }}{% else %}{{ ' You do not currently have access to any functions. <functions></functions><|im_end|>
|
| 6 |
-
' }}{% endif %}{% else %}{{ '<|im_end|>
|
| 7 |
' }}{% endif %}{% elif message['role'] == 'user' %}{% if message.get('functions', none) is not none %}{{ '<|im_start|>user
|
| 8 |
' + message['content'] + '
|
| 9 |
' + '<functions>' + message['functions'] + '</functions><|im_end|>
|
|
|
|
| 1 |
{% set has_system = messages|selectattr('role', 'equalto', 'system')|list|length > 0 %}{% if not has_system %}{{ '<|im_start|>system
|
| 2 |
You are Olmo, a helpful AI assistant built by Ai2. Your date cutoff is December 2024, and your model weights are available at https://huggingface.co/allenai.<|im_end|>
|
| 3 |
' }}{% endif %}{% for message in messages %}{% if message['role'] == 'system' %}{{ '<|im_start|>system
|
| 4 |
+
' + message['content'] }}{% if message.get('functions', none) is not none %}{{ ' <functions>' + message['functions'] + '</functions><|im_end|>
|
| 5 |
' }}{% else %}{{ ' You do not currently have access to any functions. <functions></functions><|im_end|>
|
|
|
|
| 6 |
' }}{% endif %}{% elif message['role'] == 'user' %}{% if message.get('functions', none) is not none %}{{ '<|im_start|>user
|
| 7 |
' + message['content'] + '
|
| 8 |
' + '<functions>' + message['functions'] + '</functions><|im_end|>
|
tokenizer_config.json
CHANGED
|
@@ -186,5 +186,5 @@
|
|
| 186 |
"pad_token": "<|pad|>",
|
| 187 |
"tokenizer_class": "GPT2Tokenizer",
|
| 188 |
"unk_token": "<|endoftext|>",
|
| 189 |
-
"chat_template": "{% set has_system = messages|selectattr('role', 'equalto', 'system')|list|length > 0 %}{% if not has_system %}{{ '<|im_start|>system\nYou are Olmo, a helpful AI assistant built by Ai2. Your date cutoff is December 2024, and your model weights are available at https://huggingface.co/allenai.<|im_end|>\n' }}{% endif %}{% for message in messages %}{% if message['role'] == 'system' %}{{ '<|im_start|>system\n' + message['content'] }}{% if message.get('functions', none) is not none %}{
|
| 190 |
}
|
|
|
|
| 186 |
"pad_token": "<|pad|>",
|
| 187 |
"tokenizer_class": "GPT2Tokenizer",
|
| 188 |
"unk_token": "<|endoftext|>",
|
| 189 |
+
"chat_template": "{% set has_system = messages|selectattr('role', 'equalto', 'system')|list|length > 0 %}{% if not has_system %}{{ '<|im_start|>system\nYou are Olmo, a helpful AI assistant built by Ai2. Your date cutoff is December 2024, and your model weights are available at https://huggingface.co/allenai.<|im_end|>\n' }}{% endif %}{% for message in messages %}{% if message['role'] == 'system' %}{{ '<|im_start|>system\n' + message['content'] }}{% if message.get('functions', none) is not none %}{{ ' <functions>' + message['functions'] + '</functions><|im_end|>\n' }}{% else %}{{ ' You do not currently have access to any functions. <functions></functions><|im_end|>\n' }}{% endif %}{% elif message['role'] == 'user' %}{% if message.get('functions', none) is not none %}{{ '<|im_start|>user\n' + message['content'] + '\n' + '<functions>' + message['functions'] + '</functions><|im_end|>\n' }}{% else %}{{ '<|im_start|>user\n' + message['content'] + '<|im_end|>\n' }}{% endif %}{% elif message['role'] == 'assistant' %}{{ '<|im_start|>assistant\n' }}{% if message.get('content', none) is not none %}{{ message['content'] }}{% endif %}{% if message.get('function_calls', none) is not none %}{{ '<function_calls>' + message['function_calls'] + '</function_calls>' }}{% endif %}{% if not loop.last %}{{ '<|im_end|>' + '\n' }}{% else %}{{ eos_token }}{% endif %}{% elif message['role'] == 'environment' %}{{ '<|im_start|>environment\n' + message['content'] + '<|im_end|>\n' }}{% endif %}{% if loop.last and add_generation_prompt %}{{ '<|im_start|>assistant\n<think>' }}{% endif %}{% endfor %}"
|
| 190 |
}
|