yasmineee commited on
Commit
f27fda3
·
verified ·
1 Parent(s): cd096a5

(Trained with Unsloth)

Browse files
added_tokens.json ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "</tool_call>": 151658,
3
+ "<tool_call>": 151657,
4
+ "<|box_end|>": 151649,
5
+ "<|box_start|>": 151648,
6
+ "<|endoftext|>": 151643,
7
+ "<|file_sep|>": 151664,
8
+ "<|fim_middle|>": 151660,
9
+ "<|fim_pad|>": 151662,
10
+ "<|fim_prefix|>": 151659,
11
+ "<|fim_suffix|>": 151661,
12
+ "<|im_end|>": 151645,
13
+ "<|im_start|>": 151644,
14
+ "<|image_pad|>": 151655,
15
+ "<|object_ref_end|>": 151647,
16
+ "<|object_ref_start|>": 151646,
17
+ "<|quad_end|>": 151651,
18
+ "<|quad_start|>": 151650,
19
+ "<|repo_name|>": 151663,
20
+ "<|video_pad|>": 151656,
21
+ "<|vision_end|>": 151653,
22
+ "<|vision_pad|>": 151654,
23
+ "<|vision_start|>": 151652
24
+ }
chat_template.jinja CHANGED
@@ -1 +1,54 @@
1
- {% if not add_generation_prompt is defined %}{% set add_generation_prompt = false %}{% endif %}{% set ns = namespace(is_first=false, is_tool=false, is_output_first=true, system_prompt='') %}{%- for message in messages %}{%- if message['role'] == 'system' %}{% set ns.system_prompt = message['content'] %}{%- endif %}{%- endfor %}{{bos_token}}{{ns.system_prompt}}{%- for message in messages %}{%- if message['role'] == 'user' %}{%- set ns.is_tool = false -%}{{'<|User|>' + message['content']}}{%- endif %}{%- if message['role'] == 'assistant' and message['content'] is none %}{%- set ns.is_tool = false -%}{%- for tool in message['tool_calls']%}{%- if not ns.is_first %}{{'<|Assistant|><|tool▁calls▁begin|><|tool▁call▁begin|>' + tool['type'] + '<|tool▁sep|>' + tool['function']['name'] + '\n' + '```json' + '\n' + tool['function']['arguments'] + '\n' + '```' + '<|tool▁call▁end|>'}}{%- set ns.is_first = true -%}{%- else %}{{'\n' + '<|tool▁call▁begin|>' + tool['type'] + '<|tool▁sep|>' + tool['function']['name'] + '\n' + '```json' + '\n' + tool['function']['arguments'] + '\n' + '```' + '<|tool▁call▁end|>'}}{{'<|tool▁calls▁end|><|end▁of▁sentence|>'}}{%- endif %}{%- endfor %}{%- endif %}{%- if message['role'] == 'assistant' and message['content'] is not none %}{%- if ns.is_tool %}{{'<|tool▁outputs▁end|>' + message['content'] + '<|end▁of▁sentence|>'}}{%- set ns.is_tool = false -%}{%- else %}{% set content = message['content'] %}{% if '</think>' in content %}{% set content = content.split('</think>')[-1] %}{% endif %}{{'<|Assistant|>' + content + '<|end▁of▁sentence|>'}}{%- endif %}{%- endif %}{%- if message['role'] == 'tool' %}{%- set ns.is_tool = true -%}{%- if ns.is_output_first %}{{'<|tool▁outputs▁begin|><|tool▁output▁begin|>' + message['content'] + '<|tool▁output▁end|>'}}{%- set ns.is_output_first = false %}{%- else %}{{'\n<|tool▁output▁begin|>' + message['content'] + '<|tool▁output▁end|>'}}{%- endif %}{%- endif %}{%- endfor -%}{% if ns.is_tool %}{{'<|tool▁outputs▁end|>'}}{% endif %}{% if add_generation_prompt and not ns.is_tool %}{{'<|Assistant|><think>\n'}}{% endif %}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {%- if tools %}
2
+ {{- '<|im_start|>system\n' }}
3
+ {%- if messages[0]['role'] == 'system' %}
4
+ {{- messages[0]['content'] }}
5
+ {%- else %}
6
+ {{- 'You are Qwen, created by Alibaba Cloud. You are a helpful assistant.' }}
7
+ {%- endif %}
8
+ {{- "\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>" }}
9
+ {%- for tool in tools %}
10
+ {{- "\n" }}
11
+ {{- tool | tojson }}
12
+ {%- endfor %}
13
+ {{- "\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" }}
14
+ {%- else %}
15
+ {%- if messages[0]['role'] == 'system' %}
16
+ {{- '<|im_start|>system\n' + messages[0]['content'] + '<|im_end|>\n' }}
17
+ {%- else %}
18
+ {{- '<|im_start|>system\nYou are Qwen, created by Alibaba Cloud. You are a helpful assistant.<|im_end|>\n' }}
19
+ {%- endif %}
20
+ {%- endif %}
21
+ {%- for message in messages %}
22
+ {%- if (message.role == "user") or (message.role == "system" and not loop.first) or (message.role == "assistant" and not message.tool_calls) %}
23
+ {{- '<|im_start|>' + message.role + '\n' + message.content + '<|im_end|>' + '\n' }}
24
+ {%- elif message.role == "assistant" %}
25
+ {{- '<|im_start|>' + message.role }}
26
+ {%- if message.content %}
27
+ {{- '\n' + message.content }}
28
+ {%- endif %}
29
+ {%- for tool_call in message.tool_calls %}
30
+ {%- if tool_call.function is defined %}
31
+ {%- set tool_call = tool_call.function %}
32
+ {%- endif %}
33
+ {{- '\n<tool_call>\n{"name": "' }}
34
+ {{- tool_call.name }}
35
+ {{- '", "arguments": ' }}
36
+ {{- tool_call.arguments | tojson }}
37
+ {{- '}\n</tool_call>' }}
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 }}
46
+ {{- '\n</tool_response>' }}
47
+ {%- if loop.last or (messages[loop.index0 + 1].role != "tool") %}
48
+ {{- '<|im_end|>\n' }}
49
+ {%- endif %}
50
+ {%- endif %}
51
+ {%- endfor %}
52
+ {%- if add_generation_prompt %}
53
+ {{- '<|im_start|>assistant\n' }}
54
+ {%- endif %}
config.json CHANGED
@@ -3,12 +3,12 @@
3
  "Qwen2ForCausalLM"
