What was done
- Saliency (REAP) on the full 512-expert model, loaded as the official FP8 checkpoint
with transformers 4.57.1 on 1× H200:
S_e = mean over routed tokens of (renormalized top-k router weight × ‖expert_output‖₂).
- Calibration data: 1,024 windows × 2,048 tokens = 2.1M tokens of teacher-written code
(prompt + Qwen3-Coder-Next answer) from the companion KD dataset
ch2oma/qwen3-coder-next-kd-top20
(Magicoder-OSS + evol-codealpaca prompts, decontaminated against HumanEval/MBPP).
- Pruning: keep the top-128 experts per layer by saliency, remap expert indices, slice the
router (
mlp.gate) rows. Attention, DeltaNet, shared experts, embeddings and lm_head are untouched.
The kept indices are in reap_keep.json.
- Weights stay in the original block-FP8 (128×128) format with
weight_scale_inv.
config.json only changes num_experts to 128.
Intended target: 6 GB-class GGUF (IQ2_XXS) for an Intel Iris Xe iGPU / 16 GB laptop.
Usage
Loads like the official FP8 model (needs a GPU with FP8 support, e.g. Hopper/Ada, for transformers;
vLLM also works). To get bf16 for training / GGUF on other GPUs, dequantize block-wise:
W_bf16 = W_fp8.float() * repeat(weight_scale_inv, 128, 128),
or convert straight to GGUF with recent llama.cpp (--outtype bf16 dequantizes FP8 itself).
Evaluation
Table with columns: Model, HumanEval, HumanEval+, MBPP, MBPP+| Model | HumanEval | HumanEval+ | MBPP | MBPP+ |
|---|
| Qwen3-Coder-Next 80B FP8 (parent) | 92.7 | 87.2 | 91.8 | 76.7 |
| This model, IQ2_XXS (imatrix), ~6 GB, before healing | 82.3 | 78.0 | 78.8 | 63.2 |
EvalPlus, greedy, max 1536 new tokens, prompt: "Please provide a self-contained Python script
that solves the following problem in a markdown code block".
GGUF files are in gguf/, quantized with an importance matrix computed on 300 × 512 tokens of
teacher-written code (gguf/imatrix128.dat). Scores were measured with llama.cpp on GPU.
Roadmap
Credits
- Base model: Qwen/Qwen3-Coder-Next (Apache-2.0)
- Method: REAP, Cerebras Research ("REAP: One-Shot Pruning for Trillion-Parameter Mixture-of-Experts Models")