KeefeBuild commited on
Commit
d909fe7
·
verified ·
1 Parent(s): a10d871

(Trained with Unsloth)

Browse files
chat_template.jinja CHANGED
@@ -38,8 +38,7 @@
38
  {%- endfor %}
39
  {{- '<|im_end|>\n' }}
40
  {%- elif message.role == "tool" %}
41
- {%- if (loop.index0 == 0) or (messages[loop.index0 - 1].role != "tool") %}
42
- {{- '<|im_start|>user' }}
43
  {%- endif %}
44
  {{- '\n<tool_response>\n' }}
45
  {{- message.content }}
 
38
  {%- endfor %}
39
  {{- '<|im_end|>\n' }}
40
  {%- elif message.role == "tool" %}
41
+ {%- if (loop.index0 == 0) or (messages[loop.index0 - 1].role != "tool") %} {{- '<|im_start|>user' }}
 
42
  {%- endif %}
43
  {{- '\n<tool_response>\n' }}
44
  {{- message.content }}
config.json CHANGED
@@ -1,61 +1,61 @@
1
  {
2
- "architectures": [
3
- "Qwen2ForCausalLM"
4
- ],
5
- "attention_dropout": 0.0,
6
- "bos_token_id": 151643,
7
- "dtype": "bfloat16",
8
- "eos_token_id": 151645,
9
- "hidden_act": "silu",
10
- "hidden_size": 3584,
11
- "initializer_range": 0.02,
12
- "intermediate_size": 18944,
13
- "layer_types": [
14
- "full_attention",
15
- "full_attention",
16
- "full_attention",
17
- "full_attention",
18
- "full_attention",
19
- "full_attention",
20
- "full_attention",
21
- "full_attention",
22
- "full_attention",
23
- "full_attention",
24
- "full_attention",
25
- "full_attention",
26
- "full_attention",
27
- "full_attention",
28
- "full_attention",
29
- "full_attention",
30
- "full_attention",
31
- "full_attention",
32
- "full_attention",
33
- "full_attention",
34
- "full_attention",
35
- "full_attention",
36
- "full_attention",
37
- "full_attention",
38
- "full_attention",
39
- "full_attention",
40
- "full_attention",
41
- "full_attention"
42
- ],
43
- "max_position_embeddings": 32768,
44
- "max_window_layers": 28,
45
- "model_type": "qwen2",
46
- "num_attention_heads": 28,
47
- "num_hidden_layers": 28,
48
- "num_key_value_heads": 4,
49
- "pad_token_id": null,
50
- "rms_norm_eps": 1e-06,
51
- "rope_parameters": {
52
- "rope_theta": 1000000.0,
53
- "rope_type": "default"
54
- },
55
- "sliding_window": null,
56
- "tie_word_embeddings": false,
57
- "transformers_version": "5.0.0",
58
- "use_cache": true,
59
- "use_sliding_window": false,
60
- "vocab_size": 152064
61
- }
 
