krishnateja95 commited on
Commit
cef0a31
·
verified ·
1 Parent(s): b5b3887

Replace model with updated FP8 dynamic quantization

Browse files

Removing all existing files and uploading new FP8 dynamic quantized model weights

README.md ADDED
@@ -0,0 +1,334 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ pipeline_tag: text-generation
4
+ tags:
5
+ - fp8
6
+ - quantized
7
+ - llm-compressor
8
+ - compressed-tensors
9
+ - red hat
10
+ base_model:
11
+ - ibm-granite/granite-4.0-h-small
12
+ ---
13
+
14
+
15
+ # Granite-4.0-h-small
16
+
17
+ ## Model Overview
18
+ - **Model Architecture:** GraniteMoeHybridForCausalLM
19
+ - **Input:** Text
20
+ - **Output:** Text
21
+ - **Model Optimizations:**
22
+ - **Weight quantization:** FP8
23
+ - **Activation quantization:** FP8
24
+ - **Release Date:**
25
+ - **Version:** 1.0
26
+ - **Model Developers:**: Red Hat
27
+
28
+ Quantized version of [ibm-granite/granite-4.0-h-small](https://huggingface.co/ibm-granite/granite-4.0-h-small).
29
+
30
+ ### Model Optimizations
31
+
32
+ This model was obtained by quantizing the weights and activations of [ibm-granite/granite-4.0-h-small](https://huggingface.co/ibm-granite/granite-4.0-h-small) to FP8 data type.
33
+ This optimization reduces the number of bits per parameter from 16 to 8, reducing the disk size and GPU memory requirements by approximately 50%.
34
+ Only the weights and activations of the linear operators within transformers blocks of the language model are quantized.
35
+
36
+ ## Deployment
37
+
38
+ ### Use with vLLM
39
+
40
+ 1. Install vLLM from main:
41
+ ```
42
+ uv pip install -U git+https://github.com/vllm-project/vllm.git \
43
+ --extra-index-url https://wheels.vllm.ai/nightly \
44
+ --no-deps \
45
+ --no-cache
46
+
47
+
48
+ uv pip install compressed-tensors==0.12.3a20251114 --no-cache
49
+ uv pip install --upgrade torchvision --break-system-packages --no-cache
50
+ uv pip install cloudpickle msgspec zmq blake3 cachetools prometheus_client fastapi openai openai_harmony pybase64 llguidance diskcache xgrammar lm-format-enforcer partial-json-parser cbor2 einops gguf numba --no-cache
51
+ ```
52
+
53
+ 2. Initialize vLLM server:
54
+ ```
55
+ vllm serve RedHatAI/granite-4.0-h-small-FP8-dynamic --tensor_parallel_size 1
56
+ ```
57
+
58
+ 3. Send requests to the server:
59
+
60
+ ```python
61
+ from openai import OpenAI
62
+
63
+ # Modify OpenAI's API key and API base to use vLLM's API server.
64
+ openai_api_key = "EMPTY"
65
+ openai_api_base = "http://<your-server-host>:8000/v1"
66
+
67
+ client = OpenAI(
68
+ api_key=openai_api_key,
69
+ base_url=openai_api_base,
70
+ )
71
+
72
+ model = "RedHatAI/granite-4.0-h-small-FP8-dynamic"
73
+
74
+ messages = [
75
+ {"role": "user", "content": "Explain quantum mechanics clearly and concisely."},
76
+ ]
77
+
78
+
79
+ outputs = client.chat.completions.create(
80
+ model=model,
81
+ messages=messages,
82
+ )
83
+
84
+ generated_text = outputs.choices[0].message.content
85
+ print(generated_text)
86
+ ```
87
+
88
+ ## Creation
89
+
90
+ This model was quantized using the [llm-compressor](https://github.com/vllm-project/llm-compressor) library as shown below.
91
+
92
+
93
+ <details>
94
+ <summary>Creation details</summary>
95
+
96
+ Install specific llm-compression version:
97
+ ```
98
+ uv pip install git+https://github.com/vllm-project/llm-compressor.git@refs/pull/2001/head --no-cache
99
+ uv pip install --upgrade torchvision --break-system-packages --no-cache
100
+ ```
101
+
102
+
103
+ ```python
104
+ from transformers import AutoModelForCausalLM, AutoTokenizer
105
+
106
+ from llmcompressor import oneshot
107
+ from llmcompressor.modifiers.quantization import QuantizationModifier
108
+ from llmcompressor.utils import dispatch_for_generation
109
+ from llmcompressor.modeling import replace_modules_for_calibration
110
+ from llmcompressor.modeling.granite4 import pack_3d_experts
111
+
112
+
113
+ MODEL_ID = "ibm-granite/granite-4.0-h-small"
114
+
115
+ model = AutoModelForCausalLM.from_pretrained(MODEL_ID, torch_dtype="auto")
116
+ tokenizer = AutoTokenizer.from_pretrained(MODEL_ID)
117
+
118
+ model = replace_modules_for_calibration(model)
119
+
120
+ ignore_lay = ["lm_head", "re:.*block_sparse_moe.router"]
121
+
122
+ recipe = QuantizationModifier(
123
+ targets=["Linear"],
124
+ scheme="FP8_DYNAMIC",
125
+ ignore=ignore_lay,
126
+ )
127
+
128
+ oneshot(model=model, recipe=recipe)
129
+
130
+ print("========== SAMPLE GENERATION ==============")
131
+ dispatch_for_generation(model)
132
+ input_ids = tokenizer(
133
+ "Describe Large Language Model", return_tensors="pt"
134
+ ).input_ids.to(model.device)
135
+ output = model.generate(input_ids, max_new_tokens=35)
136
+ print(tokenizer.decode(output[0]))
137
+ print("==========================================")
138
+
139
+ SAVE_DIR = MODEL_ID.rstrip("/").split("/")[-1] + "-FP8-dynamic"
140
+ print(f"Saving to {SAVE_DIR}")
141
+
142
+ model.save_pretrained(SAVE_DIR)
143
+ tokenizer.save_pretrained(SAVE_DIR)
144
+ pack_3d_experts(SAVE_DIR)
145
+ ```
146
+ </details>
147
+
148
+
149
+ ## Evaluation
150
+
151
+
152
+ The model was evaluated on the OpenLLM leaderboard task, using [lm-evaluation-harness](https://github.com/EleutherAI/lm-evaluation-harness).
153
+ [vLLM](https://docs.vllm.ai/en/stable/) was used for all evaluations.
154
+
155
+ <details>
156
+ <summary>Evaluation details</summary>
157
+
158
+ Install vLLM from main:
159
+ ```
160
+ uv pip install -U git+https://github.com/vllm-project/vllm.git \
161
+ --extra-index-url https://wheels.vllm.ai/nightly \
162
+ --no-deps \
163
+ --no-cache
164
+
165
+
166
+ uv pip install compressed-tensors==0.12.3a20251114 --no-cache
167
+ uv pip install --upgrade torchvision --break-system-packages --no-cache
168
+ uv pip install cloudpickle msgspec zmq blake3 cachetools prometheus_client fastapi openai openai_harmony pybase64 llguidance diskcache xgrammar lm-format-enforcer partial-json-parser cbor2 einops gguf numba --no-cache
169
+ ```
170
+
171
+ **Openllm V1**
172
+ ```
173
+ lm_eval \
174
+ --model vllm \
175
+ --model_args pretrained="RedHatAI/granite-4.0-h-small-FP8-dynamic",dtype=auto,add_bos_token=True,max_model_len=16384,tensor_parallel_size=1,gpu_memory_utilization=0.9,enable_chunked_prefill=True,trust_remote_code=True \
176
+ --tasks openllm \
177
+ --write_out \
178
+ --batch_size auto \
179
+ --show_config
180
+ ```
181
+
182
+
183
+ **Openllm V2**
184
+ ```
185
+ lm_eval \
186
+ --model vllm \
187
+ --model_args pretrained="RedHatAI/granite-4.0-h-small-FP8-dynamic",dtype=auto,add_bos_token=False,max_model_len=16384,tensor_parallel_size=1,gpu_memory_utilization=0.7,disable_log_stats=True,enable_chunked_prefill=True,trust_remote_code=True \
188
+ --tasks leaderboard \
189
+ --apply_chat_template \
190
+ --fewshot_as_multiturn \
191
+ --write_out \
192
+ --batch_size auto \
193
+ --show_config
194
+ ```
195
+
196
+
197
+ **Coding Benchmarks**
198
+
199
+ ```
200
+ evalplus.evaluate --model "RedHatAI/granite-4.0-h-small-FP8-dynamic" \
201
+ --dataset "humaneval" \
202
+ --backend vllm \
203
+ --tp 1 \
204
+ --greedy
205
+
206
+ evalplus.evaluate --model "RedHatAI/granite-4.0-h-small-FP8-dynamic" \
207
+ --dataset "mbpp" \
208
+ --backend vllm \
209
+ --tp 1 \
210
+ --greedy
211
+
212
+ ```
213
+
214
+ </details>
215
+
216
+
217
+
218
+ ### Accuracy Comparison
219
+ <table>
220
+ <thead>
221
+ <tr>
222
+ <th>Category</th>
223
+ <th>Metric</th>
224
+ <th>ibm-granite/granite-4.0-h-small</th>
225
+ <th>ibm-granite/granite-4.0-h-small-FP8</th>
226
+ <th>RedHatAI/granite-4.0-h-small-FP8-block</th>
227
+ <th>RedHatAI/granite-4.0-h-small-FP8-dynamic</th>
228
+ </tr>
229
+ </thead>
230
+ <tbody>
231
+ <!-- OpenLLM Leaderboard V1 -->
232
+ <tr>
233
+ <td rowspan="7"><b>OpenLLM V1</b></td>
234
+ <td>ARC-Challenge (Acc-Norm, 25-shot)</td>
235
+ <td>72.27</td>
236
+ <td>72.10 (99.76%)</td>
237
+ <td>72.27 (100.00%)</td>
238
+ <td>72.10 (99.76%)</td>
239
+ </tr>
240
+ <tr>
241
+ <td>GSM8K (Strict-Match, 5-shot)</td>
242
+ <td>85.22</td>
243
+ <td>85.29 (100.09%)</td>
244
+ <td>85.52 (100.36%)</td>
245
+ <td>84.84 (99.56%)</td>
246
+ </tr>
247
+ <tr>
248
+ <td>HellaSwag (Acc-Norm, 10-shot)</td>
249
+ <td>86.08</td>
250
+ <td>85.88 (99.77%)</td>
251
+ <td>85.96 (99.86%)</td>
252
+ <td>85.88 (99.77%)</td>
253
+ </tr>
254
+ <tr>
255
+ <td>MMLU (Acc, 5-shot)</td>
256
+ <td>77.15</td>
257
+ <td>77.18 (100.03%)</td>
258
+ <td>77.23 (100.09%)</td>
259
+ <td>77.18 (100.03%)</td>
260
+ </tr>
261
+ <tr>
262
+ <td>TruthfulQA (MC2, 0-shot)</td>
263
+ <td>57.64</td>
264
+ <td>57.63 (99.99%)</td>
265
+ <td>57.94 (100.52%)</td>
266
+ <td>57.63 (100.00%)</td>
267
+ </tr>
268
+ <tr>
269
+ <td>Winogrande (Acc, 5-shot)</td>
270
+ <td>81.37</td>
271
+ <td>81.45 (100.10%)</td>
272
+ <td>80.82 (99.32%)</td>
273
+ <td>81.45 (100.10%)</td>
274
+ </tr>
275
+ <tr>
276
+ <td><b>Average Score</b></td>
277
+ <td><b>76.62</b></td>
278
+ <td><b>76.59 (99.96%)</b></td>
279
+ <td><b>76.62 (100.00%)</b></td>
280
+ <td><b>76.51 (99.86%)</b></td>
281
+ </tr>
282
+ <!-- OpenLLM Leaderboard V2 -->
283
+ <tr>
284
+ <td rowspan="7"><b>OpenLLM V2</b></td>
285
+ <td>IFEval (Inst Level Strict Acc, 0-shot)</td>
286
+ <td>87.53</td>
287
+ <td>87.17 (99.59%)</td>
288
+ <td>86.69 (99.04%)</td>
289
+ <td>87.41 (99.86%)</td>
290
+ </tr>
291
+ <tr>
292
+ <td>BBH (Acc-Norm, 3-shot)</td>
293
+ <td>61.52</td>
294
+ <td>61.31 (99.66%)</td>
295
+ <td>61.40 (99.80%)</td>
296
+ <td>61.19 (99.46%)</td>
297
+ </tr>
298
+ <tr>
299
+ <td>Math-Hard (Exact-Match, 4-shot)</td>
300
+ <td>46.22</td>
301
+ <td>43.73 (94.61%)</td>
302
+ <td>43.88 (94.93%)</td>
303
+ <td>41.77 (90.36%)</td>
304
+ </tr>
305
+ <tr>
306
+ <td>GPQA (Acc-Norm, 0-shot)</td>
307
+ <td>35.23</td>
308
+ <td>34.98 (99.29%)</td>
309
+ <td>34.23 (97.14%)</td>
310
+ <td>34.23 (97.14%)</td>
311
+ </tr>
312
+ <tr>
313
+ <td>MUSR (Acc-Norm, 0-shot)</td>
314
+ <td>46.69</td>
315
+ <td>46.56 (99.72%)</td>
316
+ <td>45.77 (98.02%)</td>
317
+ <td>45.77 (98.02%)</td>
318
+ </tr>
319
+ <tr>
320
+ <td>MMLU-Pro (Acc, 5-shot)</td>
321
+ <td>47.99</td>
322
+ <td>47.63 (99.26%)</td>
323
+ <td>47.93 (99.88%)</td>
324
+ <td>47.58 (99.15%)</td>
325
+ </tr>
326
+ <tr>
327
+ <td><b>Average Score</b></td>
328
+ <td><b>54.20</b></td>
329
+ <td><b>53.56 (98.82%)</b></td>
330
+ <td><b>53.32 (98.38%)</b></td>
331
+ <td><b>52.99 (97.77%)</b></td>
332
+ </tr>
333
+ </tbody>
334
+ </table>
config.json CHANGED
@@ -88,9 +88,11 @@
88
  "num_bits": 8,
89
  "observer": null,
90
  "observer_kwargs": {},
 
91
  "strategy": "token",
92
  "symmetric": true,
93
- "type": "float"
 
94
  },
95
  "output_activations": null,
96
  "targets": [
@@ -102,11 +104,13 @@
102
  "dynamic": false,
103
  "group_size": null,
104
  "num_bits": 8,
105
- "observer": "mse",
106
  "observer_kwargs": {},
 
107
  "strategy": "channel",
108
  "symmetric": true,
109
- "type": "float"
 
110
  }
111
  }
112
  },
@@ -114,117 +118,45 @@
114
  "global_compression_ratio": null,
115
  "ignore": [
116
  "model.layers.0.block_sparse_moe.router.layer",
117
- "model.layers.0.mamba.in_proj",
118
- "model.layers.0.mamba.out_proj",
119
  "model.layers.1.block_sparse_moe.router.layer",
120
- "model.layers.1.mamba.in_proj",
121
- "model.layers.1.mamba.out_proj",
122
  "model.layers.2.block_sparse_moe.router.layer",
123
- "model.layers.2.mamba.in_proj",
124
- "model.layers.2.mamba.out_proj",
125
  "model.layers.3.block_sparse_moe.router.layer",
126
- "model.layers.3.mamba.in_proj",
127
- "model.layers.3.mamba.out_proj",
128
  "model.layers.4.block_sparse_moe.router.layer",
129
- "model.layers.4.mamba.in_proj",
130
- "model.layers.4.mamba.out_proj",
131
  "model.layers.5.block_sparse_moe.router.layer",
132
  "model.layers.6.block_sparse_moe.router.layer",
133
- "model.layers.6.mamba.in_proj",
134
- "model.layers.6.mamba.out_proj",
135
  "model.layers.7.block_sparse_moe.router.layer",
136
- "model.layers.7.mamba.in_proj",
137
- "model.layers.7.mamba.out_proj",
138
  "model.layers.8.block_sparse_moe.router.layer",
139
- "model.layers.8.mamba.in_proj",
140
- "model.layers.8.mamba.out_proj",
141
  "model.layers.9.block_sparse_moe.router.layer",
142
- "model.layers.9.mamba.in_proj",
143
- "model.layers.9.mamba.out_proj",
144
  "model.layers.10.block_sparse_moe.router.layer",
145
- "model.layers.10.mamba.in_proj",
146
- "model.layers.10.mamba.out_proj",
147
  "model.layers.11.block_sparse_moe.router.layer",
148
- "model.layers.11.mamba.in_proj",
149
- "model.layers.11.mamba.out_proj",
150
  "model.layers.12.block_sparse_moe.router.layer",
151
- "model.layers.12.mamba.in_proj",
152
- "model.layers.12.mamba.out_proj",
153
  "model.layers.13.block_sparse_moe.router.layer",
154
- "model.layers.13.mamba.in_proj",
155
- "model.layers.13.mamba.out_proj",
156
  "model.layers.14.block_sparse_moe.router.layer",
157
- "model.layers.14.mamba.in_proj",
158
- "model.layers.14.mamba.out_proj",
159
  "model.layers.15.block_sparse_moe.router.layer",
160
  "model.layers.16.block_sparse_moe.router.layer",
161
- "model.layers.16.mamba.in_proj",
162
- "model.layers.16.mamba.out_proj",
163
  "model.layers.17.block_sparse_moe.router.layer",
164
- "model.layers.17.mamba.in_proj",
165
- "model.layers.17.mamba.out_proj",
166
  "model.layers.18.block_sparse_moe.router.layer",
167
- "model.layers.18.mamba.in_proj",
168
- "model.layers.18.mamba.out_proj",
169
  "model.layers.19.block_sparse_moe.router.layer",
170
- "model.layers.19.mamba.in_proj",
171
- "model.layers.19.mamba.out_proj",
172
  "model.layers.20.block_sparse_moe.router.layer",
173
- "model.layers.20.mamba.in_proj",
174
- "model.layers.20.mamba.out_proj",
175
  "model.layers.21.block_sparse_moe.router.layer",
176
- "model.layers.21.mamba.in_proj",
177
- "model.layers.21.mamba.out_proj",
178
  "model.layers.22.block_sparse_moe.router.layer",
179
- "model.layers.22.mamba.in_proj",
180
- "model.layers.22.mamba.out_proj",
181
  "model.layers.23.block_sparse_moe.router.layer",
182
- "model.layers.23.mamba.in_proj",
183
- "model.layers.23.mamba.out_proj",
184
  "model.layers.24.block_sparse_moe.router.layer",
185
- "model.layers.24.mamba.in_proj",
186
- "model.layers.24.mamba.out_proj",
187
  "model.layers.25.block_sparse_moe.router.layer",
188
  "model.layers.26.block_sparse_moe.router.layer",
189
- "model.layers.26.mamba.in_proj",
190
- "model.layers.26.mamba.out_proj",
191
  "model.layers.27.block_sparse_moe.router.layer",
192
- "model.layers.27.mamba.in_proj",
193
- "model.layers.27.mamba.out_proj",
194
  "model.layers.28.block_sparse_moe.router.layer",
195
- "model.layers.28.mamba.in_proj",
196
- "model.layers.28.mamba.out_proj",
197
  "model.layers.29.block_sparse_moe.router.layer",
198
- "model.layers.29.mamba.in_proj",
199
- "model.layers.29.mamba.out_proj",
200
  "model.layers.30.block_sparse_moe.router.layer",
201
- "model.layers.30.mamba.in_proj",
202
- "model.layers.30.mamba.out_proj",
203
  "model.layers.31.block_sparse_moe.router.layer",
204
- "model.layers.31.mamba.in_proj",
205
- "model.layers.31.mamba.out_proj",
206
  "model.layers.32.block_sparse_moe.router.layer",
207
- "model.layers.32.mamba.in_proj",
208
- "model.layers.32.mamba.out_proj",
209
  "model.layers.33.block_sparse_moe.router.layer",
210
- "model.layers.33.mamba.in_proj",
211
- "model.layers.33.mamba.out_proj",
212
  "model.layers.34.block_sparse_moe.router.layer",
213
- "model.layers.34.mamba.in_proj",
214
- "model.layers.34.mamba.out_proj",
215
  "model.layers.35.block_sparse_moe.router.layer",
216
  "model.layers.36.block_sparse_moe.router.layer",
217
- "model.layers.36.mamba.in_proj",
218
- "model.layers.36.mamba.out_proj",
219
  "model.layers.37.block_sparse_moe.router.layer",
220
- "model.layers.37.mamba.in_proj",
221
- "model.layers.37.mamba.out_proj",
222
  "model.layers.38.block_sparse_moe.router.layer",
223
- "model.layers.38.mamba.in_proj",
224
- "model.layers.38.mamba.out_proj",
225
  "model.layers.39.block_sparse_moe.router.layer",
226
- "model.layers.39.mamba.in_proj",
227
- "model.layers.39.mamba.out_proj",
228
  "lm_head"
229
  ],
230
  "kv_cache_scheme": null,
@@ -232,7 +164,7 @@
232
  "quantization_status": "compressed",
233
  "sparsity_config": {},
234
  "transform_config": {},
235
- "version": "0.12.3.a20251023"
236
  },
237
  "residual_multiplier": 0.22,
238
  "rms_norm_eps": 1e-05,
@@ -240,8 +172,8 @@
240
  "rope_theta": 10000,
241
  "router_aux_loss_coef": 0.0,
242
  "shared_intermediate_size": 1536,
243
- "tie_word_embeddings": false,
244
- "transformers_version": "4.56.2",
245
  "use_cache": true,
246
  "vocab_size": 100352
247
  }
 
