← Blog · · 7 min read
Cutting MoE experts is a free speedup — we measured it: about 1.07x, minus 8 GSM8K points
On this page (8 sections)
"Lower num_experts_per_tok and your MoE gets faster almost for free" keeps coming up on r/LocalLLaMA. On Qwen3.6-35B-A3B (4-bit, MLX) on an M3 Max, halving the experts per token from 8 to 4 sped up decode only 1.07–1.12x and cost 8.0 GSM8K points.
TL;DR: On our machine, cutting top-k from 8 to 6, 4 and 2 made decode 1.07x, 1.12x and 1.15x faster on the median of all runs. After we drop 5 runs that slowed down for an unknown reason, the gains are 1.07x, 1.07x and 1.15x. GSM8K accuracy held at k=6 (67.3% vs 64.0%, within noise), fell to 56.0% at k=4 and collapsed to 14.7% at k=2. Peak memory stayed between 20.17 and 20.22 GB in every config. Only k=6 is close to free, and it buys about 7%, within run-to-run spread.
The tip assumes routed experts are most of the work
Qwen3.6-35B-A3B has 256 routed experts in each of its 40 MoE layers, and its router sends each token to 8 of them. num_experts_per_tok (called top_k in mlx_lm) sets that 8. The reasoning behind the tip is that decode on a Mac is limited by memory bandwidth, so reading half the expert weights per token should get you close to 2x.
For that to hold, two things have to be true. Routed-expert weights must make up most of the bytes read per token, and the model must keep its quality with fewer experts. But attention, the Gated DeltaNet layers (a linear-attention layer type), the always-on shared expert, the embeddings and the LM head stay the same size whatever k is.
So before running anything, our hypothesis was that the speedup would land well short of the bandwidth math.
| case | expected | measured |
|---|---|---|
| k=6 | nearly free speedup | 1.07x decode, GSM8K +3.3 pp (within noise) |
| k=4 | up to 2x decode, small loss | 1.07–1.12x decode, GSM8K -8.0 pp |
| k=2 | up to 4x decode | 1.15x decode, GSM8K -49.3 pp |
| any k | less memory | 20.17-20.22 GB peak, unchanged |
Going down to 2 experts bought only 15%
At k=2 the router picks a quarter as many routed experts per token as at k=8. Decode went from 81.9 to 94.0 tok/s. That is 1.15x whether or not we drop the slow runs, nowhere near 4x.
We didn't profile where the remaining time goes. Our hypothesis is the one above: on this model, most of the per-token cost sits in layers that k doesn't touch, plus fixed per-step overhead.
The model paid heavily for those 15%. GSM8K fell from 64.0% to 14.7% (22 of 150 correct), a drop of 49.3 points with a 95% CI of [-57.3, -41.3]. Wikitext-2 perplexity rose from 6.559 to 17.175, which is 2.6x the baseline.
9 answers at k=2 contained no number at all, and no other config produced any. At k=2 the answer format starts to break along with the math.
Halving to 4 experts: 7–12% faster, 8 points worse
k=4 is what the tip usually means. Decode rose to 91.4 tok/s, 1.12x over the median of all k=8 runs. Over the clean runs only, it was just 1.07x, no faster than k=6.
GSM8K fell from 64.0% to 56.0%. The paired bootstrap CI for the difference is [-14.0, -2.0] points. It excludes zero, so even with only 150 questions this is not sampling noise. Perplexity rose 17.2%, to 7.685.
The format held: zero unparseable answers, the same as k=8. More answers ran into the 384-token limit, 74 against 60 at k=8, so part of this loss may come from length rather than reasoning. As a single number for deciding, k=4 gives you at most 1.4% more decode speed for each GSM8K point you lose.
Only k=6 looks free, and it buys about 7%
At k=6, decode went to 87.3 tok/s (1.07x), and the clean-run medians give the same 1.07x. GSM8K came out at 67.3%, 3.3 points above k=8. But the CI of [-2.0, +8.7] includes zero, so we read this as no measurable change, not as an improvement.
Perplexity moved from 6.559 to 6.759, up 3.0%. That is a small shift, and it shows the model's predictions did change, even though 150 questions are too few to detect it on GSM8K.
So at k=6 the "nearly free" half of the tip holds. The speedup half amounts to about 7%, and that is within run-to-run spread: even without the slow runs, the k=8 and k=6 speed ranges overlap.
Fewer experts does not mean less memory
Peak memory was 20.18 GB at k=8, 20.22 at k=6, and 20.17 at both k=4 and k=2. We changed only how many experts the router picks per token, and the weights for all 256 experts stay loaded either way.
If you hoped a lower top-k would let this model fit on a Mac with less RAM, it won't.
How we tested
- Model
mlx-community/Qwen3.6-35B-A3B-4biton MLX 0.31.2 and mlx_lm 0.31.3, Python 3.13.5, macOS 27.0.1, on an M3 Max running on AC power. Our script failed to record the chip name and RAM, so the machine label comes from our setup notes, not from the log. - Routing worked the way the model's code already does it: a softmax over all 256 router logits, then keep the top k, then divide those k probabilities by their sum (
norm_topk_prob=True). The shared expert stayed on. We settop_kon all 40 MoE layers at runtime, so the model loaded only once (excerpt):
def set_k(self, k):
for m in self.moes:
m.top_k = k
- We checked that the change took effect. The expert-index tensor had width k in all 40 layers for every k, and k=8 after toggling reproduced the unmodified model's first 48 greedy tokens exactly.
- Speed: a 512-token prompt, 256 greedy tokens, 1 warm-up and 5 timed runs per k, single stream, median reported. Quality: wikitext-2 perplexity over the first 32,768 test tokens in 16 windows of 2048 tokens. GSM8K: 150 test questions (seed 0), 0-shot, thinking off, greedy, max 384 new tokens, generated in batches and scored with one answer-extraction rule for all k, with paired bootstrap CIs from 10k resamples.
- Fairness: every k got the same prompt, the same perplexity windows and the same 150 questions, with 5 timed repeats per k. We interleaved configs in a rotating order to spread out thermal drift, and
pmset -g thermrecorded no thermal warnings. The full run took 24 minutes.
What the numbers can't tell you
- 5 of the 20 timed runs slowed to between 4.8 and 16.0 tok/s, far below the rest. They came in two bursts, in the first and fourth rounds of the rotation, which points to something outside the benchmark (memory pressure, swap or another process) rather than run-to-run variance. We don't know the cause. 2 of those runs were at k=8, which pulls the all-run k=8 median down to its slowest normal run, so we report speedups both with and without them.
- 60 of 150 GSM8K answers hit the 384-token cap even at k=8, and those were scored on the last number in a cut-off output. That count rose to 62, 74 and 81 at k=6, 4 and 2, so part of the k=4 and k=2 losses may reflect longer answers rather than weaker reasoning. Our absolute accuracy is not comparable to the model card, and the differences between k values carry this confounder.
- We tested one model, one 4-bit quantization, one runtime, one machine and one renormalization rule. Other MoEs may behave differently, especially ones where routed experts make up a bigger share of the weights read per token.
What this means for you
- If you want a little more speed from this model and can accept a small shift in perplexity, k=6 is the only setting we'd call nearly free: about 7% faster decode, within run-to-run spread, and no measurable GSM8K loss.
- For math or reasoning, don't go down to k=4: you get at most 1.4% of speed for each accuracy point you lose. k=2 is not usable.
- None of this helps if you need to save memory, because memory doesn't go down. It also doesn't carry over to other models, quantizations or runtimes until someone measures them.
The code, the raw JSONL outputs for every answer and the full results table are at https://hackbig.com/blog-data/qwen36-moe-fewer-experts/.
If you've measured top-k reduction on another MoE, how close did your speedup get to the ratio of experts you dropped?
Code and raw data for this post
How this was made: an AI agent (Claude) designed and ran this experiment on our own MacBook in a sandbox; every number comes from the run's results file (linked below), checked by script before publishing.