ATL-Machine commited on
Commit
5c58877
·
verified ·
1 Parent(s): 5bb6da6

Upload model from script

Browse files
chat_template.jinja CHANGED
@@ -1,9 +1,7 @@
1
-
2
  {%- set has_system = messages and messages[0].role == 'system' and messages[0].content is string %}
3
  {%- if has_system %}
4
- {{- '<|im_start|>system\n' + messages[0].content + '<|im_end|>\n' }}
5
  {%- endif %}
6
-
7
  {%- if messages and messages[-1].role == 'assistant' %}
8
  {# Find the user message immediately before the last assistant (scan backwards skipping last). #}
9
  {%- set ns = namespace(seen_last=false, user_before_last_asst=none) %}
@@ -15,7 +13,7 @@
15
  {%- endif %}
16
  {%- endfor %}
17
  {%- if ns.user_before_last_asst is not none %}
18
- {{- '<|im_start|>user\n' + ns.user_before_last_asst + '<|im_end|>\n' }}
19
  {%- endif %}
20
 
21
  {%- set content = '' %}
@@ -32,11 +30,13 @@
32
  {%- endif %}
33
  {%- endif %}
34
  {%- if reasoning_content %}
35
- {{- '<|im_start|>assistant\n<think>\n' + reasoning_content.strip('\n') + '\n</think>\n\n' + content.lstrip('\n') + '<|im_end|>\n' }}
36
  {%- else %}
37
- {{- '<|im_start|>assistant\n' + content + '<|im_end|>\n' }}
38
  {%- endif %}
39
-
40
  {%- elif messages and messages[-1].role == 'user' and messages[-1].content is string %}
41
- {{- '<|im_start|>user\n' + messages[-1].content + '<|im_end|>\n<|im_start|>assistant\n' }}
 
 
 
42
  {%- endif %}
 
 
1
  {%- set has_system = messages and messages[0].role == 'system' and messages[0].content is string %}
2
  {%- if has_system %}
3
+ {{- '<|im_start|>system\n' + messages[0].content + '<|im_end|>\n' }}
4
  {%- endif %}
 
5
  {%- if messages and messages[-1].role == 'assistant' %}
6
  {# Find the user message immediately before the last assistant (scan backwards skipping last). #}
7
  {%- set ns = namespace(seen_last=false, user_before_last_asst=none) %}
 
13
  {%- endif %}
14
  {%- endfor %}
15
  {%- if ns.user_before_last_asst is not none %}
16
+ {{- '<|im_start|>user\n' + ns.user_before_last_asst + '<|im_end|>\n' }}
17
  {%- endif %}
18
 
19
  {%- set content = '' %}
 
30
  {%- endif %}
31
  {%- endif %}
32
  {%- if reasoning_content %}
33
+ {{- '<|im_start|>assistant\n<think>\n' + reasoning_content.strip('\n') + '\n</think>\n\n' + content.lstrip('\n') + '<|im_end|>\n' }}
34
  {%- else %}
35
+ {{- '<|im_start|>assistant\n' + content + '<|im_end|>\n' }}
36
  {%- endif %}
 
37
  {%- elif messages and messages[-1].role == 'user' and messages[-1].content is string %}
38
+ {{- '<|im_start|>user\n' + messages[-1].content + '<|im_end|>\n' }}
39
+ {%- endif %}
40
+ {%- if add_generation_prompt %}
41
+ {{- '<|im_start|>assistant\n' }}
42
  {%- endif %}
config.json CHANGED
@@ -1,69 +1,69 @@
1
  {
2
- "architectures": [
3
- "Qwen3ForCausalLM"
4
- ],
5
- "attention_bias": false,
6
- "attention_dropout": 0.0,
7
- "torch_dtype": "bfloat16",
8
- "eos_token_id": 151645,
9
- "head_dim": 128,
10
- "hidden_act": "silu",
11
- "hidden_size": 2560,
12
- "initializer_range": 0.02,
13
- "intermediate_size": 9728,
14
- "layer_types": [
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
- "full_attention",
43
- "full_attention",
44
- "full_attention",
45
- "full_attention",
46
- "full_attention",
47
- "full_attention",
48
- "full_attention",
49
- "full_attention",
50
- "full_attention"
51
- ],
52
- "max_position_embeddings": 262144,
53
- "max_window_layers": 36,
54
- "model_type": "qwen3",
55
- "num_attention_heads": 32,
56
- "num_hidden_layers": 36,
57
- "num_key_value_heads": 8,
58
- "pad_token_id": 151643,
59
- "rms_norm_eps": 1e-06,
60
- "rope_scaling": null,
61
- "rope_theta": 5000000,
62
- "sliding_window": null,
63
- "tie_word_embeddings": true,
64
- "transformers_version": "4.57.6",
65
- "unsloth_version": "2026.1.2",
66
- "use_cache": false,
67
- "use_sliding_window": false,
68
- "vocab_size": 151936
69
- }
 
1
  {
2
+ "architectures": [
3
+ "Qwen3ForCausalLM"
4
+ ],
5
+ "attention_bias": false,
6
+ "attention_dropout": 0.0,
7
+ "torch_dtype": "bfloat16",
8
+ "eos_token_id": 151645,
9
+ "head_dim": 128,
10
+ "hidden_act": "silu",
11
+ "hidden_size": 2560,
12
+ "initializer_range": 0.02,
13
+ "intermediate_size": 9728,
14
+ "layer_types": [
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
+ "full_attention",
43
+ "full_attention",
44
+ "full_attention",
45
+ "full_attention",
46
+ "full_attention",
47
+ "full_attention",
48
+ "full_attention",
49
+ "full_attention",
50
+ "full_attention"
51
+ ],
52
+ "max_position_embeddings": 262144,
53
+ "max_window_layers": 36,
54
+ "model_type": "qwen3",
55
+ "num_attention_heads": 32,
56
+ "num_hidden_layers": 36,
57
+ "num_key_value_heads": 8,
58
+ "pad_token_id": 151643,
59
+ "rms_norm_eps": 1e-06,
60
+ "rope_scaling": null,
61
+ "rope_theta": 5000000,
62
+ "sliding_window": null,
63
+ "tie_word_embeddings": true,
64
+ "transformers_version": "4.56.2",
65
+ "unsloth_version": "2026.1.4",
66
+ "use_cache": false,
67
+ "use_sliding_window": false,
68
+ "vocab_size": 151936
69
+ }
model-00001-of-00002.safetensors CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:fa335e5ef60c4ba9674e62bd3a992f2562da76c9cc5c31cf2331dac9b6398968
3
  size 4967215455
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:af519b9406f1b7119269e83421502c5744a971f58e4a6b6d6f390adc2d258517
3
  size 4967215455
model-00002-of-00002.safetensors CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:97eb0762685e1e0a19c4675b5d25dabe844c378b84931678684dd7af19431528
3
  size 3077766730
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3e020028c9782f5a10ef2f9462a401e96b73e455b66840678ccea4d8f5b42887
3
  size 3077766730
tokenizer_config.json CHANGED
@@ -237,5 +237,5 @@
237
  "split_special_tokens": false,
238
  "tokenizer_class": "Qwen2Tokenizer",
239
  "unk_token": null,
240
- "chat_template": "\n{%- set has_system = messages and messages[0].role == 'system' and messages[0].content is string %}\n{%- if has_system %}\n{{- '<|im_start|>system\\n' + messages[0].content + '<|im_end|>\\n' }}\n{%- endif %}\n\n{%- if messages and messages[-1].role == 'assistant' %}\n {# Find the user message immediately before the last assistant (scan backwards skipping last). #}\n {%- set ns = namespace(seen_last=false, user_before_last_asst=none) %}\n {%- for m in messages[::-1] %}\n {%- if not ns.seen_last %}\n {%- set ns.seen_last = true %}\n {%- elif ns.user_before_last_asst is none and m.role == 'user' and m.content is string %}\n {%- set ns.user_before_last_asst = m.content %}\n {%- endif %}\n {%- endfor %}\n {%- if ns.user_before_last_asst is not none %}\n{{- '<|im_start|>user\\n' + ns.user_before_last_asst + '<|im_end|>\\n' }}\n {%- endif %}\n\n {%- set content = '' %}\n {%- if messages[-1].content is string %}\n {%- set content = messages[-1].content %}\n {%- endif %}\n {%- set reasoning_content = '' %}\n {%- if messages[-1].reasoning_content is string %}\n {%- set reasoning_content = messages[-1].reasoning_content %}\n {%- else %}\n {%- if '</think>' in content %}\n {%- set reasoning_content = content.split('</think>')[0].rstrip('\\n').split('<think>')[-1].lstrip('\\n') %}\n {%- set content = content.split('</think>')[-1].lstrip('\\n') %}\n {%- endif %}\n {%- endif %}\n {%- if reasoning_content %}\n{{- '<|im_start|>assistant\\n<think>\\n' + reasoning_content.strip('\\n') + '\\n</think>\\n\\n' + content.lstrip('\\n') + '<|im_end|>\\n' }}\n {%- else %}\n{{- '<|im_start|>assistant\\n' + content + '<|im_end|>\\n' }}\n {%- endif %}\n\n{%- elif messages and messages[-1].role == 'user' and messages[-1].content is string %}\n{{- '<|im_start|>user\\n' + messages[-1].content + '<|im_end|>\\n<|im_start|>assistant\\n' }}\n{%- endif %}"
241
  }
 
237
  "split_special_tokens": false,
238
  "tokenizer_class": "Qwen2Tokenizer",
239
  "unk_token": null,
240
+ "chat_template": "{%- set has_system = messages and messages[0].role == 'system' and messages[0].content is string %}\n{%- if has_system %}\n {{- '<|im_start|>system\\n' + messages[0].content + '<|im_end|>\\n' }}\n{%- endif %}\n{%- if messages and messages[-1].role == 'assistant' %}\n {# Find the user message immediately before the last assistant (scan backwards skipping last). #}\n {%- set ns = namespace(seen_last=false, user_before_last_asst=none) %}\n {%- for m in messages[::-1] %}\n {%- if not ns.seen_last %}\n {%- set ns.seen_last = true %}\n {%- elif ns.user_before_last_asst is none and m.role == 'user' and m.content is string %}\n {%- set ns.user_before_last_asst = m.content %}\n {%- endif %}\n {%- endfor %}\n {%- if ns.user_before_last_asst is not none %}\n {{- '<|im_start|>user\\n' + ns.user_before_last_asst + '<|im_end|>\\n' }}\n {%- endif %}\n\n {%- set content = '' %}\n {%- if messages[-1].content is string %}\n {%- set content = messages[-1].content %}\n {%- endif %}\n {%- set reasoning_content = '' %}\n {%- if messages[-1].reasoning_content is string %}\n {%- set reasoning_content = messages[-1].reasoning_content %}\n {%- else %}\n {%- if '</think>' in content %}\n {%- set reasoning_content = content.split('</think>')[0].rstrip('\\n').split('<think>')[-1].lstrip('\\n') %}\n {%- set content = content.split('</think>')[-1].lstrip('\\n') %}\n {%- endif %}\n {%- endif %}\n {%- if reasoning_content %}\n {{- '<|im_start|>assistant\\n<think>\\n' + reasoning_content.strip('\\n') + '\\n</think>\\n\\n' + content.lstrip('\\n') + '<|im_end|>\\n' }}\n {%- else %}\n {{- '<|im_start|>assistant\\n' + content + '<|im_end|>\\n' }}\n {%- endif %}\n{%- elif messages and messages[-1].role == 'user' and messages[-1].content is string %}\n {{- '<|im_start|>user\\n' + messages[-1].content + '<|im_end|>\\n' }}\n{%- endif %}\n{%- if add_generation_prompt %}\n {{- '<|im_start|>assistant\\n' }}\n{%- endif %}"
241
  }