88
  "num_bits": 8,
89
  "observer": null,
90
  "observer_kwargs": {},
91
+ "scale_dtype": null,
92
  "strategy": "token",
93
  "symmetric": true,
94
+ "type": "float",
95
+ "zp_dtype": null
96
  },
97
  "output_activations": null,
98
  "targets": [
 
104
  "dynamic": false,
105
  "group_size": null,
106
  "num_bits": 8,
107
+ "observer": "minmax",
108
  "observer_kwargs": {},
109
+ "scale_dtype": null,
110
  "strategy": "channel",
111
  "symmetric": true,
112
+ "type": "float",
113
+ "zp_dtype": null
114
  }
115
  }
116
  },
 
118
  "global_compression_ratio": null,
119
  "ignore": [
120
  "model.layers.0.block_sparse_moe.router.layer",
 
 
121
  "model.layers.1.block_sparse_moe.router.layer",
 
 
122
  "model.layers.2.block_sparse_moe.router.layer",
 
 
123
  "model.layers.3.block_sparse_moe.router.layer",
 
 
124
  "model.layers.4.block_sparse_moe.router.layer",
 
 
125
  "model.layers.5.block_sparse_moe.router.layer",
126
  "model.layers.6.block_sparse_moe.router.layer",
 
 
127
  "model.layers.7.block_sparse_moe.router.layer",
 
 
128
  "model.layers.8.block_sparse_moe.router.layer",
 
 
129
  "model.layers.9.block_sparse_moe.router.layer",
 
 
130
  "model.layers.10.block_sparse_moe.router.layer",
 
 
131
  "model.layers.11.block_sparse_moe.router.layer",
 
 
132
  "model.layers.12.block_sparse_moe.router.layer",
 
 
133
  "model.layers.13.block_sparse_moe.router.layer",
 
 
134
  "model.layers.14.block_sparse_moe.router.layer",
 
 
135
  "model.layers.15.block_sparse_moe.router.layer",
136
  "model.layers.16.block_sparse_moe.router.layer",
 
 
137
  "model.layers.17.block_sparse_moe.router.layer",
 
 
138
  "model.layers.18.block_sparse_moe.router.layer",
 
 
139
  "model.layers.19.block_sparse_moe.router.layer",
 
 
140
  "model.layers.20.block_sparse_moe.router.layer",
 
 
141
  "model.layers.21.block_sparse_moe.router.layer",
 
 
142
  "model.layers.22.block_sparse_moe.router.layer",
 
 
143
  "model.layers.23.block_sparse_moe.router.layer",
 
 
144
  "model.layers.24.block_sparse_moe.router.layer",
 
 
145
  "model.layers.25.block_sparse_moe.router.layer",
146
  "model.layers.26.block_sparse_moe.router.layer",
 
 
147
  "model.layers.27.block_sparse_moe.router.layer",
 
 
148
  "model.layers.28.block_sparse_moe.router.layer",
 
 
149
  "model.layers.29.block_sparse_moe.router.layer",
 
 
150
  "model.layers.30.block_sparse_moe.router.layer",
 
 
151
  "model.layers.31.block_sparse_moe.router.layer",
 
 
152
  "model.layers.32.block_sparse_moe.router.layer",
 
 
153
  "model.layers.33.block_sparse_moe.router.layer",
 
 
154
  "model.layers.34.block_sparse_moe.router.layer",
 
 
155
  "model.layers.35.block_sparse_moe.router.layer",
156
  "model.layers.36.block_sparse_moe.router.layer",
 
 
157
  "model.layers.37.block_sparse_moe.router.layer",
 
 
158
  "model.layers.38.block_sparse_moe.router.layer",
 
 
159
  "model.layers.39.block_sparse_moe.router.layer",
 
 
160
  "lm_head"
161
  ],
