Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
|
@@ -20,21 +20,4 @@ tags:
|
|
| 20 |
|
| 21 |
## Reproduction
|
| 22 |
|
| 23 |
-
```python
|
| 24 |
-
from compressed_tensors.entrypoints.convert import convert_checkpoint, MagnitudeExpertPruner
|
| 25 |
|
| 26 |
-
convert_checkpoint(
|
| 27 |
-
model_stub="zai-org/GLM-5.3-Flash",
|
| 28 |
-
save_directory="GLM-5.3-Flash-MEP50",
|
| 29 |
-
converter=MagnitudeExpertPruner.from_pretrained(
|
| 30 |
-
"zai-org/GLM-5.3-Flash",
|
| 31 |
-
router_pattern=r"model\.language_model\.layers\.\d+\.mlp\.gate\.weight$",
|
| 32 |
-
expert_pattern=(
|
| 33 |
-
r"model\.language_model\.layers\.\d+\.mlp\.experts\.\d+\."
|
| 34 |
-
r"(gate_proj|up_proj|down_proj)\.(weight|weight_scale_inv)$"
|
| 35 |
-
),
|
| 36 |
-
sparsity=0.5,
|
| 37 |
-
),
|
| 38 |
-
max_workers=8,
|
| 39 |
-
)
|
| 40 |
-
```
|
|
|
|
| 20 |
|
| 21 |
## Reproduction
|
| 22 |
|
|
|
|
|
|
|
| 23 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|