318 GB
74 files
Updated about 1 month ago
Name
Size
.gitattributes1.64 kB
xet
.quant_summary.txt8.83 MB
xet
README.md5.43 kB
xet
chat_template.jinja5.08 kB
xet
config.json13.3 kB
xet
generation_config.json215 Bytes
xet
hf_quant_config.json7.41 kB
xet
model-00000.safetensors5 GB
xet
model-00001.safetensors5 GB
xet
model-00002.safetensors5.01 GB
xet
model-00003.safetensors5.13 GB
xet
model-00004.safetensors5 GB
xet
model-00005.safetensors5.01 GB
xet
model-00006.safetensors5.01 GB
xet
model-00007.safetensors5 GB
xet
model-00008.safetensors5 GB
xet
model-00009.safetensors5 GB
xet
model-00010.safetensors5 GB
xet
model-00011.safetensors5.01 GB
xet
model-00012.safetensors5 GB
xet
model-00013.safetensors5 GB
xet
model-00014.safetensors5 GB
xet
model-00015.safetensors5.01 GB
xet
model-00016.safetensors5.01 GB
xet
model-00017.safetensors5.01 GB
xet
model-00018.safetensors5 GB
xet
model-00019.safetensors5 GB
xet
model-00020.safetensors5 GB
xet
model-00021.safetensors5.01 GB
xet
model-00022.safetensors5 GB
xet
model-00023.safetensors5 GB
xet
model-00024.safetensors5 GB
xet
model-00025.safetensors5 GB
xet
model-00026.safetensors5.01 GB
xet
model-00027.safetensors5.01 GB
xet
model-00028.safetensors5 GB
xet
model-00029.safetensors5 GB
xet
model-00030.safetensors5 GB
xet
model-00031.safetensors5 GB
xet
model-00032.safetensors5 GB
xet
model-00033.safetensors5 GB
xet
model-00034.safetensors5.08 GB
xet
model-00035.safetensors5.01 GB
xet
model-00036.safetensors5.01 GB
xet
model-00037.safetensors5 GB
xet
model-00038.safetensors5 GB
xet
model-00039.safetensors5 GB
xet
model-00040.safetensors5.08 GB
xet
model-00041.safetensors5 GB
xet
model-00042.safetensors5 GB
xet
model-00043.safetensors5 GB
xet
model-00044.safetensors5 GB
xet
model-00045.safetensors5.01 GB
xet
model-00046.safetensors5.01 GB
xet
model-00047.safetensors5 GB
xet
model-00048.safetensors5 GB
xet
model-00049.safetensors5 GB
xet
model-00050.safetensors5.01 GB
xet
model-00051.safetensors5 GB
xet
model-00052.safetensors5 GB
xet
model-00053.safetensors5 GB
xet
model-00054.safetensors5 GB
xet
model-00055.safetensors5.01 GB
xet
model-00056.safetensors5 GB
xet
model-00057.safetensors5 GB
xet
model-00058.safetensors5 GB
xet
model-00059.safetensors5.08 GB
xet
model-00060.safetensors5 GB
xet
model-00061.safetensors5.01 GB
xet
model-00062.safetensors5.01 GB
xet
model-00063.safetensors2.34 GB
xet
model.safetensors.index.json12.6 MB
xet
tokenizer.json20.2 MB
xet
tokenizer_config.json790 Bytes
xet
README.md

GLM-5.2-504B-Nvidia — REAP keep-168 of NVIDIA's official NVFP4 (no retraining)

A 34%-expert-pruned GLM-5.2, cut directly from nvidia/GLM-5.2-NVFP4 using the exact same REAP keep-168 expert selection as 0xSero/GLM-5.2-504B. Whole-expert copy — NVIDIA's NVFP4 weights and scales are preserved bit-for-bit; no re-quantization, no fine-tuning.

This is a pure structural prune of NVIDIA's NVFP4 checkpoint. It keeps the highest-saliency 168 of 256 routed experts per layer and drops the rest. Unlike 0xSero/GLM-5.2-504B, it is not Router-KD recovered — the router gates here are the original rows sliced down to the kept experts. Use the recommended sampler guardrail below (it fully recovers pruning-induced looping for free).