4
  ],
5
  "attention_dropout": 0.0,
6
- "bos_token_id": 151646,
7
- "eos_token_id": 151643,
8
  "hidden_act": "silu",
9
- "hidden_size": 3584,
10
  "initializer_range": 0.02,
11
- "intermediate_size": 18944,
12
  "layer_types": [
13
  "full_attention",
14
  "full_attention",
@@ -33,30 +33,24 @@
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
  ],
42
- "max_position_embeddings": 131072,
43
- "max_window_layers": 28,
44
  "model_type": "qwen2",
45
- "num_attention_heads": 28,
46
- "num_hidden_layers": 28,
47
- "num_key_value_heads": 4,
48
- "pad_token_id": 151654,
49
  "rms_norm_eps": 1e-06,
50
  "rope_scaling": null,
51
- "rope_theta": 10000,
52
  "sliding_window": null,
53
- "tie_word_embeddings": false,
54
  "torch_dtype": "bfloat16",
55
  "transformers_version": "4.55.0",
56
- "unsloth_fixed": true,
57
- "unsloth_version": "2025.8.4",
58
  "use_cache": true,
59
- "use_mrope": false,
60
  "use_sliding_window": false,
61
- "vocab_size": 152064
62
  }
 
3
  "Qwen2ForCausalLM"
4
  ],
5
  "attention_dropout": 0.0,
6
+ "bos_token_id": 151643,
7
+ "eos_token_id": 151645,
8
  "hidden_act": "silu",
9
+ "hidden_size": 896,
10
  "initializer_range": 0.02,
11
+ "intermediate_size": 4864,
12
  "layer_types": [
13
  "full_attention",
14
  "full_attention",
 
33
  "full_attention",
34
  "full_attention",
35
  "full_attention",
 
 
 
 
36
  "full_attention"
37
  ],
38
+ "max_position_embeddings": 32768,
39
+ "max_window_layers": 21,
40
  "model_type": "qwen2",
41
+ "num_attention_heads": 14,
42
+ "num_hidden_layers": 24,
43
+ "num_key_value_heads": 2,
44
+ "pad_token_id": 151643,
45
  "rms_norm_eps": 1e-06,
46
  "rope_scaling": null,
47
+ "rope_theta": 1000000.0,
48
  "sliding_window": null,
49
+ "tie_word_embeddings": true,
50
  "torch_dtype": "bfloat16",
51
  "transformers_version": "4.55.0",
52
+ "unsloth_version": "2025.8.5",
 
53
  "use_cache": true,
 
54
  "use_sliding_window": false,
55
+ "vocab_size": 151936
56
  }
generation_config.json CHANGED
@@ -1,11 +1,15 @@
1
  {
2
- "_from_model_config": true,
3
- "bos_token_id": 151646,
4
  "do_sample": true,
5
- "eos_token_id": 151643,
6
- "max_length": 131072,
7
- "pad_token_id": 151654,
8
- "temperature": 0.6,
9
- "top_p": 0.95,
 
 
 
 
 
10
  "transformers_version": "4.55.0"
11
  }
 
1
  {
2
+ "bos_token_id": 151643,
 
3
  "do_sample": true,
4
+ "eos_token_id": [
5
+ 151645,
6
+ 151643
7
+ ],
8
+ "max_length": 32768,
9
+ "pad_token_id": 151643,
10
+ "repetition_penalty": 1.1,
11
+ "temperature": 0.7,
12
+ "top_k": 20,
13
+ "top_p": 0.8,
14
  "transformers_version": "4.55.0"
15
  }