1
  {
2
+ "architectures": [
3
+ "Qwen2ForCausalLM"
4
+ ],
5
+ "attention_dropout": 0.0,
6
+ "bos_token_id": null,
7
+ "torch_dtype": "float16",
8
+ "eos_token_id": 151645,
9
+ "hidden_act": "silu",
10
+ "hidden_size": 3584,
11
+ "initializer_range": 0.02,
12
+ "intermediate_size": 18944,
13
+ "layer_types": [
14
+ "full_attention",
15
+ "full_attention",
16
+ "full_attention",
17
+ "full_attention",
18
+ "full_attention",
19
+ "full_attention",
20
+ "full_attention",
21
+ "full_attention",
22
+ "full_attention",
23
+ "full_attention",
24
+ "full_attention",
25
+ "full_attention",
26
+ "full_attention",
27
+ "full_attention",
28
+ "full_attention",
29
+ "full_attention",
30
+ "full_attention",
31
+ "full_attention",
32
+ "full_attention",
33
+ "full_attention",
34
+ "full_attention",
35
+ "full_attention",
36
+ "full_attention",
37
+ "full_attention",
38
+ "full_attention",
39
+ "full_attention",
40
+ "full_attention",
41
+ "full_attention"
42
+ ],
43
+ "max_position_embeddings": 32768,
44
+ "max_window_layers": 28,
45
+ "model_type": "qwen2",
46
+ "num_attention_heads": 28,
47
+ "num_hidden_layers": 28,
48
+ "num_key_value_heads": 4,
49
+ "pad_token_id": 151643,
50
+ "rms_norm_eps": 1e-06,
51
+ "rope_parameters": {
52
+ "rope_theta": 1000000.0,
53
+ "rope_type": "default"
54
+ },
55
+ "sliding_window": null,
56
+ "tie_word_embeddings": false,
57
+ "unsloth_version": "2026.8.16",
58
+ "use_cache": true,
59
+ "use_sliding_window": false,
60
+ "vocab_size": 152064
61
+ }
generation_config.json CHANGED
@@ -1,14 +1,14 @@
1
  {
2
- "bos_token_id": 151643,
3
- "pad_token_id": 151643,
4
  "do_sample": true,
5
  "eos_token_id": [
6
  151645,
7
  151643
8
  ],
 
 
9
  "repetition_penalty": 1.05,
10
  "temperature": 0.7,
11
- "top_p": 0.8,
12
  "top_k": 20,
13
- "transformers_version": "4.37.0"
 
14
  }
 
1
  {
 
 
2
  "do_sample": true,
3
  "eos_token_id": [
4
  151645,
5
  151643
6
  ],
7
+ "max_length": 32768,
8
+ "pad_token_id": 151643,
9
  "repetition_penalty": 1.05,
10
  "temperature": 0.7,
 
11
  "top_k": 20,
12
+ "top_p": 0.8,
13
+ "transformers_version": "5.5.0"
14
  }
