LoopREAP: Loop-Aware Expert Pruning, the 512→32 Scaling Cliff, and Shared-PLE Multi-Tier MoE Deployment
Why standard T=1 REAP misses Pass-2 recurrent specialists, empirical 512→256→128→64→32 zero-shot pruning benchmarks on T=2 looped Qwen4-exp MoEs, a 2.5× zero-shot lift from T=2 REAP on 35B, and a shared-PLE architecture for consumer GPUs.
บทความนี้เป็นภาษาอังกฤษ ยังไม่มีคำแปลภาษาไทย
Following our Broot-65B-A6B Loop-Aware Dynamic Quantization release, we investigated a natural next question: how far can we structurally prune a T=2 recurrent-depth looped MoE (512 → 256 → 128 → 64 → 32 experts/layer) on a single 16 GB consumer GPU, and what changes when pruning is aware of the recurrent loop?
- Stage 0 (
125B-A6B, 512 experts): thestashthai/BeQwause_no_qwen4-GGUF - Stage 1 (
65B-A6B, 256 experts): thestashthai/Broot-65B-A6B-GGUF - Stage 2 (
35B / 20B / 12B, Open Previews): thestashthai/Broot-Family-Open-Previews
1. Motivation: Why T=1 REAP Misses Recurrent Specialists
Standard REAP (Router-weighted Expert Activation Pruning) scores each expert (l, e) during a single forward pass (T=1) by how much it moves the residual stream:
$$S^{\text{REAP}}{l,e} = \sum{t} w_{l,e}(x_t) \cdot |f_{l,e}(x_t)|_2$$
In a recurrent-depth looped MoE (T=2), however, the 16-layer recurrent core (L16–L31) executes twice per token — Pass 1 on raw early representations, and Pass 2 on already-refined hidden states modulated by the gated_workspace and router LoRA overlays (core_steps.0..15.layer.mlp.gate.lora_b).
Because Pass 2 sees a shifted activation distribution and modified router logits, Pass 2 activates a different subset of core experts than Pass 1. Pruning a 512-expert base model with T=1 statistics (as in Groot-65B) risks discarding specialists that only fire during the second reasoning pass.
LoopREAP addresses this directly:
- Recurrent Trace Collection (
T=2active): Collect routing dispatches with theT=2loop adapter enabled so everyL16–L31expert accumulates saliency across both Pass 1 and Pass 2. - Norm-Weighted Saliency: Multiply each expert’s
T=2routing weight by its output projection magnitude (||W_down||_Fas a fast zero-rebuild proxy, or exact||f_{l,e}(x_t)||_2). - Co-Slicing All Three Artifacts: Slice the
.basaltexpert blobs + BF16 router gates (blk.L.ffn_gate_inp.weight), all 24core_steps+codarouter LoRA heads (ckpt_final_groot{ne}.safetensors), and the VRAM hotness profile (qwen4exp-48x{ne}.prof) with identical per-layer index maps.
2. Empirical 512 → 256 → 128 → 64 → 32 Zero-Shot Scaling Cliff
Using our 26-task programmatic evaluation suite (10 Olympiad Math, 8 Unit-Tested Python Coding, 8 BoB/Hermes Tool-Calling Harness) on a single RTX 4070 Ti SUPER (16 GB VRAM) + Ryzen 9 9950X + 64 GB DDR5 running Adamant (nixcat-dev’s fork of Basalt) with our T=2 loop-adapter patches:
| Stage | Model | Experts / Layer | Experts Size | T=2 Total | Math | Code | Harness | Decode tok/s | Status |
|---|---|---|---|---|---|---|---|---|---|
| Stage 0 | Qwen3.8-FN UD-IQ2_XS (ref) | 512 | 38.8 GiB | 26/26 | 10/10 | 8/8 | 8/8 | 74.3 | Production |
| Stage 0 | BeQwause_no_qwen4 (LoopUD-IQ2_XL) | 512 | 38.8 GiB | 24/26 | 9/10 | 8/8 | 7/8 | 70.9 | Production |
| Stage 1 | Broot-65B (LoopUD-IQ4_XS) | 256 (1/2) | 29.0 GiB | 25/26 | 10/10 | 8/8 | 7/8 | 58.4 | Production |
| Stage 2a | Broot-NE128 (~35B-A6B, freq-only) | 128 (1/4) | 15.1 GiB | 2/26 | 0/10 | 0/8 | 2/8 | 83.5 | Open Preview |
| Stage 2a+ | Broot-NE128-REAP (T=2 REAP) | 128 (1/4) | 15.1 GiB | 5/26 | 1/10 | 0/8 | 4/8 | 71.6 | Open Preview (2.5× zero-shot lift) |
| Stage 2b | Broot-NE64 (~20B-A6B, 100% VRAM) | 64 (1/8) | 7.5 GiB | 1/26 | 0/10 | 0/8 | 1/8 | 134.1 | Open Preview |
| Stage 2c | Broot-NE32 (~12B-A6B, 100% VRAM) | 32 (1/16) | 3.8 GiB | 0/26 | 0/10 | 0/8 | 0/8 | 129.0 | Open Preview |
Three Key Findings
- The Zero-Shot Cliff Sits Between
256and128: Direct weight inspection confirmedGroot-65Bdid zero router healing (min_cos = 0.999998,norm_ratio = 1.000000 ± 0.000005vs. QFN-125B). At50%pruning (512 → 256), redundancy absorbs the cut (25/26). Past50%(256 → 128),top_k = 10routing pulls in low-rank experts whose normalized softmax weights inject residual noise, collapsing zero-shot coding and arithmetic. T=2REAP Delivers a 2.5× Zero-Shot Jump Over Frequency Pruning: Across179,584T=2routing dispatches, expert||W_down||_Fnorms varied by10.38×. WeightingT=2routing by||W_down||_Fswapped39.2%(2,409 / 6,144) of the kept experts — immediately liftingNE=128from2/26→5/26(4/8Harness,1/10Olympiad Math) with zero gradient updates and only WikiText-2 calibration text.- 100% VRAM Residency Unlocks
130+ tok/sLooped Inference: AtNE=64(7.5 GiBexperts) andNE=32(3.8 GiBexperts), the entire MoE fits statically inside a 16 GB GPU (and even 8–12 GB GPUs forNE=32), hitting129–134 tok/seven underT=2recurrent looping.
3. Shared-PLE Multi-Tier Architecture (--ple-gguf)
A major practical discovery for deploying a multi-size family locally: all 5 tiers (125B, 65B, 35B, 20B, 12B) share the exact same ~27 GiB PLE n-gram lookup table (per_layer_token_embd.weight).
Because Adamant natively supports --ple-gguf FILE, a local deployment can mount one shared PLE file instead of duplicating 27 GiB per tier. The marginal footprint to add each smaller tier drops dramatically:
| Tier | Experts (LoopUD-IQ4_XS) | Experts (LoopUD-IQ3_XXS) | Marginal Disk Footprint w/ Shared PLE (IQ3_XXS + Dense) |
|---|---|---|---|
12B-A6B (NE=32) | 3.8 GiB | 2.9 GiB | ~4.5 GiB |
20B-A6B (NE=64) | 7.5 GiB | 5.8 GiB | ~7.5 GiB |
35B-A6B (NE=128) | 15.1 GiB | 11.7 GiB | ~13.5 GiB |
65B-A6B (NE=256) | 29.0 GiB | 23.3 GiB | ~25.0 GiB |
4. Next Up: Stage 3 Router Healing & Non-Uniform LoopREAP
- Consumer-GPU Router + Loop-LoRA Healing (Stage 3): Keep all quantized base experts frozen and mmap the PLE table (
< 2.5 GBRAM); train only the 48 router gates (3.9–15.7Mparams) and the existingr=16Loop-LoRA (~133Mparams) against rejection-sampledT=2teacher traces fromBroot-65B/BeQwause_no_qwen4. Fits comfortably on a 2-PC consumer setup (RTX 4070 Ti SUPER 16 GB healingNE=64in parallel with RTX 5070 12 GB healingNE=32). - Direct
512 → NE(layer)Non-UniformLoopREAP: Instead of uniform pruning, retain256experts inside theL16–L31loop core (whereT=2executes twice) while pruning insensitive non-loop layers (L00–L15,L32–L46) down to64–128experts — concentrating parameter capacity directly inside the recurrent thinking core.
License
- Weights, Adapters, Profiles, Scripts & Recipes: Licensed under the Apache License 2.0 (fully open source).
- Paper & Analysis: Licensed under CC BY 4.0 (free to share and adapt with attribution).