Files changed (4) hide show
  1. config.json +1 -2
  2. generation_config.json +15 -0
  3. tokenizer.json +38 -39
  4. tokenizer_config.json +2 -2
config.json CHANGED
@@ -1,5 +1,4 @@
1
  {
2
- "_name_or_path": "Qwen/Qwen2.5-Coder-7B",
3
  "architectures": [
4
  "Qwen2ForCausalLM"
5
  ],
@@ -18,7 +17,7 @@
18
  "num_key_value_heads": 4,
19
  "rms_norm_eps": 1e-06,
20
  "rope_theta": 1000000.0,
21
- "sliding_window": null,
22
  "tie_word_embeddings": false,
23
  "torch_dtype": "bfloat16",
24
  "transformers_version": "4.44.0",
 
1
  {
 
2
  "architectures": [
3
  "Qwen2ForCausalLM"
4
  ],
 
17
  "num_key_value_heads": 4,
18
  "rms_norm_eps": 1e-06,
19
  "rope_theta": 1000000.0,
20
+ "sliding_window": 131072,
21
  "tie_word_embeddings": false,
22
  "torch_dtype": "bfloat16",
23
  "transformers_version": "4.44.0",
generation_config.json ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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.1,
10
+ "temperature": 0.7,
11
+ "top_p": 0.8,
12
+ "top_k": 20,
13
+ "transformers_version": "4.37.0"
14
+ }
15
+
tokenizer.json CHANGED
@@ -33,172 +33,172 @@
33
  {
34
  "id": 151646,
35
  "content": "<|object_ref_start|>",
36
- "single_word": false,
37
  "lstrip": false,
38
  "rstrip": false,
39
- "normalized": false,
40
  "special": true
41
  },
42
  {
43
  "id": 151647,
44
  "content": "<|object_ref_end|>",
45
- "single_word": false,
46
  "lstrip": false,
47
  "rstrip": false,
48
- "normalized": false,
49
  "special": true
50
  },
51
  {
52
  "id": 151648,
53
  "content": "<|box_start|>",
54
- "single_word": false,
55
  "lstrip": false,
56
  "rstrip": false,
57
- "normalized": false,
58
  "special": true
59
  },
60
  {
61
  "id": 151649,
62
  "content": "<|box_end|>",
63
- "single_word": false,
64
  "lstrip": false,
65
  "rstrip": false,
66
- "normalized": false,
67
  "special": true
68
  },
69
  {
70
  "id": 151650,
71
  "content": "<|quad_start|>",
72
- "single_word": false,
73
  "lstrip": false,
74
  "rstrip": false,
75
- "normalized": false,
76
  "special": true
77
  },
78
  {
79
  "id": 151651,
80
  "content": "<|quad_end|>",
81
- "single_word": false,
82
  "lstrip": false,
83
  "rstrip": false,
84
- "normalized": false,
85
  "special": true
86
  },
87
  {
88
  "id": 151652,
89
  "content": "<|vision_start|>",
90
- "single_word": false,
91
  "lstrip": false,
92
  "rstrip": false,
93
- "normalized": false,
94
  "special": true
95
  },
96
  {
97
  "id": 151653,
98
  "content": "<|vision_end|>",
99
- "single_word": false,
100
  "lstrip": false,
101
  "rstrip": false,
102
- "normalized": false,
103
  "special": true
104
  },
105
  {
106
  "id": 151654,
107
  "content": "<|vision_pad|>",
108
- "single_word": false,
109
  "lstrip": false,
110
  "rstrip": false,
111
- "normalized": false,
112
  "special": true
113
  },
114
  {
115
  "id": 151655,
116
  "content": "<|image_pad|>",
117
- "single_word": false,
118
  "lstrip": false,
119
  "rstrip": false,
120
- "normalized": false,
121
  "special": true
122
  },
123
  {
124
  "id": 151656,
125
  "content": "<|video_pad|>",
126
- "single_word": false,
127
  "lstrip": false,
128
  "rstrip": false,
129
- "normalized": false,
130
  "special": true
131
  },
132
  {
133
  "id": 151657,
134
  "content": "<tool_call>",
135
- "single_word": false,
136
  "lstrip": false,
137
- "rstrip": false,
138
  "normalized": false,
 
 
139
  "special": false
140
  },
141
  {
142
  "id": 151658,
143
  "content": "</tool_call>",
144
- "single_word": false,
145
  "lstrip": false,
146
- "rstrip": false,
147
  "normalized": false,
 
 
148
  "special": false
149
  },
150
  {
151
  "id": 151659,
152
  "content": "<|fim_prefix|>",
153
- "single_word": false,
154
  "lstrip": false,
155
- "rstrip": false,
156
  "normalized": false,
 
 
157
  "special": false
158
  },
159
  {
160
  "id": 151660,
161
  "content": "<|fim_middle|>",
162
- "single_word": false,
163
  "lstrip": false,
164
- "rstrip": false,
165
  "normalized": false,
 
 
166
  "special": false
167
  },
168
  {
169
  "id": 151661,
170
  "content": "<|fim_suffix|>",
171
- "single_word": false,
172
  "lstrip": false,
173
- "rstrip": false,
174
  "normalized": false,
 
 
175
  "special": false
176
  },
177
  {
178
  "id": 151662,
179
  "content": "<|fim_pad|>",
180
- "single_word": false,
181
  "lstrip": false,
182
- "rstrip": false,
183
  "normalized": false,
 
 
184
  "special": false
185
  },
186
  {
187
  "id": 151663,
188
  "content": "<|repo_name|>",
189
- "single_word": false,
190
  "lstrip": false,
191
- "rstrip": false,
192
  "normalized": false,
 
 
193
  "special": false
194
  },
195
  {
196
  "id": 151664,
197
  "content": "<|file_sep|>",
198
- "single_word": false,
199
  "lstrip": false,
200
- "rstrip": false,
201
  "normalized": false,
 
 
202
  "special": false
203
  }
204
  ],