162
  "kv_cache_scheme": null,
 
164
  "quantization_status": "compressed",
165
  "sparsity_config": {},
166
  "transform_config": {},
167
+ "version": "0.12.3.a20251114"
168
  },
169
  "residual_multiplier": 0.22,
170
  "rms_norm_eps": 1e-05,
 
172
  "rope_theta": 10000,
173
  "router_aux_loss_coef": 0.0,
174
  "shared_intermediate_size": 1536,
175
+ "tie_word_embeddings": true,
176
+ "transformers_version": "4.57.1",
177
  "use_cache": true,
178
  "vocab_size": 100352
179
  }
generation_config.json CHANGED
@@ -3,5 +3,5 @@
3
  "bos_token_id": 100257,
4
  "eos_token_id": 100257,
5
  "pad_token_id": 100256,
6
- "transformers_version": "4.56.2"
7
  }
 
3
  "bos_token_id": 100257,
4
  "eos_token_id": 100257,
5
  "pad_token_id": 100256,
6
+ "transformers_version": "4.57.1"
7
  }
model-00001-of-00014.safetensors → model-00001-of-00007.safetensors RENAMED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:a4a6e0834590ac7935a737d79be3aecdb85d7357d52b2310178bead818aba9e9
3
- size 4894104208
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:617302bc883f67a43399c70fad10eb5c01e23e40eac7d69fead9a1617df0335c
3
+ size 4664217352
model-00002-of-00014.safetensors → model-00002-of-00007.safetensors RENAMED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:2091101cbf3f58e83c1ae6f1aa1f9e03e50a3da3d66fa8ae7f920992e1ee6e1a
3
- size 4749076040
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c245088455a60f9dabc0fcc2d78d3cc8455e97fef3f5467a4d032891465e1fb5
3
+ size 4664193144
model-00003-of-00014.safetensors → model-00003-of-00007.safetensors RENAMED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:9e4e5a282df3e2e0500e270ef132f9cd72a26d51c569db047c172911b299b6c4
3
- size 4586465728
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8d7b0fdb19ba78a4a1a27722612ed91b168e5ad334f0433557fca759491e565b
3
+ size 4654421800
model-00004-of-00014.safetensors → model-00004-of-00007.safetensors RENAMED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:596fed8185c2cbd24dd639dee43c866b96a5667ba4c49ec97ace499a1aba4217
3
- size 4749076080
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:78cd2af57c0f7a8fb6c1fa70a25746eef17a2078631a91b3113b2b4483093785
3
+ size 4657942800
model-00005-of-00007.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:17701a6d57dc4a5c78dda6a26ea7939f2901042375b15ed966ce5afaaac3d435
3
+ size 4648224424
model-00005-of-00014.safetensors DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:4ef8a4778927e73f4d4b8ec1a60fddb9f236ed3074d8893fa423653274ac9205
3
- size 4749076088
 
 
 
 
model-00006-of-00007.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:341e69f15a5759ae12954df8716c1830fd9455490703ebc75afaa46f58f830ac
3
+ size 4699234800
model-00006-of-00014.safetensors DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:34fa27a2bebb22d7e54bcb4fbbafdbe35506d197817cd1560ac03d97ebad4468
3
- size 4586465768
 
 
 
 
model-00007-of-00007.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ddad8844e8df67f3193459b903498fe193b76dd3748922a60ae971b581344f2d
3
+ size 4678797952
model-00007-of-00014.safetensors DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:be61a6358449389bdc2e4c52d9d094665ef171e4de067839f8c7f9cbca2d7830
3
- size 4749076088
 
 
 
 
model-00008-of-00014.safetensors DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:d5ef0d9d001d57ca0ed408ca225d2c6ac4d9f42a2a6300f9b96e48478d5dcd63
3
- size 4749076088
 
 
 
 
model-00009-of-00014.safetensors DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:6985a771159429c89c50dac303694e06a3137e08ae87ecee8aae8f9e1260a81b
3
- size 4586465768
 
 
 
 
model-00010-of-00014.safetensors DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:9960ee3e641cac45264c3709fdddf23534d7905c966807f09093896301016b58
3
- size 4749076088
 
 
 
 
model-00011-of-00014.safetensors DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:aa980f1b62b8982b5d4a57f15f753775ecda395c1bfebaa5a421493ef3b5b5a4
3
- size 4749076088
 
 
 
 
model-00012-of-00014.safetensors DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:89521f2ad74fbfdb32e61dd6a3d44033700ef6e1dacb8542d0335559c1f1a49c
3
- size 4749076088
 
 
 
 
model-00013-of-00014.safetensors DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:76372da816e4ba64fe6adc503aabba5f779cd54d3c6392e1c017c239f2fc9891
3
- size 4586465776
 
 
 
 
model-00014-of-00014.safetensors DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:df48182526d437406b2bed5cf25a7d53ad456cd23ceb65cce4beaaae6c2e1e2c
3
- size 3082172920
 
 
 
 
model.safetensors.index.json CHANGED
The diff for this file is too large to render. See raw diff
 
recipe.yaml CHANGED
@@ -1,32 +1,6 @@
1
- quant_stage:
2
- quant_modifiers:
3
  QuantizationModifier:
4
- config_groups:
5
- group_0:
6
- targets: [Linear]
7
- weights:
8
- num_bits: 8
9
- type: float
10
- symmetric: true
11
- group_size: null
12
- strategy: channel
13
- block_structure: null
14
- dynamic: false
15
- actorder: null
16
- observer: mse
17
- observer_kwargs: {}
18
- input_activations:
19
- num_bits: 8
20
- type: float
21
- symmetric: true
22
- group_size: null
23
- strategy: token
24
- block_structure: null
25
- dynamic: true
26
- actorder: null
27
- observer: null
28
- observer_kwargs: {}
29
- output_activations: null
30
- format: null
31
  targets: [Linear]
32
- ignore: [lm_head, 're:.*router', 're:.*mamba']
 
 
1
+ default_stage:
2
+ default_modifiers:
3
  QuantizationModifier:
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4
  targets: [Linear]
5
+ ignore: [lm_head, 're:.*block_sparse_moe.router']
6
+ scheme: FP8_DYNAMIC