nm-autobot commited on
Commit
2478da7
·
verified ·
1 Parent(s): d55f5eb

Upload folder using huggingface_hub

Browse files
.gitattributes CHANGED
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ tokenizer.json filter=lfs diff=lfs merge=lfs -text
chat_template.jinja ADDED
@@ -0,0 +1,89 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {%- if tools %}
2
+ {{- '<|im_start|>system\n' }}
3
+ {%- if messages[0].role == 'system' %}
4
+ {{- messages[0].content + '\n\n' }}
5
+ {%- endif %}
6
+ {{- "# 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>" }}
7
+ {%- for tool in tools %}
8
+ {{- "\n" }}
9
+ {{- tool | tojson }}
10
+ {%- endfor %}
11
+ {{- "\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" }}
12
+ {%- else %}
13
+ {%- if messages[0].role == 'system' %}
14
+ {{- '<|im_start|>system\n' + messages[0].content + '<|im_end|>\n' }}
15
+ {%- endif %}
16
+ {%- endif %}
17
+ {%- set ns = namespace(multi_step_tool=true, last_query_index=messages|length - 1) %}
18
+ {%- for message in messages[::-1] %}
19
+ {%- set index = (messages|length - 1) - loop.index0 %}
20
+ {%- if ns.multi_step_tool and message.role == "user" and message.content is string and not(message.content.startswith('<tool_response>') and message.content.endswith('</tool_response>')) %}
21
+ {%- set ns.multi_step_tool = false %}
22
+ {%- set ns.last_query_index = index %}
23
+ {%- endif %}
24
+ {%- endfor %}
25
+ {%- for message in messages %}
26
+ {%- if message.content is string %}
27
+ {%- set content = message.content %}
28
+ {%- else %}
29
+ {%- set content = '' %}
30
+ {%- endif %}
31
+ {%- if (message.role == "user") or (message.role == "system" and not loop.first) %}
32
+ {{- '<|im_start|>' + message.role + '\n' + content + '<|im_end|>' + '\n' }}
33
+ {%- elif message.role == "assistant" %}
34
+ {%- set reasoning_content = '' %}
35
+ {%- if message.reasoning_content is string %}
36
+ {%- set reasoning_content = message.reasoning_content %}
37
+ {%- else %}
38
+ {%- if '</think>' in content %}
39
+ {%- set reasoning_content = content.split('</think>')[0].rstrip('\n').split('<think>')[-1].lstrip('\n') %}
40
+ {%- set content = content.split('</think>')[-1].lstrip('\n') %}
41
+ {%- endif %}
42
+ {%- endif %}
43
+ {%- if loop.index0 > ns.last_query_index %}
44
+ {%- if loop.last or (not loop.last and reasoning_content) %}
45
+ {{- '<|im_start|>' + message.role + '\n<think>\n' + reasoning_content.strip('\n') + '\n</think>\n\n' + content.lstrip('\n') }}
46
+ {%- else %}
47
+ {{- '<|im_start|>' + message.role + '\n' + content }}
48
+ {%- endif %}
49
+ {%- else %}
50
+ {{- '<|im_start|>' + message.role + '\n' + content }}
51
+ {%- endif %}
52
+ {%- if message.tool_calls %}
53
+ {%- for tool_call in message.tool_calls %}
54
+ {%- if (loop.first and content) or (not loop.first) %}
55
+ {{- '\n' }}
56
+ {%- endif %}
57
+ {%- if tool_call.function %}
58
+ {%- set tool_call = tool_call.function %}
59
+ {%- endif %}
60
+ {{- '<tool_call>\n{"name": "' }}
61
+ {{- tool_call.name }}
62
+ {{- '", "arguments": ' }}
63
+ {%- if tool_call.arguments is string %}
64
+ {{- tool_call.arguments }}
65
+ {%- else %}
66
+ {{- tool_call.arguments | tojson }}
67
+ {%- endif %}
68
+ {{- '}\n</tool_call>' }}
69
+ {%- endfor %}
70
+ {%- endif %}
71
+ {{- '<|im_end|>\n' }}
72
+ {%- elif message.role == "tool" %}
73
+ {%- if loop.first or (messages[loop.index0 - 1].role != "tool") %}
74
+ {{- '<|im_start|>user' }}
75
+ {%- endif %}
76
+ {{- '\n<tool_response>\n' }}
77
+ {{- content }}
78
+ {{- '\n</tool_response>' }}
79
+ {%- if loop.last or (messages[loop.index0 + 1].role != "tool") %}
80
+ {{- '<|im_end|>\n' }}
81
+ {%- endif %}
82
+ {%- endif %}
83
+ {%- endfor %}
84
+ {%- if add_generation_prompt %}
85
+ {{- '<|im_start|>assistant\n' }}
86
+ {%- if enable_thinking is defined and enable_thinking is false %}
87
+ {{- '<think>\n\n</think>\n\n' }}
88
+ {%- endif %}
89
+ {%- endif %}
config.json ADDED
@@ -0,0 +1,139 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "Qwen3MoeForCausalLM"
4
+ ],
5
+ "attention_bias": false,
6
+ "attention_dropout": 0.0,
7
+ "bos_token_id": 151643,
8
+ "decoder_sparse_step": 1,
9
+ "dtype": "bfloat16",
10
+ "eos_token_id": 151645,
11
+ "head_dim": 128,
12
+ "hidden_act": "silu",
13
+ "hidden_size": 2048,
14
+ "initializer_range": 0.02,
15
+ "intermediate_size": 6144,
16
+ "max_position_embeddings": 40960,
17
+ "max_window_layers": 48,
18
+ "mlp_only_layers": [],
19
+ "model_type": "qwen3_moe",
20
+ "moe_intermediate_size": 768,
21
+ "norm_topk_prob": true,
22
+ "num_attention_heads": 32,
23
+ "num_experts_per_tok": 8,
24
+ "num_hidden_layers": 48,
25
+ "num_key_value_heads": 4,
26
+ "num_local_experts": 128,
27
+ "output_router_logits": false,
28
+ "pad_token_id": null,
29
+ "quantization_config": {
30
+ "config_groups": {
31
+ "group_0": {
32
+ "format": "float-quantized",
33
+ "input_activations": {
34
+ "actorder": null,
35
+ "block_structure": null,
36
+ "dynamic": true,
37
+ "group_size": null,
38
+ "num_bits": 8,
39
+ "observer": null,
40
+ "observer_kwargs": {},
41
+ "scale_dtype": null,
42
+ "strategy": "token",
43
+ "symmetric": true,
44
+ "type": "float",
45
+ "zp_dtype": null
46
+ },
47
+ "output_activations": null,
48
+ "targets": [
49
+ "Linear"
50
+ ],
51
+ "weights": {
52
+ "actorder": null,
53
+ "block_structure": null,
54
+ "dynamic": false,
55
+ "group_size": null,
56
+ "num_bits": 8,
57
+ "observer": "memoryless_minmax",
58
+ "observer_kwargs": {},
59
+ "scale_dtype": null,
60
+ "strategy": "channel",
61
+ "symmetric": true,
62
+ "type": "float",
63
+ "zp_dtype": null
64
+ }
65
+ }
66
+ },
67
+ "format": "float-quantized",
68
+ "global_compression_ratio": null,
69
+ "ignore": [
70
+ "model.layers.0.mlp.gate",
71
+ "model.layers.1.mlp.gate",
72
+ "model.layers.2.mlp.gate",
73
+ "model.layers.3.mlp.gate",
74
+ "model.layers.4.mlp.gate",
75
+ "model.layers.5.mlp.gate",
76
+ "model.layers.6.mlp.gate",
77
+ "model.layers.7.mlp.gate",
78
+ "model.layers.8.mlp.gate",
79
+ "model.layers.9.mlp.gate",
80
+ "model.layers.10.mlp.gate",
81
+ "model.layers.11.mlp.gate",
82
+ "model.layers.12.mlp.gate",
83
+ "model.layers.13.mlp.gate",
84
+ "model.layers.14.mlp.gate",
85
+ "model.layers.15.mlp.gate",
86
+ "model.layers.16.mlp.gate",
87
+ "model.layers.17.mlp.gate",
88
+ "model.layers.18.mlp.gate",
89
+ "model.layers.19.mlp.gate",
90
+ "model.layers.20.mlp.gate",
91
+ "model.layers.21.mlp.gate",
92
+ "model.layers.22.mlp.gate",
93
+ "model.layers.23.mlp.gate",
94
+ "model.layers.24.mlp.gate",
95
+ "model.layers.25.mlp.gate",
96
+ "model.layers.26.mlp.gate",
97
+ "model.layers.27.mlp.gate",
98
+ "model.layers.28.mlp.gate",
99
+ "model.layers.29.mlp.gate",
100
+ "model.layers.30.mlp.gate",
101
+ "model.layers.31.mlp.gate",
102
+ "model.layers.32.mlp.gate",
103
+ "model.layers.33.mlp.gate",
104
+ "model.layers.34.mlp.gate",
105
+ "model.layers.35.mlp.gate",
106
+ "model.layers.36.mlp.gate",
107
+ "model.layers.37.mlp.gate",
108
+ "model.layers.38.mlp.gate",
109
+ "model.layers.39.mlp.gate",
110
+ "model.layers.40.mlp.gate",
111
+ "model.layers.41.mlp.gate",
112
+ "model.layers.42.mlp.gate",
113
+ "model.layers.43.mlp.gate",
114
+ "model.layers.44.mlp.gate",
115
+ "model.layers.45.mlp.gate",
116
+ "model.layers.46.mlp.gate",
117
+ "model.layers.47.mlp.gate",
118
+ "lm_head"
119
+ ],
120
+ "kv_cache_scheme": null,
121
+ "quant_method": "compressed-tensors",
122
+ "quantization_status": "compressed",
123
+ "sparsity_config": {},
124
+ "transform_config": {},
125
+ "version": "0.17.2.a20260724"
126
+ },
127
+ "rms_norm_eps": 1e-06,
128
+ "rope_parameters": {
129
+ "rope_theta": 1000000.0,
130
+ "rope_type": "default"
131
+ },
132
+ "router_aux_loss_coef": 0.001,
133
+ "sliding_window": null,
134
+ "tie_word_embeddings": false,
135
+ "transformers_version": "5.14.1",
136
+ "use_cache": true,
137
+ "use_sliding_window": false,
138
+ "vocab_size": 151936
139
+ }
generation_config.json ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token_id": 151643,
3
+ "do_sample": true,
4
+ "eos_token_id": [
5
+ 151645,
6
+ 151643
7
+ ],
8
+ "pad_token_id": 151643,
9
+ "temperature": 0.6,
10
+ "top_k": 20,
11
+ "top_p": 0.95,
12
+ "transformers_version": "5.14.1"
13
+ }
model-00001-of-00002.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c64b5982d13fdea438e95ab532e72b1814b4a05351c644ec64da688aeeda0b5f
3
+ size 20002434624
model-00002-of-00002.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ba03662c1ae80977dd85a467662dfa8ce3dfb4ca3b929d1d56d2e4dd4e18e17e
3
+ size 11214289504
model.safetensors.index.json ADDED
The diff for this file is too large to render. See raw diff
 
recipe.yaml ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ default_stage:
2
+ default_modifiers:
3
+ QuantizationModifier:
4
+ targets: [Linear]
5
+ ignore: [lm_head, 're:.*mlp.gate[.].*']
6
+ scheme: FP8_DYNAMIC
7
+ bypass_divisibility_checks: false
tokenizer.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:be75606093db2094d7cd20f3c2f385c212750648bd6ea4fb2bf507a6a4c55506
3
+ size 11422650
tokenizer_config.json ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ "local_files_only": false,
25
+ "model_max_length": 131072,
26
+ "pad_token": "<|endoftext|>",
27
+ "split_special_tokens": false,
28
+ "tokenizer_class": "Qwen2Tokenizer",
29
+ "unk_token": null
30
+ }