Appearance
A 42-billion-parameter MoE model at Q4_K_M is about 24GB of weights. If your GPU has 16GB of VRAM, that number is the whole problem.
You have three ways out. Shrink the weights (quantization). Make the model deeper without adding weights (looping). Or move part of it somewhere else (offloading). Each route has new work behind it, and each one fails in a different way. Here's what three recent sources say about all three.
Quantization has three knobs, and most toolchains turn them one at a time
Strip away the branding and post-training quantization is three decisions. You pick a clipping range for each channel or block. You optionally apply a linear transformation to spread outliers before rounding. You decide which of the two nearest levels each weight rounds to.
Most production pipelines make these decisions in sequence, each minimizing a local reconstruction objective. GPTQ picks rounding to minimize per-layer output error on calibration data. Rotation-based methods pick a transform that flattens activation outliers. Scale selection usually goes first and never gets revisited.
The paper "A Unified Hessian-Guided Framework for Post-Training Quantization" (arXiv:2610.40345) argues that this decomposition is the wrong shape. A layer with a large reconstruction error can sit somewhere the residual stream absorbs the damage. A layer with a tiny one can sit right where the next attention pattern gets decided. Local error and downstream error aren't the same quantity.
Directly optimizing the task metric is the obvious fix and it doesn't work, because quantization is discontinuous and every candidate configuration costs a full evaluation pass. Their alternative is a second-order proxy: derive a Hessian-guided estimate of how much the model's output changes when weights and activations are quantized together, approximate that Hessian with a tractable Fisher matrix, and then optimize ranges, transforms, and rounding jointly against that single sensitivity score.
The claim is that this works in both channel-wise and block-wise settings, which matters. Block-wise quantization with 128-weight groups is the default for anything you'd actually ship at 4 bits, so a method that only wins in the channel-wise regime would be academic.
What joint optimization actually buys you
I'd want the per-task deltas before betting a production checkpoint on this. The abstract reports consistent improvement over existing transformation and rounding methods, not a specific perplexity drop, and the improvement will depend heavily on how well your calibration set matches your traffic.
Still, the framing is useful even if you never run their solver. It tells you which knob is doing the work at which bit width:
| Knob | What it sets | Usual default | Symptom when it's wrong |
|---|---|---|---|
| Range / scale | Clip point per channel or per 128-weight group | Min-max or percentile | Loud failures on outlier-heavy prompts, clean everywhere else |
| Linear transform | Rotation or per-channel scaling applied before rounding | Identity, or a fixed Hadamard | Accuracy loss that only shows on long-tail inputs |
| Rounding | Which of the two nearest levels each weight takes | Round-to-nearest, or GPTQ error compensation | Steady perplexity creep, much worse at 3 bits than 4 |
At 8 bits, range choice barely matters. At 4 bits, rounding and transform dominate. At 3 bits, all three interact and sequential tuning starts to hurt, which is exactly the regime this line of work targets.
The cost is calibration time. A joint solve over three parameter groups against a Fisher estimate is more expensive than three independent least-squares problems. That's a one-time bill during export, so it's cheap relative to a retrain and expensive relative to running llama-quantize and going home.
Looping buys depth with someone else's parameters
The second paper, "How to Loop Your Transformer: Loop Scaling, Specialization, and Parallel Inference" (arXiv:2610.40325), takes the opposite approach. Instead of making each weight cheaper, it makes each weight do more work by applying the same transformer block repeatedly.
Parameter count stays flat. Compute per token grows linearly with loop count. So looping is a way to convert compute budget into depth, and the interesting question is when that trade beats just building a wider model.
The study is dense decoder-only models trained from scratch, up to 1B parameters, 155B tokens, 1.07×10²¹ FLOPs, and as many as 32 loops. One billion parameters fits on a single consumer card at 8 bits with room for a KV cache, so this is a study of the regime most people can actually run, not frontier scale. Thirty-two loops means thirty-two sequential passes through the stack at decode time, which is where the trouble starts.
Their findings are more conditional than the framing suggests:
| Design decision | Wins when | What it costs |
|---|---|---|
| Loop the full stack | Parameter budget is the binding constraint | One full forward pass per loop, serial decode |
| Loop a middle block of layers | Training FLOPs are the binding constraint | Less quality per loop than full-stack looping |
| Add loop-specific low-rank adapters | You're going past a handful of loops | Extra parameters that grow with loop count |
| Parallel loop stages | Decode latency matters more than peak quality | Needs the normalization fix to recover quality |
Two results stand out. Gains saturate and eventually reverse or destabilize as you add loops, so "more loops" is not a dial you can turn up indefinitely. And forcing every loop to share identical weights leaves quality on the table: small per-loop LoRA adapters help, with larger gains at higher loop counts. That makes sense. A loop that has to serve as both layer 5 and layer 20 is being asked to do two jobs.
The decoding tax and the parallel fix
Looping is free at train time in the sense that it adds no parameters, and expensive at inference in the sense that it adds latency. Token generation becomes N sequential forward passes for N loops. A model that's 4x deeper by looping is roughly 4x slower per token.
Parallel Loop Transformers attack this by passing hidden states between loops across adjacent token positions. Stage k for token t can run at the same time as stage k-1 for token t+1, turning the loop dimension into a pipeline. Throughput goes up while per-token latency stays closer to a single pass.
The original formulation doesn't reliably keep the quality gains, though. The fix the authors land on is small and specific: preserve the current-token embedding, normalize it separately from the previous-token hidden state, and only then combine them.
Without that separate normalization, the mixed signal degrades as it moves down the pipeline. With it, the authors report recovering the quality of ordinary looping across model scales and training budgets. If you're implementing a parallel loop decoder and your quality quietly falls apart, check your normalization order before you check anything else.
Five MoE models, 16GB of VRAM, and an assumption that didn't survive
Quantization and looping are export-time and architecture-time decisions. Offloading is a runtime decision, and it's the one most people actually make on a laptop.
The setup: an RTX 4090 Laptop with 16GB of VRAM, an i9-14900HX, 32GB of DDR5, llama.cpp with CUDA and Flash Attention on, 4K context, one warm-up request, one short benchmark prompt per configuration. Every model was larger than VRAM, which was the point.
The rig, concretely: 16GB VRAM, 32GB system RAM, llama.cpp with
--n-cpu-moe Nfor selective expert offloading and standard layer splitting as the control.
The theory behind selective MoE offloading is appealing. Dense models activate every parameter per token, so moving a layer to the CPU moves work to the CPU. MoE models activate a fraction of their experts, so you can keep attention and shared layers on the GPU and park only expert weights in system RAM. In llama.cpp that's --n-cpu-moe N, where N is how many initial layers get CPU-resident experts.
I expected it to win across the board. It didn't.
| Model | Quant | GGUF size | Selective MoE | Layer offload |
|---|---|---|---|---|
| Phi-3.5-MoE (42B) | Q4_K_M | 24GB | 5.67 tok/s | 4.03 tok/s |
| Apex-35B | Q5_K_M | 24GB | 5.18 tok/s | 3.69 tok/s |
| Qwen3.5-35B-A3B | Q6_K | 27GB | 4.37 tok/s | 5.23 tok/s |
| Gemma 4 26B A4B | Q8_0 | 26GB | 4.40 tok/s | 5.77 tok/s |
| LFM2.5-24B-A2B | Q8_0 | 24GB | 2.11 tok/s | 9.03 tok/s |
Selective offloading won by roughly 40% on Phi and Apex. It lost on Qwen, Gemma, and catastrophically on LFM, where layer splitting was 4.3x faster. Same technique, same machine, opposite conclusions depending on the checkpoint.
The VRAM headroom result, and the pushback it earned
The result I liked most was also the one that didn't survive scrutiny. On Phi-3.5-MoE, pushing almost the entire 16GB of VRAM full gave 5.29 tok/s at 13 CPU expert layers. Backing off to 20 CPU layers, which used only 11GB, gave 5.67 tok/s.
| CPU expert layers | VRAM used | Generation |
|---|---|---|
| 13 | 15,945 MiB | 5.29 tok/s |
| 16 | 13,833 MiB | 4.66 tok/s |
| 20 | 11,015 MiB | 5.67 tok/s |
The pushback I got was about noise, and it was correct. The context-length sweep in the same session gave 5.67, 5.56, and 5.85 tok/s across 4K, 8K, and 16K with nothing else changed. That's about a 5% spread on a 5.69 mean, from a single run with a short output. That number is the noise floor for this whole experiment.
Against a 5% floor, the 20-vs-13 gap of 7% is barely a signal, and the 16-layer cell at 4.66 tok/s sits 18% below both neighbors with no mechanism to explain a dip at exactly 16. Either something real happens there or the single-run spread is wider than the context table suggests. The honest read is that the "less VRAM, same or better speed" story is unproven, and I'd want interleaved A/B/A/B runs with longer generations before repeating it.
The headline survives, though. 5.67 vs 4.03 on Phi, 5.18 vs 3.69 on Apex, and 9.03 vs 2.11 on LFM are all three to four times the noise floor. Selective offloading is not a universal win. That conclusion is safe.
One free methodology note from that exchange: on a laptop, run configurations interleaved rather than grouped. Thermals and background load drift across a session, and running all A then all B loads that drift onto one arm.
Why 2B active parameters didn't make LFM fast
LFM2.5-24B-A2B has about 24B total parameters and roughly 2B active per token, which sounds like the ideal candidate for selective expert offloading. It performed worst of the five.
Active parameter count tells you how much compute a token needs. It doesn't tell you how many bytes have to cross the PCIe bus or how many CPU-GPU synchronizations you eat. At Q8_0, each token still pulls gigabytes of expert weights across the memory bus if the cache doesn't hold them, and the CPU side of that transfer is bandwidth-bound in a way the GPU side isn't.
That also explains the suspicious Qwen/Apex split. Apex-35B at Q5_K_M liked selective offloading. Qwen3.5-35B at Q6_K, a related architecture, preferred layer splitting. Higher precision means more bytes per expert per token on the CPU side. Testing the same checkpoint at Q4, Q5, and Q6 through both methods would isolate that, and nobody has published it yet.
Two practical rules fall out. First, benchmark your specific checkpoint rather than trusting a heuristic keyed on active parameter counts. Second, expect the answer to change when you change quantization level, which means re-benchmarking after any requant.
One more data point from the same session: --cpu-moe, which moves all experts to CPU, loaded fine and then hammered swap at roughly 90MB/s. Generation fell to 3.14 tok/s. On 32GB of RAM, that's the wall. Watch your swap counter, not your token rate, when a model "successfully" loads.
What trips people up
Benchmarking with a single run and a short output. The spread from the context sweep was about 5% on identical hardware with only the reserved context size changed. Any result inside that band is not a result. Run each configuration at least three times with longer generations.
Setting -c higher to "use the VRAM you paid for." On Apex-35B, going from 4K to 16K of reserved context cost roughly 252 MiB. Context reservation is cheap. Pushing VRAM to 100% full is not the same thing as maximizing speed, and the 13-layer run at 15,945 MiB was not the fastest.
Assuming low active parameters means a good offload target. LFM activates about 2B per token and ran 4.3x slower under selective offloading. Bytes moved and synchronization count matter more than FLOPs here.
Grouping your benchmark runs. All-A-then-all-B lets thermal drift and background load land entirely on one arm. Interleave them.
Ignoring quantization level when comparing architectures. A Q5 MoE and a Q6 MoE of the same family behave differently under the same offload policy, because CPU-side expert inference is bandwidth-bound and precision changes the byte count.
One thing to remember
All three routes trade one resource for another and each one has a saturation point. Quantization runs out of bits around 4, looping runs out of quality past a handful of repeats, and offloading runs out of memory bandwidth as soon as expert weights start living in system RAM. The failure mode is always the same shape: the thing you optimized stops being the bottleneck.
The bottom line
If you're shipping a quantized checkpoint to production, look at joint optimization of scales, transforms, and rounding before you drop to 3 bits. The Hessian-guided framing in arXiv:2610.40345 is the right objective shape, and at 4-bit block-wise quantization the rounding and transform choices are where your accuracy is going.
If you're training a small model from scratch under a fixed parameter budget, loop the full stack. If your training FLOPs are the constraint rather than parameter count, loop a middle block instead, and add per-loop LoRA adapters once you go past a handful of loops.
If you're running MoE models on a 16GB card, benchmark both offloading strategies on your exact checkpoint and quantization level before committing. The 40% win on Phi-3.5-MoE is real. So is the 4.3x loss on LFM. There is no configuration that wins across architectures, and anyone who tells you otherwise hasn't run the sweep.