@@ -244,7 +244,6 @@
244
  "end_of_word_suffix": "",
245
  "fuse_unk": false,
246
  "byte_fallback": false,
247
- "ignore_merges": false,
248
  "vocab": {
249
  "!": 0,
250
  "\"": 1,
 
33
  {
34
  "id": 151646,
35
  "content": "<|object_ref_start|>",
36
+ "normalized": false,
37
  "lstrip": false,
38
  "rstrip": false,
39
+ "single_word": false,
40
  "special": true
41
  },
42
  {
43
  "id": 151647,
44
  "content": "<|object_ref_end|>",
45
+ "normalized": false,
46
  "lstrip": false,
47
  "rstrip": false,
48
+ "single_word": false,
49
  "special": true
50
  },
51
  {
52
  "id": 151648,
53
  "content": "<|box_start|>",
54
+ "normalized": false,
55
  "lstrip": false,
56
  "rstrip": false,
57
+ "single_word": false,
58
  "special": true
59
  },
60
  {
61
  "id": 151649,
62
  "content": "<|box_end|>",
63
+ "normalized": false,
64
  "lstrip": false,
65
  "rstrip": false,
66
+ "single_word": false,
67
  "special": true
68
  },
69
  {
70
  "id": 151650,
71
  "content": "<|quad_start|>",
72
+ "normalized": false,
73
  "lstrip": false,
74
  "rstrip": false,
75
+ "single_word": false,
76
  "special": true
77
  },
78
  {
79
  "id": 151651,
80
  "content": "<|quad_end|>",
81
+ "normalized": false,
82
  "lstrip": false,
83
  "rstrip": false,
84
+ "single_word": false,
85
  "special": true
86
  },
87
  {
88
  "id": 151652,
89
  "content": "<|vision_start|>",
90
+ "normalized": false,
91
  "lstrip": false,
92
  "rstrip": false,
93
+ "single_word": false,
94
  "special": true
95
  },
96
  {
97
  "id": 151653,
98
  "content": "<|vision_end|>",
99
+ "normalized": false,
100
  "lstrip": false,
101
  "rstrip": false,
102
+ "single_word": false,
103
  "special": true
104
  },
105
  {
106
  "id": 151654,
107
  "content": "<|vision_pad|>",
108
+ "normalized": false,
109
  "lstrip": false,
110
  "rstrip": false,
111
+ "single_word": false,
112
  "special": true
113
  },
114
  {
115
  "id": 151655,
116
  "content": "<|image_pad|>",
117
+ "normalized": false,
118
  "lstrip": false,
119
  "rstrip": false,
120
+ "single_word": false,
121
  "special": true
122
  },
123
  {
124
  "id": 151656,
125
  "content": "<|video_pad|>",
126
+ "normalized": false,
127
  "lstrip": false,
128
  "rstrip": false,
129
+ "single_word": false,
130
  "special": true
131
  },
132
  {
133
  "id": 151657,
134
  "content": "<tool_call>",
 
135
  "lstrip": false,
 
136
  "normalized": false,
137
+ "rstrip": false,
138
+ "single_word": false,
139
  "special": false
140
  },
141
  {
142
  "id": 151658,
143
  "content": "</tool_call>",
 
144
  "lstrip": false,
 
145
  "normalized": false,
146
+ "rstrip": false,
147
+ "single_word": false,
148
  "special": false
149
  },
150
  {
151
  "id": 151659,
152
  "content": "<|fim_prefix|>",
 
153
  "lstrip": false,
 
154
  "normalized": false,
155
+ "rstrip": false,
156
+ "single_word": false,
157
  "special": false
158
  },
159
  {
160
  "id": 151660,
161
  "content": "<|fim_middle|>",
 
162
  "lstrip": false,
 
163
  "normalized": false,
164
+ "rstrip": false,
165
+ "single_word": false,
166
  "special": false
167
  },
168
  {
169
  "id": 151661,
170
  "content": "<|fim_suffix|>",
 
171
  "lstrip": false,
 
172
  "normalized": false,
173
+ "rstrip": false,
174
+ "single_word": false,
175
  "special": false
176
  },
177
  {
178
  "id": 151662,
179
  "content": "<|fim_pad|>",
 
180
  "lstrip": false,
 
181
  "normalized": false,
182
+ "rstrip": false,
183
+ "single_word": false,
184
  "special": false
185
  },
186
  {
187
  "id": 151663,
188
  "content": "<|repo_name|>",
 
189
  "lstrip": false,
 
190
  "normalized": false,
191
+ "rstrip": false,
192
+ "single_word": false,
193
  "special": false
194
  },
195
  {
196
  "id": 151664,
197
  "content": "<|file_sep|>",
 
198
  "lstrip": false,
 
199
  "normalized": false,
200
+ "rstrip": false,
201
+ "single_word": false,
202
  "special": false
203
  }
204
  ],
 
244
  "end_of_word_suffix": "",
245
  "fuse_unk": false,
246
  "byte_fallback": false,
 
247
  "vocab": {
248
  "!": 0,
249
  "\"": 1,
tokenizer_config.json CHANGED
@@ -197,11 +197,11 @@
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": "<|endoftext|>",
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
- }
 
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
+ }