tokenizer.json CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:c0382117ea329cdf097041132f6d735924b697924d6f6fc3945713e96ce87539
3
- size 7031645
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6b4360dd6a184650ffc48056c2569bc603f896c5adfe94b10f1c79f809638aa5
3
+ size 11422166
tokenizer_config.json CHANGED
@@ -1,207 +1,209 @@
1
  {
2
- "add_bos_token": false,
3
  "add_prefix_space": false,
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4
  "added_tokens_decoder": {
5
  "151643": {
6
  "content": "<|endoftext|>",
 
7
  "lstrip": false,
8
- "normalized": false,
9
  "rstrip": false,
10
- "single_word": false,
11
  "special": true
12
  },
13
  "151644": {
14
  "content": "<|im_start|>",
 
15
  "lstrip": false,
16
- "normalized": false,
17
  "rstrip": false,
18
- "single_word": false,
19
  "special": true
20
  },
21
  "151645": {
22
  "content": "<|im_end|>",
 
23
  "lstrip": false,
24
- "normalized": false,
25
  "rstrip": false,
26
- "single_word": false,
27
  "special": true
28
  },
29
  "151646": {
30
  "content": "<|object_ref_start|>",
 
31
  "lstrip": false,
32
- "normalized": false,
33
  "rstrip": false,
34
- "single_word": false,
35
  "special": true
36
  },
37
  "151647": {
38
  "content": "<|object_ref_end|>",
 
39
  "lstrip": false,
40
- "normalized": false,
41
  "rstrip": false,
42
- "single_word": false,
43
  "special": true
44
  },
45
  "151648": {
46
  "content": "<|box_start|>",
 
47
  "lstrip": false,
48
- "normalized": false,
49
  "rstrip": false,
50
- "single_word": false,
51
  "special": true
52
  },
53
  "151649": {
54
  "content": "<|box_end|>",
 
55
  "lstrip": false,
56
- "normalized": false,
57
  "rstrip": false,
58
- "single_word": false,
59
  "special": true
60
  },
61
  "151650": {
62
  "content": "<|quad_start|>",
 
63
  "lstrip": false,
64
- "normalized": false,
65
  "rstrip": false,
66
- "single_word": false,
67
  "special": true
68
  },
69
  "151651": {
70
  "content": "<|quad_end|>",
 
71
  "lstrip": false,
72
- "normalized": false,
73
  "rstrip": false,
74
- "single_word": false,
75
  "special": true
76
  },
77
  "151652": {
78
  "content": "<|vision_start|>",
 
79
  "lstrip": false,
80
- "normalized": false,
81
  "rstrip": false,
82
- "single_word": false,
83
  "special": true
84
  },
85
  "151653": {
86
  "content": "<|vision_end|>",
 
87
  "lstrip": false,
88
- "normalized": false,
89
  "rstrip": false,
90
- "single_word": false,
91
  "special": true
92
  },
93
  "151654": {
94
  "content": "<|vision_pad|>",
 
95
  "lstrip": false,
96
- "normalized": false,
97
  "rstrip": false,
98
- "single_word": false,
99
  "special": true
100
  },
101
  "151655": {
102
  "content": "<|image_pad|>",
 
103
  "lstrip": false,
104
- "normalized": false,
105
  "rstrip": false,
106
- "single_word": false,
107
  "special": true
108
  },
109
  "151656": {
110
  "content": "<|video_pad|>",
 
111
  "lstrip": false,
112
- "normalized": false,
113
  "rstrip": false,
114
- "single_word": false,
115
  "special": true
116
  },
117
  "151657": {
118
  "content": "<tool_call>",
 
119
  "lstrip": false,
120
- "normalized": false,
121
  "rstrip": false,
122
- "single_word": false,
123
  "special": false
124
  },
125
  "151658": {
126
  "content": "</tool_call>",
 
127
  "lstrip": false,
128
- "normalized": false,
129
  "rstrip": false,
130
- "single_word": false,
131
  "special": false
132
  },
133
  "151659": {
134
  "content": "<|fim_prefix|>",
 
135
  "lstrip": false,
136
- "normalized": false,
137
  "rstrip": false,
138
- "single_word": false,
139
  "special": false
140
  },
141
  "151660": {
142
  "content": "<|fim_middle|>",
 
143
  "lstrip": false,
144
- "normalized": false,
145
  "rstrip": false,
146
- "single_word": false,
147
  "special": false
148
  },
149
  "151661": {
150
  "content": "<|fim_suffix|>",
 
151
  "lstrip": false,
152
- "normalized": false,
153
  "rstrip": false,
154
- "single_word": false,
155
  "special": false
156
  },
157
  "151662": {
158
  "content": "<|fim_pad|>",
 
159
  "lstrip": false,
160
- "normalized": false,
161
  "rstrip": false,
162
- "single_word": false,
163
  "special": false
164
  },
165
  "151663": {
166
  "content": "<|repo_name|>",
 
167
  "lstrip": false,
168
- "normalized": false,
169
  "rstrip": false,
170
- "single_word": false,
171
  "special": false
172
  },
173
  "151664": {
174
  "content": "<|file_sep|>",
 
175
  "lstrip": false,
176
- "normalized": false,
177
  "rstrip": false,
178
- "single_word": false,
179
  "special": false
180
  }
181
  },
182
- "additional_special_tokens": [
183
- "<|im_start|>",
184
- "<|im_end|>",
185
- "<|object_ref_start|>",
186
- "<|object_ref_end|>",
187
- "<|box_start|>",
188
- "<|box_end|>",
189
- "<|quad_start|>",
190
- "<|quad_end|>",
191
- "<|vision_start|>",
192
- "<|vision_end|>",
193
- "<|vision_pad|>",
194
- "<|image_pad|>",
195
- "<|video_pad|>"
196
- ],
197
- "bos_token": null,
198
- "chat_template": "{%- if tools %}\n {{- '<|im_start|>system\\n' }}\n {%- if messages[0]['role'] == 'system' %}\n {{- messages[0]['content'] }}\n {%- else %}\n {{- 'You are Qwen, created by Alibaba Cloud. You are a helpful assistant.' }}\n {%- endif %}\n {{- \"\\n\\n# Tools\\n\\nYou may call one or more functions to assist with the user query.\\n\\nYou are provided with function signatures within <tools></tools> XML tags:\\n<tools>\" }}\n {%- for tool in tools %}\n {{- \"\\n\" }}\n {{- tool | tojson }}\n {%- endfor %}\n {{- \"\\n</tools>\\n\\nFor each function call, return a json object with function name and arguments within <tool_call></tool_call> XML tags:\\n<tool_call>\\n{\\\"name\\\": <function-name>, \\\"arguments\\\": <args-json-object>}\\n</tool_call><|im_end|>\\n\" }}\n{%- else %}\n {%- if messages[0]['role'] == 'system' %}\n {{- '<|im_start|>system\\n' + messages[0]['content'] + '<|im_end|>\\n' }}\n {%- else %}\n {{- '<|im_start|>system\\nYou are Qwen, created by Alibaba Cloud. You are a helpful assistant.<|im_end|>\\n' }}\n {%- endif %}\n{%- endif %}\n{%- for message in messages %}\n {%- if (message.role == \"user\") or (message.role == \"system\" and not loop.first) or (message.role == \"assistant\" and not message.tool_calls) %}\n {{- '<|im_start|>' + message.role + '\\n' + message.content + '<|im_end|>' + '\\n' }}\n {%- elif message.role == \"assistant\" %}\n {{- '<|im_start|>' + message.role }}\n {%- if message.content %}\n {{- '\\n' + message.content }}\n {%- endif %}\n {%- for tool_call in message.tool_calls %}\n {%- if tool_call.function is defined %}\n {%- set tool_call = tool_call.function %}\n {%- endif %}\n {{- '\\n<tool_call>\\n{\"name\": \"' }}\n {{- tool_call.name }}\n {{- '\", \"arguments\": ' }}\n {{- tool_call.arguments | tojson }}\n {{- '}\\n</tool_call>' }}\n {%- endfor %}\n {{- '<|im_end|>\\n' }}\n {%- elif message.role == \"tool\" %}\n {%- if (loop.index0 == 0) or (messages[loop.index0 - 1].role != \"tool\") %}\n {{- '<|im_start|>user' }}\n {%- endif %}\n {{- '\\n<tool_response>\\n' }}\n {{- message.content }}\n {{- '\\n</tool_response>' }}\n {%- if loop.last or (messages[loop.index0 + 1].role != \"tool\") %}\n {{- '<|im_end|>\\n' }}\n {%- endif %}\n {%- endif %}\n{%- endfor %}\n{%- if add_generation_prompt %}\n {{- '<|im_start|>assistant\\n' }}\n{%- endif %}\n",
199
- "clean_up_tokenization_spaces": false,
200
- "eos_token": "<|im_end|>",
201
- "errors": "replace",
202
- "model_max_length": 131072,
203
- "pad_token": "<|endoftext|>",
204
- "split_special_tokens": false,
205
- "tokenizer_class": "Qwen2Tokenizer",
206
- "unk_token": null
207
  }
 
