# --n-cpu-moe Tuning Results (2026-06-20)

## Methodology

`--n-cpu-moe N` keeps MoE expert weights of the first N layers on CPU.
Lower N = more expert layers on GPU = more VRAM, potentially faster.

The flag only matters when N < the model's total layer count.
If N >= layer_count, all experts are on CPU regardless.

## Per-Model Results

| Model | Layers | File Size | ncm Tried | Best ncm | VRAM | t/s | Gain |
|-------|--------|-----------|-----------|----------|------|-----|------|
| Qwen3.6-35B-A3B-MTP | 40 | 22 GB | 128, 80, 32, 20 | **32** | 9.2 GB | 60.0 | +17% |
| Qwen3-Coder-30B | 48 | 18 GB | 128, 40, 42, 38, 35, 30 | **42** | 10.1 GB | 38.3 | +11% |
| Qwen3-Coder-Next-80B | 48 | 45 GB | 128, 42, 41, 40 | **42** | 8.4 GB | 35.7 | +8% |
| Qwen3-Coder-Next-REAP-40B | 48 | 24 GB | 46, 40, 36, 34, 32, 30, 28, 38 | **38** | 10.4 GB | 38.2 | +13% |
| GLM-4.7-Flash-REAP-23B | 48 | 14 GB | 128, 20 | **20** | 9.1 GB | 53.5 | +72% |
| Nemotron-3-Nano-30B | 52 | 23 GB | 128, 35, 20 | **38** | ~9 GB | 46.8 | +29% |

## Key Takeaways

1. **Smaller files benefit most** — GLM (14 GB) went from 2.6 GB to 9.1 GB VRAM, gaining +72%. 
2. **Largest files gain least** — Coder-Next (45 GB) went from 4.4 GB to 8.4 GB, only +8%.
3. **Qwen36 with MTP** — Same 35B arch as Coder-30B but 22 GB file. ncm=32 gave +17%.
4. **ncm=20 on GLM** — Moved 28/48 layer experts to GPU. Almost tripled VRAM usage.
5. **Stay >0.5 GB free** for compute buffer headroom. Models at ~10.8+ GB OOM'd intermittently.