What it is

GLM-5.2 is a GlmMoeDsaForCausalLM MoE — 78 layers (3 dense + 75 MoE) + 1 MTP layer, 256 routed experts per layer (top-8) + 1 shared expert, DeepSeek-style MLA attention with a DSA sparse "indexer," hidden size 6144.

This model keeps 168 of the 256 routed experts per layer (≈504B params, down from ~744–763B), uniformly across every MoE layer and the MTP layer (n_routed_experts: 168), so it loads and serves cleanly in vLLM.

Source nvidia/GLM-5.2-NVFP4 (NVIDIA modelopt NVFP4)
Prune method REAP — saliency = gate_weight × ‖expert_output‖, top-168 kept per layer
Expert selection identical to 0xSero/GLM-5.2-504B (same REAP plan)
Recovery none — raw structural prune (gates sliced, not KD-retrained)
Quantization NVFP4 on routed experts (3–77) + FP8 KV cache, preserved verbatim from NVIDIA; MTP layer 78 BF16
Params ~504B (34% of routed experts pruned)

How it was made

A direct safetensors transform — no GPU, no training, no re-quantization:

  1. For each MoE layer (3–78), keep the top-168 experts from the REAP saliency plan; copy each kept expert whole so its NVFP4 packing (weight, weight_scale, weight_scale_2, input_scale) travels intact. NVIDIA's quantized values are bit-identical to the source.
  2. Renumber surviving experts 0..167 and slice the router (gate.weight, gate.e_score_correction_bias) to the same 168 rows.
  3. Everything else — attention, shared expert, norms, embeddings, the MTP block — is copied verbatim. n_routed_experts is set to 168.

The MTP (next-token / multi-token-prediction) layer is preserved at 168 experts, so self-speculative decoding still works.

Serving (vLLM)

vllm serve 0xSero/GLM-5.2-504B-Nvidia \
  --tensor-parallel-size 8 \
  --quantization modelopt_fp4 \
  --kv-cache-dtype fp8 \
  --trust-remote-code \
  --max-model-len 262144

Recommended sampler guardrail — recover the loop cost for free

REAP pruning roughly doubles GLM-5.2's tendency to fall into repeat / </think>-restart loops (the dominant agent-use failure mode). As established in the GLM-5.2-504B report, this is fully recoverable at serving time with no retraining via a light sampler guardrail (measured at n=2000 on the keep-168 cut):

  • min_p=0.05, repetition_penalty=1.05 → gentle, safe default.
  • min_p=0.05, repetition_penalty=1.10 → drops looping to ~2.3% (below the unpruned teacher's raw 3.6%). Start at 1.05; go to 1.10 if you see loops.

Because this variant is not Router-KD recovered (the gates were not retrained), the guardrail is strongly recommended rather than optional. For the KD-recovered variant with the full evaluation, use 0xSero/GLM-5.2-504B.

Relationship to the GLM-5.2 REAP series

model source recovery use when
0xSero/GLM-5.2-504B 0xSero NVFP4 Router-KD you want the evaluated, recovered flagship
this model NVIDIA NVFP4 none you want NVIDIA's exact quantization, pruned
0xSero/GLM-5.2-REAP-504B-GGUF BF16 llama.cpp / CPU / Metal

📄 Method, evaluation, and the honest accounting of pruning cost: see the GLM-5.2-504B technical report.

Provenance & honesty

  • Expert selection is the same REAP keep-168 plan that produced 0xSero/GLM-5.2-504B.
  • NVFP4 routed-expert weights/scales are NVIDIA's, unmodified (whole-expert copy; no re-quant).
  • This specific variant was not separately re-evaluated; the behavioral numbers cited above come from the keep-168 cut in the linked report and are referenced as guidance, not as a fresh measurement of this checkpoint. It is not Router-KD recovered.

REAP expert-pruning applied to NVIDIA's NVFP4 GLM-5.2. Quantization by NVIDIA; pruning recipe from the GLM-5.2 REAP study.

Total size
318 GB
Files
74
Last updated
Jul 1
Pre-warmed CDN
US EU US EU

Contributors