(Trained with Unsloth)
Browse files- chat_template.jinja +4 -37
- config.json +2 -1
- tokenizer_config.json +3 -6
chat_template.jinja
CHANGED
|
@@ -1,37 +1,4 @@
|
|
| 1 |
-
{{
|
| 2 |
-
|
| 3 |
-
{%
|
| 4 |
-
{%
|
| 5 |
-
{%- set ns.system_prompt = messages[0]["content"] -%}
|
| 6 |
-
{%- set messages = messages[1:] -%}
|
| 7 |
-
{%- endif -%}
|
| 8 |
-
{%- if tools -%}
|
| 9 |
-
{%- set ns.system_prompt = ns.system_prompt + ("\n" if ns.system_prompt else "") + "List of tools: <|tool_list_start|>[" -%}
|
| 10 |
-
{%- for tool in tools -%}
|
| 11 |
-
{%- if tool is not string -%}
|
| 12 |
-
{%- set tool = tool | tojson -%}
|
| 13 |
-
{%- endif -%}
|
| 14 |
-
{%- set ns.system_prompt = ns.system_prompt + tool -%}
|
| 15 |
-
{%- if not loop.last -%}
|
| 16 |
-
{%- set ns.system_prompt = ns.system_prompt + ", " -%}
|
| 17 |
-
{%- endif -%}
|
| 18 |
-
{%- endfor -%}
|
| 19 |
-
{%- set ns.system_prompt = ns.system_prompt + "]<|tool_list_end|>" -%}
|
| 20 |
-
{%- endif -%}
|
| 21 |
-
{%- if ns.system_prompt -%}
|
| 22 |
-
{{- "<|im_start|>system\n" + ns.system_prompt + "<|im_end|>\n" -}}
|
| 23 |
-
{%- endif -%}
|
| 24 |
-
{%- for message in messages -%}
|
| 25 |
-
{{- "<|im_start|>" + message["role"] + "\n" -}}
|
| 26 |
-
{%- set content = message["content"] -%}
|
| 27 |
-
{%- if content is not string -%}
|
| 28 |
-
{%- set content = content | tojson -%}
|
| 29 |
-
{%- endif -%}
|
| 30 |
-
{%- if message["role"] == "tool" -%}
|
| 31 |
-
{%- set content = "<|tool_response_start|>" + content + "<|tool_response_end|>" -%}
|
| 32 |
-
{%- endif -%}
|
| 33 |
-
{{- content + "<|im_end|>\n" -}}
|
| 34 |
-
{%- endfor -%}
|
| 35 |
-
{%- if add_generation_prompt -%}
|
| 36 |
-
{{- "<|im_start|>assistant\n" -}}
|
| 37 |
-
{%- endif -%}
|
|
|
|
| 1 |
+
{{bos_token}}{% for message in messages %}{{'<|im_start|>' + message['role'] + '
|
| 2 |
+
' + message['content'] + '<|im_end|>' + '
|
| 3 |
+
'}}{% endfor %}{% if add_generation_prompt %}{{ '<|im_start|>assistant
|
| 4 |
+
' }}{% endif %}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
config.json
CHANGED
|
@@ -41,7 +41,7 @@
|
|
| 41 |
"full_attention",
|
| 42 |
"conv"
|
| 43 |
],
|
| 44 |
-
"max_position_embeddings":
|
| 45 |
"model_type": "lfm2",
|
| 46 |
"norm_eps": 1e-05,
|
| 47 |
"num_attention_heads": 24,
|
|
@@ -50,6 +50,7 @@
|
|
| 50 |
"num_key_value_heads": 8,
|
| 51 |
"pad_token_id": 0,
|
| 52 |
"rope_theta": 1000000.0,
|
|
|
|
| 53 |
"unsloth_version": "2026.1.4",
|
| 54 |
"use_cache": true,
|
| 55 |
"use_pos_enc": true,
|
|
|
|
| 41 |
"full_attention",
|
| 42 |
"conv"
|
| 43 |
],
|
| 44 |
+
"max_position_embeddings": 32768,
|
| 45 |
"model_type": "lfm2",
|
| 46 |
"norm_eps": 1e-05,
|
| 47 |
"num_attention_heads": 24,
|
|
|
|
| 50 |
"num_key_value_heads": 8,
|
| 51 |
"pad_token_id": 0,
|
| 52 |
"rope_theta": 1000000.0,
|
| 53 |
+
"unsloth_fixed": true,
|
| 54 |
"unsloth_version": "2026.1.4",
|
| 55 |
"use_cache": true,
|
| 56 |
"use_pos_enc": true,
|
tokenizer_config.json
CHANGED
|
@@ -4064,17 +4064,14 @@
|
|
| 4064 |
"eos_token": "<|im_end|>",
|
| 4065 |
"extra_special_tokens": {},
|
| 4066 |
"legacy": false,
|
| 4067 |
-
"
|
| 4068 |
-
"input_ids",
|
| 4069 |
-
"attention_mask"
|
| 4070 |
-
],
|
| 4071 |
-
"model_max_length": 1000000000000000019884624838656,
|
| 4072 |
"pad_token": "<|pad|>",
|
| 4073 |
"padding_side": "left",
|
| 4074 |
"sp_model_kwargs": {},
|
| 4075 |
"spaces_between_special_tokens": false,
|
| 4076 |
"tokenizer_class": "PreTrainedTokenizerFast",
|
|
|
|
| 4077 |
"use_default_system_prompt": false,
|
| 4078 |
"use_fast": true,
|
| 4079 |
-
"chat_template": "{{
|
| 4080 |
}
|
|
|
|
| 4064 |
"eos_token": "<|im_end|>",
|
| 4065 |
"extra_special_tokens": {},
|
| 4066 |
"legacy": false,
|
| 4067 |
+
"model_max_length": 32768,
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4068 |
"pad_token": "<|pad|>",
|
| 4069 |
"padding_side": "left",
|
| 4070 |
"sp_model_kwargs": {},
|
| 4071 |
"spaces_between_special_tokens": false,
|
| 4072 |
"tokenizer_class": "PreTrainedTokenizerFast",
|
| 4073 |
+
"unk_token": null,
|
| 4074 |
"use_default_system_prompt": false,
|
| 4075 |
"use_fast": true,
|
| 4076 |
+
"chat_template": "{{bos_token}}{% for message in messages %}{{'<|im_start|>' + message['role'] + '\n' + message['content'] + '<|im_end|>' + '\n'}}{% endfor %}{% if add_generation_prompt %}{{ '<|im_start|>assistant\n' }}{% endif %}"
|
| 4077 |
}
|