Every Expert Counts: ExactMoE for Memory-Efficient W4A16 Inference
Organizations: Appendture Dubai, United Arab Emirates
Abstract
Sparse mixture-of-experts (MoE) language models reduce arithmetic by activating only a small subset of experts per token, yet deployment still requires storing and moving the full expert bank. We present ExactMoE, an inference design that applies symmetric group-128 four-bit weight quantization only to routed experts, stores those experts in kernel-native MARLIN form in pinned host memory, and executes all selected experts through a configurable GPU-resident slot cache and fused grouped MoE kernels. The router, attention, embeddings, normalization layers, and language-model head remain in BF16. "Exact" refers to complete expert availability and an unchanged top-k routing procedure: no expert is pruned, substituted, or forced to execute on the CPU. It does not imply numerical identity with the BF16 model. On OLMoE-1B-7B-0924-Instruct, evaluated on a single NVIDIA L4, a 16-slot configuration reduces peak reserved GPU memory from 14.168 to 1.836 GiB (87.04%) while retaining 81.85% of BF16 decode throughput. A fully resident 64-slot configuration reaches 31.923 tokens/s versus 21.662 tokens/s for BF16 while reserving 4.061 GiB. Across 12,450 zero-shot multiple-choice questions, ExactMoE obtains 70.3534% normalized accuracy versus 70.8996% for BF16, retaining 99.23% of the baseline accuracy. In a matched 16-token ablation, fused grouped execution is 1.97x as fast as a sequential W4 reference. These results identify a practical memory-transfer-throughput frontier for complete-expert MoE inference.
Figures & tables
| Method | Slots | Decode | TTFT | Reserved | Hit rate | H2D |
|---|---|---|---|---|---|---|
| (tok/s) | (ms) | (GiB) | (%) | (GiB) | ||
| BF16 | – | 21.66 | 79.03 | 14.17 | – | 0.00 |
| ExactMoE | 8 | 15.76 | 340.77 | 1.48 | 38.8 | 30.04 |
| ExactMoE | 16 | 17.73 | 290.42 | 1.84 | 56.3 | 21.44 |
| ExactMoE | 32 | 21.66 | 210.74 | 2.58 | 81.4 | 9.13 |
| ExactMoE | 64 | 31.92 | 33.92 | 4.06 | resident | 0.00 |
| Method | Wiki PPL | Dolly PPL | MC acc. norm | MC acc. raw |
|---|---|---|---|---|
| BF16 | 17.8185 | 11.1014 | 70.8996% | 59.0602% |
| ExactMoE W4A16 | 18.5047 | 10.9399 | 70.3534% | 58.5542% |
| Task | BF16 | W4A16 | McNemar | ||
|---|---|---|---|---|---|
| ARC-Easy | 570 | 58.42% | 58.77% | 0.8877 | |
| PIQA | 1,838 | 75.68% | 75.73% | 1.0000 | |
| HellaSwag | 10,042 | 70.73% | 70.03% | 0.0027 | |
| Aggregate | 12,450 | 70.90% | 70.35% | 0.0112 |
| Batch | BF16 tok/s | W4A16 tok/s | BF16 reserved GiB | W4A16 reserved GiB |
|---|---|---|---|---|
| 1 | 32.14 | 15.74 | 14.15 | 1.82 |
| 2 | 46.64 | 28.26 | 14.16 | 1.83 |
| 4 | 58.07 | 47.39 | 14.18 | 1.85 |
| 8 | 65.25 | 90.02 | 14.68 | 1.86 |
Mixture-of-Experts Inference
Mixture-of-experts inference studies how to run sparsely activated expert models efficiently while preserving their quality.
See all 177 papers