tbmod commited on
Commit
20b2f3d
·
verified ·
1 Parent(s): c305f48

Upload folder using huggingface_hub

Browse files
chat_template.jinja ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
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='', is_first_sp=true) %}{%- for message in messages %}{%- if message['role'] == 'system' %}{%- if ns.is_first_sp %}{% set ns.system_prompt = ns.system_prompt + message['content'] %}{% set ns.is_first_sp = false %}{%- else %}{% set ns.system_prompt = ns.system_prompt + '
2
+
3
+ ' + message['content'] %}{%- endif %}{%- 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'] + '
4
+ ' + '```json' + '
5
+ ' + tool['function']['arguments'] + '
6
+ ' + '```' + '<|tool▁call▁end|>'}}{%- set ns.is_first = true -%}{%- else %}{{'
7
+ ' + '<|tool▁call▁begin|>' + tool['type'] + '<|tool▁sep|>' + tool['function']['name'] + '
8
+ ' + '```json' + '
9
+ ' + tool['function']['arguments'] + '
10
+ ' + '```' + '<|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 %}{{'<|Assistant|>' + message['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 %}{{'
11
+ <|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|>'}}{% endif %}
config.json ADDED
@@ -0,0 +1,160 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_attn_implementation_autoset": true,
3
+ "architectures": [
4
+ "DeepseekV3ForCausalLM"
5
+ ],
6
+ "attention_bias": false,
7
+ "attention_dropout": 0.0,
8
+ "auto_map": {
9
+ "AutoConfig": "configuration_deepseek.DeepseekV3Config",
10
+ "AutoModel": "modeling_deepseek.DeepseekV3Model",
11
+ "AutoModelForCausalLM": "modeling_deepseek.DeepseekV3ForCausalLM"
12
+ },
13
+ "aux_loss_alpha": 0.001,
14
+ "bos_token_id": 0,
15
+ "dtype": "bfloat16",
16
+ "eos_token_id": 1,
17
+ "ep_size": 1,
18
+ "first_k_dense_replace": 1,
19
+ "head_dim": 64,
20
+ "hidden_act": "silu",
21
+ "hidden_size": 2048,
22
+ "initializer_range": 0.0125,
23
+ "intermediate_size": 10944,
24
+ "kv_lora_rank": 512,
25
+ "max_position_embeddings": 8192,
26
+ "model_type": "deepseek_v3",
27
+ "moe_intermediate_size": 1408,
28
+ "moe_layer_freq": 1,
29
+ "n_group": 8,
30
+ "n_routed_experts": 64,
31
+ "n_shared_experts": 2,
32
+ "norm_topk_prob": true,
33
+ "num_attention_heads": 16,
34
+ "num_experts_per_tok": 8,
35
+ "num_hidden_layers": 16,
36
+ "num_key_value_heads": 16,
37
+ "num_nextn_predict_layers": 1,
38
+ "pretraining_tp": 1,
39
+ "q_lora_rank": 1024,
40
+ "qk_head_dim": 192,
41
+ "qk_nope_head_dim": 128,
42
+ "qk_rope_head_dim": 64,
43
+ "rms_norm_eps": 1e-06,
44
+ "rope_interleave": true,
45
+ "rope_scaling": {
46
+ "beta_fast": 32.0,
47
+ "beta_slow": 1.0,
48
+ "factor": 40.0,
49
+ "mscale": 1.0,
50
+ "mscale_all_dim": 1.0,
51
+ "original_max_position_embeddings": 4096,
52
+ "rope_type": "yarn",
53
+ "type": "yarn"
54
+ },
55
+ "rope_theta": 10000,
56
+ "routed_scaling_factor": 1.0,
57
+ "scoring_func": "sigmoid",
58
+ "seq_aux": true,
59
+ "tie_word_embeddings": false,
60
+ "topk_group": 4,
61
+ "topk_method": "noaux_tc",
62
+ "transformers_version": "4.57.6",
63
+ "use_cache": true,
64
+ "v_head_dim": 128,
65
+ "vocab_size": 129280,
66
+ "quantization_config": {
67
+ "config_groups": {
68
+ "group_0": {
69
+ "input_activations": {
70
+ "dynamic": false,
71
+ "num_bits": 4,
72
+ "type": "float",
73
+ "group_size": 16
74
+ },
75
+ "weights": {
76
+ "dynamic": false,
77
+ "num_bits": 4,
78
+ "type": "float",
79
+ "group_size": 16
80
+ },
81
+ "targets": [
82
+ "Linear"
83
+ ]
84
+ }
85
+ },
86
+ "ignore": [
87
+ "lm_head",
88
+ "model.layers.0.self_attn.kv_a_proj_with_mqa",
89
+ "model.layers.0.self_attn.kv_b_proj",
90
+ "model.layers.0.self_attn.q_a_proj",
91
+ "model.layers.0.self_attn.q_b_proj",
92
+ "model.layers.1.self_attn.kv_a_proj_with_mqa",
93
+ "model.layers.1.self_attn.kv_b_proj",
94
+ "model.layers.1.self_attn.q_a_proj",
95
+ "model.layers.1.self_attn.q_b_proj",
96
+ "model.layers.10.self_attn.kv_a_proj_with_mqa",
97
+ "model.layers.10.self_attn.kv_b_proj",
98
+ "model.layers.10.self_attn.q_a_proj",
99
+ "model.layers.10.self_attn.q_b_proj",
100
+ "model.layers.11.self_attn.kv_a_proj_with_mqa",
101
+ "model.layers.11.self_attn.kv_b_proj",
102
+ "model.layers.11.self_attn.q_a_proj",
103
+ "model.layers.11.self_attn.q_b_proj",
104
+ "model.layers.12.self_attn.kv_a_proj_with_mqa",
105
+ "model.layers.12.self_attn.kv_b_proj",
106
+ "model.layers.12.self_attn.q_a_proj",
107
+ "model.layers.12.self_attn.q_b_proj",
108
+ "model.layers.13.self_attn.kv_a_proj_with_mqa",
109
+ "model.layers.13.self_attn.kv_b_proj",
110
+ "model.layers.13.self_attn.q_a_proj",
111
+ "model.layers.13.self_attn.q_b_proj",
112
+ "model.layers.14.self_attn.kv_a_proj_with_mqa",
113
+ "model.layers.14.self_attn.kv_b_proj",
114
+ "model.layers.14.self_attn.q_a_proj",
115
+ "model.layers.14.self_attn.q_b_proj",
116
+ "model.layers.15.self_attn.kv_a_proj_with_mqa",
117
+ "model.layers.15.self_attn.kv_b_proj",
118
+ "model.layers.15.self_attn.q_a_proj",
119
+ "model.layers.15.self_attn.q_b_proj",
120
+ "model.layers.2.self_attn.kv_a_proj_with_mqa",
121
+ "model.layers.2.self_attn.kv_b_proj",
122
+ "model.layers.2.self_attn.q_a_proj",
123
+ "model.layers.2.self_attn.q_b_proj",
124
+ "model.layers.3.self_attn.kv_a_proj_with_mqa",
125
+ "model.layers.3.self_attn.kv_b_proj",
126
+ "model.layers.3.self_attn.q_a_proj",
127
+ "model.layers.3.self_attn.q_b_proj",
128
+ "model.layers.4.self_attn.kv_a_proj_with_mqa",
129
+ "model.layers.4.self_attn.kv_b_proj",
130
+ "model.layers.4.self_attn.q_a_proj",
131
+ "model.layers.4.self_attn.q_b_proj",
132
+ "model.layers.5.self_attn.kv_a_proj_with_mqa",
133
+ "model.layers.5.self_attn.kv_b_proj",
134
+ "model.layers.5.self_attn.q_a_proj",
135
+ "model.layers.5.self_attn.q_b_proj",
136
+ "model.layers.6.self_attn.kv_a_proj_with_mqa",
137
+ "model.layers.6.self_attn.kv_b_proj",
138
+ "model.layers.6.self_attn.q_a_proj",
139
+ "model.layers.6.self_attn.q_b_proj",
140
+ "model.layers.7.self_attn.kv_a_proj_with_mqa",
141
+ "model.layers.7.self_attn.kv_b_proj",
142
+ "model.layers.7.self_attn.q_a_proj",
143
+ "model.layers.7.self_attn.q_b_proj",
144
+ "model.layers.8.self_attn.kv_a_proj_with_mqa",
145
+ "model.layers.8.self_attn.kv_b_proj",
146
+ "model.layers.8.self_attn.q_a_proj",
147
+ "model.layers.8.self_attn.q_b_proj",
148
+ "model.layers.9.self_attn.kv_a_proj_with_mqa",
149
+ "model.layers.9.self_attn.kv_b_proj",
150
+ "model.layers.9.self_attn.q_a_proj",
151
+ "model.layers.9.self_attn.q_b_proj"
152
+ ],
153
+ "quant_algo": "NVFP4",
154
+ "producer": {
155
+ "name": "modelopt",
156
+ "version": "0.41.0"
157
+ },
158
+ "quant_method": "modelopt"
159
+ }
160
+ }
generation_config.json ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ {
2
+ "_from_model_config": true,
3
+ "bos_token_id": 0,
4
+ "eos_token_id": 1,
5
+ "transformers_version": "4.57.6"
6
+ }
hf_quant_config.json ADDED
@@ -0,0 +1,78 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "producer": {
3
+ "name": "modelopt",
4
+ "version": "0.41.0"
5
+ },
6
+ "quantization": {
7
+ "quant_algo": "NVFP4",
8
+ "kv_cache_quant_algo": null,
9
+ "group_size": 16,
10
+ "exclude_modules": [
11
+ "lm_head",
12
+ "model.layers.0.self_attn.kv_a_proj_with_mqa",
13
+ "model.layers.0.self_attn.kv_b_proj",
14
+ "model.layers.0.self_attn.q_a_proj",
15
+ "model.layers.0.self_attn.q_b_proj",
16
+ "model.layers.1.self_attn.kv_a_proj_with_mqa",
17
+ "model.layers.1.self_attn.kv_b_proj",
18
+ "model.layers.1.self_attn.q_a_proj",
19
+ "model.layers.1.self_attn.q_b_proj",
20
+ "model.layers.10.self_attn.kv_a_proj_with_mqa",
21
+ "model.layers.10.self_attn.kv_b_proj",
22
+ "model.layers.10.self_attn.q_a_proj",
23
+ "model.layers.10.self_attn.q_b_proj",
24
+ "model.layers.11.self_attn.kv_a_proj_with_mqa",
25
+ "model.layers.11.self_attn.kv_b_proj",
26
+ "model.layers.11.self_attn.q_a_proj",
27
+ "model.layers.11.self_attn.q_b_proj",
28
+ "model.layers.12.self_attn.kv_a_proj_with_mqa",
29
+ "model.layers.12.self_attn.kv_b_proj",
30
+ "model.layers.12.self_attn.q_a_proj",
31
+ "model.layers.12.self_attn.q_b_proj",
32
+ "model.layers.13.self_attn.kv_a_proj_with_mqa",
33
+ "model.layers.13.self_attn.kv_b_proj",
34
+ "model.layers.13.self_attn.q_a_proj",
35
+ "model.layers.13.self_attn.q_b_proj",
36
+ "model.layers.14.self_attn.kv_a_proj_with_mqa",
37
+ "model.layers.14.self_attn.kv_b_proj",
38
+ "model.layers.14.self_attn.q_a_proj",
39
+ "model.layers.14.self_attn.q_b_proj",
40
+ "model.layers.15.self_attn.kv_a_proj_with_mqa",
41
+ "model.layers.15.self_attn.kv_b_proj",
42
+ "model.layers.15.self_attn.q_a_proj",
43
+ "model.layers.15.self_attn.q_b_proj",
44
+ "model.layers.2.self_attn.kv_a_proj_with_mqa",
45
+ "model.layers.2.self_attn.kv_b_proj",
46
+ "model.layers.2.self_attn.q_a_proj",
47
+ "model.layers.2.self_attn.q_b_proj",
48
+ "model.layers.3.self_attn.kv_a_proj_with_mqa",
49
+ "model.layers.3.self_attn.kv_b_proj",
50
+ "model.layers.3.self_attn.q_a_proj",
51
+ "model.layers.3.self_attn.q_b_proj",
52
+ "model.layers.4.self_attn.kv_a_proj_with_mqa",
53
+ "model.layers.4.self_attn.kv_b_proj",
54
+ "model.layers.4.self_attn.q_a_proj",
55
+ "model.layers.4.self_attn.q_b_proj",
56
+ "model.layers.5.self_attn.kv_a_proj_with_mqa",
57
+ "model.layers.5.self_attn.kv_b_proj",
58
+ "model.layers.5.self_attn.q_a_proj",
59
+ "model.layers.5.self_attn.q_b_proj",
60
+ "model.layers.6.self_attn.kv_a_proj_with_mqa",
61
+ "model.layers.6.self_attn.kv_b_proj",
62
+ "model.layers.6.self_attn.q_a_proj",
63
+ "model.layers.6.self_attn.q_b_proj",
64
+ "model.layers.7.self_attn.kv_a_proj_with_mqa",
65
+ "model.layers.7.self_attn.kv_b_proj",
66
+ "model.layers.7.self_attn.q_a_proj",
67
+ "model.layers.7.self_attn.q_b_proj",
68
+ "model.layers.8.self_attn.kv_a_proj_with_mqa",
69
+ "model.layers.8.self_attn.kv_b_proj",
70
+ "model.layers.8.self_attn.q_a_proj",
71
+ "model.layers.8.self_attn.q_b_proj",
72
+ "model.layers.9.self_attn.kv_a_proj_with_mqa",
73
+ "model.layers.9.self_attn.kv_b_proj",
74
+ "model.layers.9.self_attn.q_a_proj",
75
+ "model.layers.9.self_attn.q_b_proj"
76
+ ]
77
+ }
78
+ }
model-00001-of-00002.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7b2a102581abe7d35951a68f467c60b045bbb164b5040a027fe6cf7eab4a9dab
3
+ size 5000698112
model-00002-of-00002.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:094fd888ec8aea63eac60c9983d9387a9758afba89cccffe2bf61327a1bc2d3d
3
+ size 1229504824
model.safetensors.index.json ADDED
The diff for this file is too large to render. See raw diff
 
special_tokens_map.json ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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": "<|end▁of▁sentence|>",
18
+ "lstrip": false,
19
+ "normalized": false,
20
+ "rstrip": false,
21
+ "single_word": false
22
+ }
23
+ }
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json ADDED
The diff for this file is too large to render. See raw diff