merges.txt ADDED
The diff for this file is too large to render. See raw diff
 
special_tokens_map.json CHANGED
@@ -1,20 +1,28 @@
1
  {
2
- "bos_token": {
3
- "content": "<|begin▁of▁sentence|>",
4
- "lstrip": false,
5
- "normalized": false,
6
- "rstrip": false,
7
- "single_word": false
8
- },
 
 
 
 
 
 
 
 
9
  "eos_token": {
10
- "content": "<|end▁of▁sentence|>",
11
  "lstrip": false,
12
  "normalized": false,
13
  "rstrip": false,
14
  "single_word": false
15
  },
16
  "pad_token": {
17
- "content": "<|vision_pad|>",
18
  "lstrip": false,
19
  "normalized": false,
20
  "rstrip": false,
 
1
  {
2
+ "additional_special_tokens": [
3
+ "<|im_start|>",
4
+ "<|im_end|>",
5
+ "<|object_ref_start|>",
6
+ "<|object_ref_end|>",
7
+ "<|box_start|>",
8
+ "<|box_end|>",
9
+ "<|quad_start|>",
10
+ "<|quad_end|>",
11
+ "<|vision_start|>",
12
+ "<|vision_end|>",
13
+ "<|vision_pad|>",
14
+ "<|image_pad|>",
15
+ "<|video_pad|>"
16
+ ],
17
  "eos_token": {
18
+ "content": "<|im_end|>",
19
  "lstrip": false,
20
  "normalized": false,
21
  "rstrip": false,
22
  "single_word": false
23
  },
24
  "pad_token": {
25
+ "content": "<|endoftext|>",
26
  "lstrip": false,
27
  "normalized": false,
28
  "rstrip": false,
tokenizer.json CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:5d49e08c96fcd0fb570ca5259ffb933ce28eb5c68f2c28505ca4c1cf5d6b35fd
3
- size 11422877
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:145191e3b102f64e84dab1926006ee71528c1ea536df048ef9ff6c48d01f95de
3
+ size 11421995
tokenizer_config.json CHANGED
@@ -1,10 +1,9 @@
1
  {
2
- "add_bos_token": true,
3
- "add_eos_token": false,
4
- "add_prefix_space": null,
5
  "added_tokens_decoder": {
6
  "151643": {
7
- "content": "<|end▁of▁sentence|>",
8
  "lstrip": false,
9
  "normalized": false,
10
  "rstrip": false,
@@ -12,23 +11,23 @@
12
  "special": true
13
  },
14
  "151644": {
15
- "content": "<|User|>",
16
  "lstrip": false,
17
  "normalized": false,
18
  "rstrip": false,
19
  "single_word": false,
20
- "special": false
21
  },
22
  "151645": {
23
- "content": "<|Assistant|>",
24
  "lstrip": false,
25
  "normalized": false,
26
  "rstrip": false,
27
  "single_word": false,
28
- "special": false
29
  },
30
  "151646": {
31
- "content": "<|begin▁of▁sentence|>",
32
  "lstrip": false,
33
  "normalized": false,
34
  "rstrip": false,
@@ -36,28 +35,28 @@
36
  "special": true
37
  },
38
  "151647": {
39
- "content": "<|EOT|>",
40
  "lstrip": false,
41
  "normalized": false,
42
  "rstrip": false,
43
  "single_word": false,
44
- "special": false
45
  },
46
  "151648": {
47
- "content": "<think>",
48
  "lstrip": false,
49
  "normalized": false,
50
  "rstrip": false,
51
  "single_word": false,
52
- "special": false
53
  },
54
  "151649": {
55
- "content": "</think>",
56
  "lstrip": false,
57
  "normalized": false,
58
  "rstrip": false,
59
  "single_word": false,
60
- "special": false
61
  },
62
  "151650": {
63
  "content": "<|quad_start|>",
@@ -180,16 +179,30 @@
180
  "special": false
181
  }
182
  },
183
- "bos_token": "<|begin▁of▁sentence|>",
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
184
  "clean_up_tokenization_spaces": false,
185
- "eos_token": "<|end▁of▁sentence|>",
 
186
  "extra_special_tokens": {},
187
- "legacy": true,
188
- "model_max_length": 131072,
189
- "pad_token": "<|vision_pad|>",
190
  "padding_side": "right",
191
- "sp_model_kwargs": {},
192
- "tokenizer_class": "LlamaTokenizerFast",
193
- "unk_token": null,
194
- "use_default_system_prompt": false
195
  }
 
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,
 
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,
 
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|>",
 
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
  "clean_up_tokenization_spaces": false,
199
+ "eos_token": "<|im_end|>",
200
+ "errors": "replace",
201
  "extra_special_tokens": {},
202
+ "model_max_length": 32768,
203
+ "pad_token": "<|endoftext|>",
 
204
  "padding_side": "right",
205
+ "split_special_tokens": false,
206
+ "tokenizer_class": "Qwen2Tokenizer",
207
+ "unk_token": null
 
208
  }
vocab.json ADDED
The diff for this file is too large to render. See raw diff