1
  {
 
2
  "add_prefix_space": false,
3
+ "backend": "tokenizers",
4
+ "bos_token": null,
5
+ "clean_up_tokenization_spaces": false,
6
+ "eos_token": "<|im_end|>",
7
+ "errors": "replace",
8
+ "extra_special_tokens": [
9
+ "<|im_start|>",
10
+ "<|im_end|>",
11
+ "<|object_ref_start|>",
12
+ "<|object_ref_end|>",
13
+ "<|box_start|>",
14
+ "<|box_end|>",
15
+ "<|quad_start|>",
16
+ "<|quad_end|>",
17
+ "<|vision_start|>",
18
+ "<|vision_end|>",
19
+ "<|vision_pad|>",
20
+ "<|image_pad|>",
21
+ "<|video_pad|>"
22
+ ],
23
+ "is_local": false,
24
+ "model_max_length": 32768,
25
+ "pad_token": "<|endoftext|>",
26
+ "padding_side": "left",
27
+ "split_special_tokens": false,
28
+ "tokenizer_class": "Qwen2Tokenizer",
29
+ "unk_token": null,
30
  "added_tokens_decoder": {
31
  "151643": {
32
  "content": "<|endoftext|>",
33
+ "single_word": false,
34
  "lstrip": false,
 
35
  "rstrip": false,
36
+ "normalized": false,
37
  "special": true
38
  },
39
  "151644": {
40
  "content": "<|im_start|>",
41
+ "single_word": false,
42
  "lstrip": false,
 
43
  "rstrip": false,
44
+ "normalized": false,
45
  "special": true
46
  },
47
  "151645": {
48
  "content": "<|im_end|>",
49
+ "single_word": false,
50
  "lstrip": false,
 
51
  "rstrip": false,
52
+ "normalized": false,
53
  "special": true
54
  },
55
  "151646": {
56
  "content": "<|object_ref_start|>",
57
+ "single_word": false,
58
  "lstrip": false,
 
59
  "rstrip": false,
60
+ "normalized": false,
61
  "special": true
62
  },
63
  "151647": {
64
  "content": "<|object_ref_end|>",
65
+ "single_word": false,
66
  "lstrip": false,
 
67
  "rstrip": false,
68
+ "normalized": false,
69
  "special": true
70
  },
71
  "151648": {
72
  "content": "<|box_start|>",
73
+ "single_word": false,
74
  "lstrip": false,
 
75
  "rstrip": false,
76
+ "normalized": false,
77
  "special": true
78
  },
79
  "151649": {
80
  "content": "<|box_end|>",
81
+ "single_word": false,
82
  "lstrip": false,
 
83
  "rstrip": false,
84
+ "normalized": false,
85
  "special": true
86
  },
87
  "151650": {
88
  "content": "<|quad_start|>",
89
+ "single_word": false,
90
  "lstrip": false,
 
91
  "rstrip": false,
92
+ "normalized": false,
93
  "special": true
94
  },
95
  "151651": {
96
  "content": "<|quad_end|>",
97
+ "single_word": false,
98
  "lstrip": false,
 
99
  "rstrip": false,
100
+ "normalized": false,
101
  "special": true
102
  },
103
  "151652": {
104
  "content": "<|vision_start|>",
105
+ "single_word": false,
106
  "lstrip": false,
 
107
  "rstrip": false,
108
+ "normalized": false,
109
  "special": true
110
  },
111
  "151653": {
112
  "content": "<|vision_end|>",
113
+ "single_word": false,
114
  "lstrip": false,
 
115
  "rstrip": false,
116
+ "normalized": false,
117
  "special": true
118
  },
119
  "151654": {
120
  "content": "<|vision_pad|>",
121
+ "single_word": false,
122
  "lstrip": false,
 
123
  "rstrip": false,
124
+ "normalized": false,
125
  "special": true
126
  },
127
  "151655": {
128
  "content": "<|image_pad|>",
129
+ "single_word": false,
130
  "lstrip": false,
 
131
  "rstrip": false,
132
+ "normalized": false,
133
  "special": true
134
  },
135
  "151656": {
136
  "content": "<|video_pad|>",
137
+ "single_word": false,
138
  "lstrip": false,
 
139
  "rstrip": false,
140
+ "normalized": false,
141
  "special": true
142
  },
143
  "151657": {
144
  "content": "<tool_call>",
145
+ "single_word": false,
146
  "lstrip": false,
 
147
  "rstrip": false,
148
+ "normalized": false,
149
  "special": false
150
  },
151
  "151658": {
152
  "content": "</tool_call>",
153
+ "single_word": false,
154
  "lstrip": false,
 
155
  "rstrip": false,
156
+ "normalized": false,
157
  "special": false
158
  },
159
  "151659": {
160
  "content": "<|fim_prefix|>",
161
+ "single_word": false,
162
  "lstrip": false,
 
163
  "rstrip": false,
164
+ "normalized": false,
165
  "special": false
166
  },
167
  "151660": {
168
  "content": "<|fim_middle|>",
169
+ "single_word": false,
170
  "lstrip": false,
 
171
  "rstrip": false,
172
+ "normalized": false,
173
  "special": false
174
  },
175
  "151661": {
176
  "content": "<|fim_suffix|>",
177
+ "single_word": false,
178
  "lstrip": false,
 
179
  "rstrip": false,
180
+ "normalized": false,
181
  "special": false
182
  },
183
  "151662": {
184
  "content": "<|fim_pad|>",
185
+ "single_word": false,
186
  "lstrip": false,
 
187
  "rstrip": false,
188
+ "normalized": false,
189
  "special": false
190
  },
191
  "151663": {
192
  "content": "<|repo_name|>",
193
+ "single_word": false,
194
  "lstrip": false,
 
195
  "rstrip": false,
196
+ "normalized": false,
197
  "special": false
198
  },
199
  "151664": {
200
  "content": "<|file_sep|>",
201
+ "single_word": false,
202
  "lstrip": false,
 
203
  "rstrip": false,
204
+ "normalized": false,
205
  "special": false
206
  }
207
  },
208
+ "chat_template": "{%- if tools %}\n {{- '<|im_start|>system\\n' }}\n {%- if messages[0]['role'] == 'system' %}\n {{- messages[0]['content'] }}\n {%- else %}\n {{- 'You are Qwen, created by Alibaba Cloud. You are a helpful assistant.' }}\n {%- endif %}\n {{- \"\\n\\n# Tools\\n\\nYou may call one or more functions to assist with the user query.\\n\\nYou are provided with function signatures within <tools></tools> XML tags:\\n<tools>\" }}\n {%- for tool in tools %}\n {{- \"\\n\" }}\n {{- tool | tojson }}\n {%- endfor %}\n {{- \"\\n</tools>\\n\\nFor each function call, return a json object with function name and arguments within <tool_call></tool_call> XML tags:\\n<tool_call>\\n{\\\"name\\\": <function-name>, \\\"arguments\\\": <args-json-object>}\\n</tool_call><|im_end|>\\n\" }}\n{%- else %}\n {%- if messages[0]['role'] == 'system' %}\n {{- '<|im_start|>system\\n' + messages[0]['content'] + '<|im_end|>\\n' }}\n {%- else %}\n {{- '<|im_start|>system\\nYou are Qwen, created by Alibaba Cloud. You are a helpful assistant.<|im_end|>\\n' }}\n {%- endif %}\n{%- endif %}\n{%- for message in messages %}\n {%- if (message.role == \"user\") or (message.role == \"system\" and not loop.first) or (message.role == \"assistant\" and not message.tool_calls) %}\n {{- '<|im_start|>' + message.role + '\\n' + message.content + '<|im_end|>' + '\\n' }}\n {%- elif message.role == \"assistant\" %}\n {{- '<|im_start|>' + message.role }}\n {%- if message.content %}\n {{- '\\n' + message.content }}\n {%- endif %}\n {%- for tool_call in message.tool_calls %}\n {%- if tool_call.function is defined %}\n {%- set tool_call = tool_call.function %}\n {%- endif %}\n {{- '\\n<tool_call>\\n{\"name\": \"' }}\n {{- tool_call.name }}\n {{- '\", \"arguments\": ' }}\n {{- tool_call.arguments | tojson }}\n {{- '}\\n</tool_call>' }}\n {%- endfor %}\n {{- '<|im_end|>\\n' }}\n {%- elif message.role == \"tool\" %}\n {%- if (loop.index0 == 0) or (messages[loop.index0 - 1].role != \"tool\") %} {{- '<|im_start|>user' }}\n {%- endif %}\n {{- '\\n<tool_response>\\n' }}\n {{- message.content }}\n {{- '\\n</tool_response>' }}\n {%- if loop.last or (messages[loop.index0 + 1].role != \"tool\") %}\n {{- '<|im_end|>\\n' }}\n {%- endif %}\n {%- endif %}\n{%- endfor %}\n{%- if add_generation_prompt %}\n {{- '<|im_start|>assistant\\n' }}\n{%- endif %}\n"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
209
  }