LLM Field Guide 09 — Making It Smaller and Faster: Quantization, Mixture of Experts, and Speculative Decoding¶
Three tricks make a model cheaper to run without making it dumber: store fewer bits per weight, run fewer weights per token, and produce more tokens per pass. Quantization gets you 2–4× smaller and faster, MoE gets you big-model quality at small-model compute, and speculative decoding gets you 2–3× lower latency with identical outputs. Each one has a catch, and this post shows exactly where it bites.
In this post:
- Fewer bytes per token is the whole game
- Quantization: scale, round, store
- The quantization formats you'll meet in 2026
- Hardware and engine decide which format runs
- Making and checking your own quantized checkpoint
- Mixture of experts: many FFNs, only a few run
- How MoE designs evolved, and how they stay balanced
- The MoE memory rule: pay for total, compute on active
- Speculative decoding: guess cheaply, verify in one pass
- The speedup math: acceptance rate is everything
- Where the guesses come from: drafter families
- Running spec decode, and when it stops paying
LLM Field Guide — all 12 posts
Fewer bytes per token is the whole game¶
Decode is memory-bandwidth-bound: at small batch sizes each step streams every weight from HBM to emit one token, so Llama-3.1-8B in BF16 tops out around 210 tokens/s on an H100 (post 04 has the full derivation). All three techniques in this post attack that one bottleneck from different sides:
| Technique | What it changes | Bytes read per token | Tokens per weight read |
|---|---|---|---|
| Quantization | Bits per weight (16 → 8 → 4) | 2–4× fewer | 1 |
| Mixture of experts | Weights used per token (all → ~3–10%) | 10–30× fewer at batch 1 | 1 |
| Speculative decoding | Tokens checked per pass (1 → γ+1) | Same | 2–3+ |
Apply the bandwidth division to quantized formats on an H100 SXM (3.35 TB/s1) and the payoff is direct:
| Format (Llama-3.1-8B) | Bits/weight | Weight size | Batch-1 decode ceiling on H100 |
|---|---|---|---|
| BF16 | 16 | ~16.1 GB (14.96 GiB2) | ~210 tok/s |
| FP8 | 8 | ~8.0 GB | ~420 tok/s |
| NVFP4 | 4.5 effective | ~4.5 GB | ~740 tok/s |
| GGUF Q4_K_M | 4.89 effective | 4.58 GiB (4.9 GB) | ~680 tok/s |
Those are upper bounds, but the ratio holds: halve the bytes, roughly double single-stream speed. At high batch the bottleneck shifts toward compute, which is why formats that also quantize activations (FP8, NVFP4) matter for throughput.
Quantization: scale, round, store¶
Every format follows the same three steps: pick a scale, divide, round to the nearest representable value. To get the number back, multiply by the scale.
Worked example: 8 bits vs 4 bits on the same weights¶
INT8 has 256 levels; symmetric "absmax" quantization maps the largest absolute weight to ±127. INT4 has levels −7…+7. FP4 (E2M1: 1 sign, 2 exponent, 1 mantissa bit) has the levels 0, 0.5, 1, 1.5, 2, 3, 4, 6, dense near zero and sparse at the edges.3
weights = [0.8, −1.5, 0.3, −0.6] max(|w|) = 1.5
INT8: scale = 1.5 / 127 = 0.01181
quantized = [68, −127, 25, −51]
dequantized = [0.803, −1.500, 0.295, −0.602] error ≤ 0.005
INT4: scale = 1.5 / 7 = 0.2143
quantized = [4, −7, 1, −3]
dequantized = [0.857, −1.500, 0.214, −0.643] error ≤ 0.086
FP4 E2M1: scale = 1.5 / 6 = 0.25
w / scale = [3.2, −6.0, 1.2, −2.4] → nearest grid point → [3, −6, 1, −2]
dequantized = [0.75, −1.50, 0.25, −0.50] error ≤ 0.10
At 8 bits the errors are under 1% and mostly random, so across billions of weights they partially cancel. At 4 bits errors jump ~20×, and neither grid wins everywhere: FP4 is denser near zero, where most weights cluster. At 4 bits, the clever part isn't the grid; it's how you choose the scale.
Granularity: one scale per what?¶
One scale per tensor is a disaster at 4 bits: a single outlier weight of 20.0 stretches the scale so far that every normal weight rounds to zero. The fix is smaller blocks, each with its own scale:
| Granularity | Scale shared by | Overhead | Used by |
|---|---|---|---|
| Per-tensor | Whole weight matrix | ~0 | FP8 (simple) |
| Per-channel | One row/column | Tiny | FP8 rowwise, INT8 |
| Per-group / block | 16–256 consecutive weights | 0.25–1 bit/weight | AWQ/GPTQ (group 128), MXFP4 (32), NVFP4 (16), GGUF k-quants |
That overhead is why 4-bit formats are never exactly 4 bits: NVFP4 stores one 8-bit scale per 16 values, landing at 4.5 bits per value.4
What gets quantized: the W/A naming¶
Names like W4A16 and W8A8 give weight bits and activation bits (the values flowing between layers).
- Weight-only (W4A16, W8A16): weights stored small, unpacked to 16-bit right before the matmul. Saves memory and bandwidth; works on almost any GPU.
- Weight + activation (W8A8 FP8, W4A4 NVFP4): the matmul itself runs in low precision on tensor cores. Saves memory and compute, but needs hardware support.
- KV cache: quantized separately with
--kv-cache-dtype fp8; FP8 KV is covered in post 04.
The quantization formats you'll meet in 2026¶
INT4 with GPTQ and AWQ: the 2023 workhorses¶
GPTQ and AWQ are algorithms for choosing INT4 values well, not file formats. Both are post-training: no retraining, just a few hundred calibration samples.
- GPTQ quantizes one column at a time and adjusts the remaining columns to compensate for the rounding error. It quantized 175B-parameter models to 3–4 bits in about four GPU hours.5
- AWQ finds the ~1% of salient weights by looking at activation magnitudes, not weight magnitudes, and protects them. It won the MLSys 2024 Best Paper award.6
Both produce W4A16 checkpoints with group size 128, served through fast Marlin kernels on NVIDIA GPUs from Turing onward.7 They're still the right pick for A100, L4, and RTX 30/40; on Hopper and Blackwell the action has moved to floating-point formats.
FP8: the default for datacenter serving¶
FP8 comes in two encodings, standardized by NVIDIA, Arm, and Intel:8
| Encoding | Bits (sign/exp/mantissa) | Max value3 | Used for |
|---|---|---|---|
| E4M3 | 1/4/3 | ±448 | Weights and activations in inference |
| E5M2 | 1/5/2 | ±57,344 | Gradients in training (more range, less precision) |
FP8 W8A8 is the safest quantization you can do. Red Hat's study of Llama-3.1 models across more than 500,000 evaluations found it "effectively lossless across all model scales."9 It needs Ada (L4, L40S), Hopper (H100/H200), or newer for native FP8 tensor cores.10
Many frontier models now ship natively in FP8: DeepSeek-V3, Kimi K2, and DeepSeek-V4 all publish block-scaled FP8 weights (E4M3, 128×128 blocks) as their official checkpoints.11
MXFP4 and NVFP4: block-scaled 4-bit floats¶
Blackwell added native FP4 tensor cores, and two competing block formats run on them:
| MXFP4 (OCP standard) | NVFP4 (NVIDIA) | |
|---|---|---|
| Element | FP4 E2M1 | FP4 E2M1 |
| Block size | 32 values | 16 values |
| Block scale | E8M0 (power of two only) | E4M3 FP8 (fractional) |
| Extra scale | None | FP32 per tensor |
| Effective bits | ~4.2512 | ~4.54 |
| Native hardware | Blackwell; AMD CDNA4 (MI355X) | Blackwell, Rubin |
The difference that matters: MXFP4's scale can only be a power of two, so a block's largest value often lands well below the top of the FP4 grid, wasting resolution. NVFP4's FP8 scale can be any value, and its 16-value blocks isolate outliers better. NVIDIA reports NVFP4 DeepSeek-R1-0528 within about 1 point of FP8 (MMLU-Pro 85% → 84%, GPQA Diamond 81% → 80%) at ~3.5× less memory than FP16 and ~1.8× less than FP8.4
You'll meet MXFP4 in gpt-oss (its MoE weights were post-trained in it, so 116.8B parameters fit in a 60.8 GiB checkpoint)12 and NVFP4 in NVIDIA's published checkpoints such as nvidia/Llama-3.3-70B-Instruct-NVFP4.
GGUF: the local-inference container¶
GGUF is a different kind of thing: a single mmap-able file for llama.cpp and tools built on it, holding tensors, tokenizer, chat template, and hyperparameters as key-value metadata.14 Inside, tensors can use dozens of quantization types. The ones you'll actually pick, measured by the llama.cpp project:215
| GGUF type | Bits/weight | Size (Llama-3.1-8B) | Perplexity increase (Llama-3-8B) | Verdict |
|---|---|---|---|---|
| Q8_0 | 8.50 | 7.95 GiB | +0.0026 | Indistinguishable from BF16 |
| Q6_K | 6.56 | 6.14 GiB | +0.0217 | Near-lossless |
| Q5_K_M | 5.70 | 5.33 GiB | +0.0569 | Great if it fits |
| Q4_K_M | 4.89 | 4.58 GiB | +0.1754 | The default |
| IQ4_XS | 4.46 | 4.17 GiB | — | Smaller, needs imatrix |
| Q3_K_M | 4.00 | 3.74 GiB | +0.6569 | Noticeable loss |
| Q2_K | 3.16 | 2.95 GiB | +3.5199 | Last resort |
How to read the names:
K= k-quants: super-blocks of 8 × 32 weights with their own quantized scales (Q4_K = 4.5 bpw).16_S/_M/_Lmixes keep sensitive tensors at higher precision, so Q4_K_M averages 4.89 bpw.IQ= i-quants, non-linear grids that need an importance matrix (imatrix): activation statistics from calibration text, the same idea as AWQ.MXFP4_MOE= MXFP4 on expert weights, added with gpt-oss in August 2025.17
llama.cpp also gained native Blackwell NVFP4 kernels (April 2026)18 and an FP8 E4M3 type in v0.9.0 (November 4, 2026).19
Hardware and engine decide which format runs¶
A format your GPU can't compute natively still works if the engine unpacks it to BF16 first, but you lose the compute speedup. TensorRT-LLM's support matrix is the clearest map of what's native where:10
| GPU generation | Examples | FP8 W8A8 | NVFP4 | MXFP4 | INT4 AWQ/GPTQ (W4A16) |
|---|---|---|---|---|---|
| Ampere | A100, A10, RTX 30 | ✗ | ✗ | ✗ | ✓ |
| Ada Lovelace | L4, L40S, RTX 40 | ✓ | ✗ | ✗ | ✓ |
| Hopper | H100, H200 | ✓ | ✗ | ✗ | ✓ |
| Blackwell (sm100/103) | B200, GB200, B300 | ✓ | ✓ | ✓ | ✓ |
| Blackwell (sm120) | RTX PRO 6000, RTX 50 | ✓ | ✓ | ✓ | ✗ in TRT-LLM |
vLLM and SGLang soften this: an NVFP4 checkpoint on Hopper or Ampere runs as W4A16 through Marlin kernels, keeping the memory savings.2021
The engine table, current as of November 2026 (vLLM 0.33.0, SGLang 0.5.23, TensorRT-LLM 1.2.1 stable, llama.cpp v0.9.0, Ollama 0.40.14):22
| Format | vLLM | SGLang | TensorRT-LLM | llama.cpp | Ollama |
|---|---|---|---|---|---|
| FP8 W8A8 | ✓ auto-detected; online --quantization fp8 | ✓ online fp8; w8a8_fp8, modelopt_fp8 | ✓ per-tensor, block, rowwise | ✓ new E4M3 type (v0.9.0) | ✗ (-q fp8 maps to int8) |
| NVFP4 | ✓ modelopt_fp4, compressed-tensors; Marlin fallback | ✓ modelopt_fp4; Marlin fallback | ✓ Blackwell/Rubin | ✓ Blackwell CUDA kernels | ✓ MLX engine, -q nvfp4 |
| MXFP4 | ✓ gpt-oss; Marlin on Ampere/Hopper | ✓ quark_mxfp4 on AMD CDNA4 | ✓ Blackwell/Rubin | ✓ MXFP4_MOE | ✓ native for gpt-oss |
| AWQ / GPTQ INT4 | ✓ Marlin kernels | ✓ awq_marlin, gptq_marlin | ✓ W4A16, W4A8 | ✗ convert to GGUF | ✗ |
| GGUF | ⚠ plugin, "highly experimental"23 | ⚠ gguf (CUDA) | ✗ | ✓ native | ✓ native |
vLLM and SGLang read the quantization method from the checkpoint's config, so pre-quantized models need no flag. --quantization is for online quantization or kernel overrides. One block covers the common cases on each engine:
# vLLM: pre-quantized FP8 (auto-detected)
vllm serve nvidia/Llama-3.1-8B-Instruct-FP8
# vLLM: online FP8 from a BF16 checkpoint, plus FP8 KV cache
vllm serve meta-llama/Llama-3.1-8B-Instruct --quantization fp8 --kv-cache-dtype fp8
# vLLM: gpt-oss ships in MXFP4 and fits one 80 GB A100 via Marlin kernels
vllm serve openai/gpt-oss-120b
# SGLang: NVIDIA ModelOpt NVFP4 checkpoint
python3 -m sglang.launch_server --model-path nvidia/Llama-3.3-70B-Instruct-NVFP4 \
--quantization modelopt_fp4 --port 30000
# llama.cpp: pull a pre-quantized GGUF from Hugging Face
llama-server -hf unsloth/Qwen3-8B-GGUF:Q4_K_M --port 9931
The vLLM gpt-oss recipe confirms the 120b fits one 80 GB A100.24 TensorRT-LLM loads ModelOpt checkpoints and is where NVFP4 is most mature, including an NVFP4 KV cache on sm100/103.10
Engine gotchas worth memorizing:
- Don't serve GGUF on vLLM. The docs call the plugin "highly experimental and under-optimized."23 Use the FP8, NVFP4, or AWQ version of the model.
- SGLang removed plain
gptqin favor ofgptq_marlin.21 - Ollama has two engines. GGUF runs on the llama.cpp engine and is not quantized at import; run
llama-quantizefirst.25 Safetensors go to the MLX engine, where--quantizeonly acceptsint4,int8,nvfp4,mxfp4,mxfp8since v0.34.1.2627 Its-q fp8is an alias for int8, not real FP8.28 - Ollama's NVFP4 beats q4_K_M on Apple Silicon: roughly half the perplexity loss on Gemma 4 12B and ~20% faster generation.29
Making and checking your own quantized checkpoint¶
Usually you download one. After fine-tuning your own model (post 08), you quantize it yourself.
For vLLM/SGLang: LLM Compressor¶
LLM Compressor (v0.15.0) is the vLLM project's quantization library. It supports W8A8 FP8/INT8, NVFP4, MXFP4, W4A16, and AWQ/GPTQ, saving in the compressed-tensors format vLLM reads natively.30
# pip install "llmcompressor==0.15.0"
from transformers import AutoModelForCausalLM, AutoTokenizer
from llmcompressor import oneshot
from llmcompressor.modifiers.quantization import QuantizationModifier
MODEL_ID = "Qwen/Qwen3-8B" # or your fine-tuned checkpoint
model = AutoModelForCausalLM.from_pretrained(MODEL_ID, dtype="auto")
tokenizer = AutoTokenizer.from_pretrained(MODEL_ID)
# FP8 weights (per-channel) + dynamic per-token FP8 activations. No calibration data needed.
recipe = QuantizationModifier(targets="Linear", scheme="FP8_DYNAMIC", ignore=["lm_head"])
oneshot(model=model, recipe=recipe)
model.save_pretrained("Qwen3-8B-FP8-Dynamic")
tokenizer.save_pretrained("Qwen3-8B-FP8-Dynamic")
# Serve: vllm serve ./Qwen3-8B-FP8-Dynamic
Swap the scheme for "NVFP4" on Blackwell, or "W4A16" with a GPTQ/AWQ modifier for older GPUs; those two need a few hundred calibration samples. For MoE models, the README's own quick start also ignores the router (re:.*mlp.gate$): keep routers and lm_head in high precision.30
For llama.cpp/Ollama: GGUF with an importance matrix¶
# 1. Convert Hugging Face safetensors → BF16 GGUF
python convert_hf_to_gguf.py ./Qwen3-8B --outtype bf16 --outfile qwen3-8b-bf16.gguf
# 2. Collect activation statistics on representative text (your domain!)
./llama-imatrix -m qwen3-8b-bf16.gguf -f calibration.txt -ngl 99 # writes imatrix.gguf
# 3. Quantize using the importance matrix
./llama-quantize --imatrix imatrix.gguf qwen3-8b-bf16.gguf qwen3-8b-Q4_K_M.gguf Q4_K_M
Commands follow the llama.cpp imatrix and quantize READMEs.312 The calibration text matters: if your model answers Thai legal questions, calibrate on Thai legal text, not English Wikipedia.
What you actually lose¶
| Format | Typical quality loss | Evidence |
|---|---|---|
| FP8 W8A8 | Effectively none | Llama-3.1 family, 500K+ evals9 |
| INT8 W8A8 | 1–3% | Same study |
| INT4 W4A16 (GPTQ/AWQ) | "Rivals 8-bit" when well tuned | Same study |
| NVFP4 | ≤1 point vs FP8 on DeepSeek-R1-0528 | NVIDIA4 |
| GGUF Q4_K_M | +0.18 perplexity on Llama-3-8B | llama.cpp15 |
| GGUF Q2_K | +3.5 perplexity | llama.cpp |
The same Red Hat study gives deployment advice: W4A16 is the most cost-efficient for latency-bound single-stream serving; W8A8 wins under heavy continuous batching.9 That matches the bandwidth math: at batch 1 bytes dominate, at batch 64 compute does.
Don't trust those averages for your use case. Long reasoning, code, math, and low-resource languages degrade first because per-token errors compound; perplexity isn't task accuracy; and a 1B model has far less redundancy to absorb rounding noise than a 70B one. Run your own eval on BF16 and quantized side by side:
pip install "lm-eval[vllm]"
for m in Qwen/Qwen3-8B ./Qwen3-8B-FP8-Dynamic; do
lm_eval --model vllm --model_args pretrained=$m,max_model_len=4096 \
--tasks gsm8k,mmlu --batch_size auto --output_path results/
done
Whether a 1-point drop is real or noise is a statistics question, covered in post 11.
Mixture of experts: many FFNs, only a few run¶
Mixture of Experts lets a model hold a trillion parameters but use only a few percent of them per token. Almost every frontier open-weight model in 2026 is built this way: DeepSeek-V4, Qwen3.5, Kimi K2, gpt-oss.
Each transformer block has attention plus a feed-forward network, and the FFNs hold about two-thirds of a dense model's parameters (post 02). An MoE layer replaces that single FFN with N smaller FFNs ("experts") plus a tiny router that picks the top k experts per token, runs only those, and blends their outputs. Attention, embeddings, and norms stay shared.
Dense block MoE block (N = 8 experts, top-k = 2)
token ──► Attention token ──► Attention
│ │
▼ ▼
┌───────┐ ┌────────┐
│ FFN │ all weights used │ Router │ scores 8 experts
└───────┘ └────────┘
│ ┌──┬──┬──┼──┬──┬──┬──┐
▼ E0 E1 E2 E3 E4 E5 E6 E7
output ▲ ▲
└─ only E2 and E5 run
output = 0.60·E2(x) + 0.40·E5(x)
That gives every MoE model two parameter counts, and you need both:
- Total parameters decide memory: every expert must be loaded, because any token might pick any expert.
- Active parameters decide compute and per-token bandwidth: only k experts run per token.
Mixtral 8x7B isn't 56B parameters, because attention is shared: each token can reach 47B parameters but uses only 13B, and it matched or beat Llama 2 70B.32
Routing, step by step¶
The router is just a linear layer: hidden size in, N scores out. Walk "cat" from "The cat sat" through one layer with 8 experts and top-2 routing (Mixtral's setup):
Step 1 — Router logits (h_cat · W_router), one score per expert:
E0: 1.2 E1: 0.3 E2: 2.5 E3: −0.4 E4: 0.9 E5: 2.1 E6: −1.0 E7: 0.1
Step 2 — Keep the top-2: E2 (2.5) and E5 (2.1)
Step 3 — Softmax over just those two:
w2 = e^2.5 / (e^2.5 + e^2.1) = 12.18 / 20.35 = 0.60
w5 = e^2.1 / (e^2.5 + e^2.1) = 8.17 / 20.35 = 0.40
Step 4 — Run only those experts and blend:
y_cat = 0.60 · FFN_2(h_cat) + 0.40 · FFN_5(h_cat)
The other six experts do nothing for this token. "The" and "sat" may pick completely different experts, and the choice is re-made independently in every layer. Here's the whole layer in PyTorch:
import torch
import torch.nn as nn
import torch.nn.functional as F
class Expert(nn.Module): # a normal SwiGLU FFN
def __init__(self, d, d_ff):
super().__init__()
self.gate = nn.Linear(d, d_ff, bias=False)
self.up = nn.Linear(d, d_ff, bias=False)
self.down = nn.Linear(d_ff, d, bias=False)
def forward(self, x):
return self.down(F.silu(self.gate(x)) * self.up(x))
class MoELayer(nn.Module):
def __init__(self, d=2048, d_ff=768, n_experts=128, k=8):
super().__init__()
self.router = nn.Linear(d, n_experts, bias=False)
self.experts = nn.ModuleList(Expert(d, d_ff) for _ in range(n_experts))
self.k = k
def forward(self, x): # x: [tokens, d]
logits = self.router(x) # [tokens, n_experts]
weights, idx = logits.topk(self.k, dim=-1)
weights = weights.softmax(dim=-1) # renormalize over the chosen k
out = torch.zeros_like(x)
for e, expert in enumerate(self.experts):
token_ids, slot = (idx == e).nonzero(as_tuple=True)
if token_ids.numel(): # only tokens routed to expert e
out[token_ids] += weights[token_ids, slot, None] * expert(x[token_ids])
return out
x = torch.randn(3, 2048) # "The", " cat", " sat"
print(MoELayer()(x).shape) # torch.Size([3, 2048])
The defaults are Qwen3-30B-A3B's real dimensions.33 The Python loop is for clarity; production kernels group tokens by expert and run one batched "grouped GEMM." The build post walks through a trainable MoE layer with load balancing.
Worked example: where Qwen3-30B-A3B's 30.5B and 3.3B come from¶
30B-A3B means 30B total, 3B active. You can reproduce both from the config:33
Config: hidden 2048, 48 layers, 128 experts/layer, top-8, expert FFN width 768,
32 query heads + 4 KV heads × 128 dims, vocab 151,936, untied embeddings
One expert (SwiGLU = 3 matrices): 3 × 2048 × 768 = 4.72M params
All experts: 4.72M × 128 experts × 48 layers = 28.99B
Active experts: 4.72M × 8 experts × 48 layers = 1.81B
Shared parts (every token uses them):
Attention: (2048×4096 + 2×2048×512 + 4096×2048) × 48 = 0.91B
Embeddings + LM head: 2 × 151,936 × 2048 = 0.62B
Routers: 2048 × 128 × 48 = 0.01B
───────
Total = 28.99 + 1.54 = 30.5B Active = 1.81 + 1.54 = 3.35B
That matches the model card's 30.5B total, 3.3B activated.34 95% of the parameters live in experts, and each token touches only 1/16 of them.
How MoE designs evolved, and how they stay balanced¶
A model's knowledge capacity grows with total parameters; its per-token compute grows with active parameters. MoE decouples the two. Shazeer et al. (2017) reported over 1000× capacity gains at minor compute overhead;35 Switch Transformer (2021) pretrained up to 7× faster than T5 at equal compute;36 DeepSeekMoE 16B matched LLaMA2 7B with ~40% of the computation;37 and DeepSeek-V3 (671B total, 37B active) trained on 14.8T tokens in just 2.788M H800 GPU hours.38
More, smaller experts, plus a shared one¶
DeepSeekMoE argued for fine-grained experts (split each into m smaller ones and activate m× more, for more flexible combinations) and shared experts every token uses, holding common knowledge so routed experts can specialize.37 The field followed:
| Model | Year | Total | Active | Experts/layer | Routed/token | Shared | Active % |
|---|---|---|---|---|---|---|---|
| Mixtral 8x7B32 | 2024 | 47B | 13B | 8 | 2 | 0 | 28% |
| DeepSeek-V33839 | 2024 | 671B | 37B | 256 | 8 | 1 | 5.5% |
| Llama 4 Maverick40 | 2025 | 400B | 17B | 128 | 1 | 1 | 4.3% |
| Qwen3-235B-A22B41 | 2025 | 235B | 22B | 128 | 8 | 0 | 9.4% |
| gpt-oss-120b12 | 2025 | 116.8B | 5.1B | 128 | 4 | 0 | 4.4% |
| Kimi K242 | 2025 | 1T | 32B | 384 | 8 | 1 | 3.2% |
| Qwen3.5-397B-A17B44 | 2026 | 397B | 17B | 512 | 10 | 1 | 4.3% |
| DeepSeek-V4-Pro1345 | 2026 | 1.6T | 49B | 384 | 6 | 1 | 3.1% |
Sparsity went from ~28% active in Mixtral to ~3% in the trillion-parameter models. Labs still disagree on shared experts: Qwen3 dropped them,41 Qwen3.5 has one again,44 and Llama 4 Maverick alternates dense and MoE layers.40
Keeping experts balanced¶
Left alone, routing collapses. A few experts get slightly better early, the router sends them more tokens, they improve faster, and soon two experts do all the work. That wrecks quality and hardware efficiency: if experts live on different GPUs, one is swamped while the rest idle. Four fixes:
| Fix | How it works | Trade-off |
|---|---|---|
| Auxiliary balance loss (Switch)36 | Add α · N · Σ f_i · P_i (fraction routed × mean router prob); minimum 1.0 when balanced, N when collapsed | Fights the LM loss; Qwen3 ships router_aux_loss_coef = 0.00133 and balances over the global batch41 |
| Router z-loss (ST-MoE)46 | Penalize large router logits | Keeps low-precision softmax stable |
| Capacity factor | Fixed buffer per expert; overflow tokens skip the layer via the residual | Each dropped token is a quality hit; training-only |
| Aux-loss-free bias (DeepSeek-V3)38 | Per-expert bias added to scores for top-k choice only, nudged after each step | No gradient distortion; topk_method: "noaux_tc" in DeepSeek-V3/V4 and Kimi K2 configs394543 |
The MoE memory rule: pay for total, compute on active¶
Every expert must be in memory, but each token only reads a few. Compare three Qwen3 models on one H100 SXM (80 GB, 3.35 TB/s1):
| Model | Total | Active | BF16 weights | Fits on 1 H100? | Batch-1 decode ceiling |
|---|---|---|---|---|---|
| Qwen3-8B (dense)47 | 8.2B | 8.2B | 16.4 GB | Yes | ~200 tok/s |
| Qwen3-32B (dense)48 | 32.8B | 32.8B | 65.6 GB | Barely (little KV room) | ~50 tok/s |
| Qwen3-30B-A3B (MoE)34 | 30.5B | 3.3B | 61 GB | Yes (tight) | ~500 tok/s |
The MoE model costs the memory of the 32B dense model and decodes at the speed of a ~3B one. Quality sits somewhere between the two; check benchmarks for your task rather than assuming either extreme.
Two consequences shape every deployment:
MoE is the natural partner of quantization. Expert weights are the bulk of the memory and are read sparsely, so they're the obvious thing to shrink. That's exactly what gpt-oss (MXFP4 experts, 60.8 GiB) and DeepSeek-V4 (FP4 experts, FP8 elsewhere) do.1213 When you quantize an MoE yourself, keep the router in high precision.
The bandwidth win shrinks as batch grows. At batch 1 a token reads 8 of 128 experts per layer. At batch 256 the tokens collectively hit almost every expert, so each step reads nearly all the weights anyway. MoE still saves compute at high batch, but "reads only 3B" is a low-batch phenomenon.
At frontier scale, total parameters set the hardware floor. DeepSeek-V3 in native FP8 is ~671 GB of weights, more than 8 × H100 (640 GB) before any KV cache, so it needs 141 GB-class GPUs or multiple nodes. gpt-oss-120b's 60.8 GiB fits one 80 GB GPU with KV room. The LLM VRAM Sizing Field Guide has the full calculator.
Serving MoE across GPUs and on a workstation¶
Across GPUs, use expert parallelism, which places whole experts on different GPUs and routes tokens to them; the mechanics and trade-offs are in post 10. In vLLM it's one flag, which only takes effect when TP × DP > 1:49
vllm serve Qwen/Qwen3-30B-A3B --tensor-parallel-size 2 --enable-expert-parallel
vllm serve Qwen/Qwen3-235B-A22B --data-parallel-size 8 --enable-expert-parallel
On a workstation, put the experts in system RAM. Because each token touches only a few experts, you can keep shared layers and KV cache on the GPU and expert weights on the CPU and still get usable speed:50
# Everything on GPU except the MoE expert weights
llama-server -hf ggml-org/gpt-oss-120b-GGUF -ngl 99 --cpu-moe
# Finer control: experts of the first 20 layers on CPU, the rest on GPU
llama-server -hf unsloth/Qwen3-30B-A3B-GGUF:Q4_K_M -ngl 99 --n-cpu-moe 20
Tune --n-cpu-moe until the model just fits in VRAM; CPU memory bandwidth then sets speed.
Fine-tuning an MoE needs extra care (methods in post 08):
- Freeze the router (or give it a very low LR) and keep the balance loss on, or narrow data collapses routing onto a few experts
- Use sequence-level importance ratios for RL (GSPO was designed partly for MoE)51, and scope LoRA to attention and shared layers first
Speculative decoding: guess cheaply, verify in one pass¶
Speculative decoding makes a model generate 2–3× faster without changing a single output token. During a memory-bound decode step the tensor cores sit almost idle, and a forward pass over 5 tokens reads the same weights as a pass over 1. So if you can guess the next few tokens cheaply, the big model can check all of them in one pass for nearly the price of generating one.
It was introduced independently by Leviathan et al. at Google (2–3× on T5-XXL with identical outputs)52 and Chen et al. at DeepMind (2–2.5× on 70B Chinchilla).53 The loop has three steps:
Context: "The cat sat"
1. DRAFT A cheap drafter proposes γ = 4 tokens: " on" " the" " mat" "."
2. VERIFY The target runs ONE forward pass over "The cat sat on the mat ."
and gets its own distribution at every position.
3. ACCEPT Walk left to right:
" on" target agrees -> accept
" the" target agrees -> accept
" mat" target prefers " floor" -> reject, sample " floor" instead
"." discarded (comes after a rejection)
Result: 3 new tokens (" on", " the", " floor") from 1 target pass.
You always get at least one token per target pass: even if the first guess is wrong, the verify pass already computed the target's distribution there, so you sample a correct replacement. If every draft is accepted, you get a bonus token from position γ+1, so a fully accepted draft of 4 yields 5.
Why the output is mathematically unchanged¶
With greedy decoding, keep the draft token if it equals the target's argmax. With sampling (temperature > 0, post 03), use modified rejection sampling:
- Accept draft token x with probability
min(1, p(x) / q(x)), wherepis the target's probability andqthe drafter's. - On rejection, sample from the normalized residual
max(0, p − q).
Leviathan et al. prove this samples from exactly the target distribution.52 That's why it's lossless: a pure speed optimization, not an approximation.
Lossless in theory, almost-lossless in practice
Batched floating-point math isn't bit-identical to separate passes, so greedy outputs can occasionally flip a near-tie. vLLM v0.33 also added opt-in lossy verification (FLy, 1.04–1.31× more decode throughput).54 Know which mode you run.
The speedup math: acceptance rate is everything¶
Let α be the probability the target accepts a draft token and γ the tokens drafted per round. Expected tokens per target pass:52
Drafting isn't free. With c = cost of one drafter pass relative to one target pass, wall-clock speedup is E[tokens] / (γ·c + 1). This script prints the tuning table:
# spec_math.py — no dependencies, Python 3.10+
def expected_tokens(alpha: float, gamma: int) -> float:
return (1 - alpha ** (gamma + 1)) / (1 - alpha)
def speedup(alpha: float, gamma: int, c: float) -> float:
return expected_tokens(alpha, gamma) / (gamma * c + 1)
for alpha in (0.5, 0.6, 0.7, 0.8, 0.9):
row = [f"{speedup(alpha, g, c=0.05):.2f}x" for g in (1, 2, 3, 4, 5, 7, 10)]
print(f"alpha={alpha}: {row}")
With a cheap drafter (c = 0.05, an illustrative value for a one-layer head on a 32-layer target):
| Acceptance α | γ=1 | γ=2 | γ=3 | γ=4 | γ=5 | γ=7 | γ=10 |
|---|---|---|---|---|---|---|---|
| 0.5 | 1.43× | 1.59× | 1.63× | 1.61× | 1.57× | 1.48× | 1.33× |
| 0.6 | 1.52× | 1.78× | 1.89× | 1.92× | 1.91× | 1.82× | 1.66× |
| 0.7 | 1.62× | 1.99× | 2.20× | 2.31× | 2.35× | 2.33× | 2.18× |
| 0.8 | 1.71× | 2.22× | 2.57× | 2.80× | 2.95× | 3.08× | 3.05× |
| 0.9 | 1.81× | 2.46× | 2.99× | 3.41× | 3.75× | 4.22× | 4.57× |
Three lessons:
- Acceptance rate dominates. Moving α from 0.6 to 0.8 adds more than any γ tuning.
- Optimal γ grows with α. At α=0.5, drafting more than 3 wastes work; at α=0.9, drafting 10 still pays.
- Drafter cost kills big drafters. With
c = 0.2(a 1B drafter for an 8B target), α=0.8 peaks at only 1.87×. That's why the field moved to tiny heads bolted onto the target.
The formula assumes constant acceptance per position and one-step verification; reality is worse on both, so use it for intuition, then measure.
Where the guesses come from: drafter families¶
| Drafter | Extra training | Draft cost c | Typical acceptance | Best for | 2026 status |
|---|---|---|---|---|---|
| Separate draft model | None (same tokenizer needed) | High (0.1–0.3) | Medium | Quick experiment | Supported, rarely optimal |
| Medusa heads | Train heads | Low | Medium | — | Removed from vLLM v0.3354 |
| EAGLE-3 | Train 1-layer head (or download) | Very low | High | General chat | Default choice |
| MTP | Built into pretraining | Very low | Very high | Models that ship MTP weights | Use whenever available |
| DFlash (block diffusion) | Train drafter | Low (1 pass per block) | High | Low latency, long outputs | New, fast-moving |
| N-gram / suffix | None | ~0 | Low on chat, high on copy-heavy | Code edits, RAG, peak traffic | Always-on safety net |
EAGLE-3: a tiny head on the target's features. Drafting from the target's hidden states is far easier than from tokens, because the target already did the hard thinking. EAGLE-3 fuses low, middle, and high-layer features and reports up to 6.5× speedup, ~1.4× over EAGLE-2.55 SGLang recommends it,56 and pre-trained heads exist for popular models.57
MTP: the model was trained to draft for itself. DeepSeek-V3's Multi-Token Prediction module predicts the token after next, giving 85–90% second-token acceptance and 1.8× tokens/s.38 NVIDIA measured DeepSeek-R1 on B200 going from 111 to 198 tokens/s per user with one MTP layer.58 If the model card lists MTP weights, use them first.
DFlash: a whole block in one pass. EAGLE drafts autoregressively, so γ tokens cost γ drafter passes. DFlash (ICML 2026) proposes a whole block in one block-diffusion pass, reporting over 6× lossless acceleration and up to 2.5× more speedup than EAGLE-3.59 vLLM and SGLang both support it;6056 vLLM v0.33 reports a DSpark drafter taking DeepSeek-V4.1-Flash on GB300 from 1,373 to 3,390 output tokens/s in one PR's benchmark.54 Treat these as upper bounds.
N-gram: no model at all. Propose whatever followed the last few tokens earlier in the prompt. It shines when output copies input (code edits, RAG quoting) and barely helps open-ended chat.
Running spec decode, and when it stops paying¶
vLLM takes a JSON --speculative-config with methods including draft_model, ngram, suffix, mtp, eagle3, and dflash;60 SGLang uses separate flags and says to set the three draft flags together or leave all unset for auto-tuning:56
# vLLM v0.33: EAGLE-3 on Llama-3.1-8B
vllm serve meta-llama/Llama-3.1-8B-Instruct \
--speculative-config '{"method": "eagle3",
"model": "RedHatAI/Llama-3.1-8B-Instruct-speculator.eagle3",
"num_speculative_tokens": 3}'
# vLLM: zero-training n-gram drafter for code-edit / RAG traffic
vllm serve meta-llama/Llama-3.1-8B-Instruct \
--speculative-config '{"method": "ngram", "num_speculative_tokens": 4,
"prompt_lookup_min": 2, "prompt_lookup_max": 5}'
# SGLang v0.5.23: EAGLE-3 with tree drafting
python3 -m sglang.launch_server \
--model meta-llama/Meta-Llama-3.1-8B-Instruct \
--speculative-algorithm EAGLE3 \
--speculative-draft-model-path jamesliu1/sglang-EAGLE3-Llama-3.1-Instruct-8B \
--speculative-num-steps 3 --speculative-eagle-topk 4 --speculative-num-draft-tokens 16
For MTP models use "method": "mtp"; the model field can often be omitted because the drafter lives in the checkpoint.60 SGLang's topk 4 with 16 draft tokens verifies a tree of candidates in one pass with a tree-shaped attention mask, raising acceptance at the cost of more verify compute.
Measure acceptance, don't guess it¶
vLLM exports vllm:spec_decode_num_drafts, ..._num_draft_tokens, ..._num_accepted_tokens, and per-position counters, and logs mean acceptance length = 1 + accepted / drafts (the 1 is the bonus token):61
My rule of thumb: with γ=3–5, a mean acceptance length of 2.5+ is healthy for chat; below ~1.5 the drafter is burning compute for nothing.
When it stops paying¶
The trick spends idle compute to save memory reads. When compute stops being idle, it stops being free.
- Large batches flip the bottleneck. At batch 64–256 each weight load is already shared across many requests, so rejected drafts waste FLOPs other users could have used. EAGLE-3's headline is up to 6.5×, but at batch 64 in SGLang it's 1.38×.55 vLLM frames spec decode as reducing inter-token latency "under medium-to-low QPS."60
- High temperature lowers acceptance. Code, extraction, and tool calls win most; creative writing at temperature 1.0+ wins least.
- Domain shift lowers acceptance. An EAGLE head trained on English chat drafts badly for Thai or SQL. Retrain the head on your own outputs; the target stays untouched, so it's far cheaper than fine-tuning.
- It costs memory. Drafter weights and draft KV come out of the KV pool, lowering max concurrency.
- Feature compatibility. vLLM noted pipeline parallelism wasn't composable with spec decode as of
vllm<=0.15.0;60 check your exact version's matrix.
Production decision procedure:
- Measure baseline TTFT, ITL, and tokens/s at your real concurrency (post 10 covers
vllm bench serve) - Pick the drafter: MTP if the model ships it → published EAGLE-3 head (start at γ=3) →
ngramfor copy-heavy traffic - Read mean acceptance length after an hour of real traffic; below ~1.5 means wrong drafter or domain shift
- Sweep γ (1–7) at your p50 and p95 concurrency; if peak throughput drops, restrict spec decode to low-QPS replicas
- Stay lossless by default; opt into lossy verification only after re-running quality evals
Summary¶
| Lever | Use it when | Pick | Watch out for |
|---|---|---|---|
| Quantize: Blackwell | Any serving | NVFP4 (FP8 if quality-critical) | Calibrate on your domain |
| Quantize: Hopper / Ada | Any serving | FP8 W8A8, lossless and native | AWQ/NVFP4 via Marlin only if memory forces it |
| Quantize: Ampere | Older datacenter GPUs | AWQ or GPTQ W4A16 (Marlin) | No FP8 cores |
| Quantize: Mac / CPU / edge | Local inference | GGUF Q4_K_M (Q5_K_M/Q6_K if RAM allows), or NVFP4/int4 via Ollama MLX | GGUF on vLLM is experimental |
| Native format | Model ships MXFP4/FP8/FP4 | Keep it | It was trained that way |
| Dense model | Limited memory, latency matters | Qwen3-8B-class | — |
| MoE | Memory to spare, want speed per token | Qwen3-30B-A3B-class | Memory = total params; bandwidth win fades at high batch |
| MoE + 4-bit experts | One 80 GB GPU, frontier-ish quality | gpt-oss-120b (MXFP4) | Keep routers high precision |
| MoE + CPU experts | Consumer GPU + lots of RAM | llama.cpp --n-cpu-moe | CPU bandwidth sets speed |
| Spec decode | Latency-bound, low-to-medium concurrency | MTP → EAGLE-3 → DFlash → n-gram | High batch, high temperature, domain shift |
Rules that save you a week:
- Check the GPU's native formats first (FP8 needs Ada+, FP4 needs Blackwell); prefer vendor, NVIDIA, or Red Hat checkpoints
- Keep
lm_head, embeddings, and MoE routers in high precision; eval the quantized model on your own tasks - For MoE, size memory by total parameters and speed by active (
num_experts,num_experts_per_tok,moe_intermediate_sizein the config) - Leave spec decode on only after measuring mean acceptance length at peak load
Next: Post 10 — Serving at Scale: when one GPU isn't enough no matter how small and fast the model gets, split it across many and let an engine schedule the traffic.
Go deeper:
- vLLM: Production LLM Serving from Zero to Scale — quantization flags, AWQ/FP8 serving, and tuning in a full production setup
- How Much VRAM Does Your LLM Actually Need? — turn bits per weight and total parameters into a GPU count, KV cache included
- Serving an LLM on Kubernetes in 2026 — the operations checklist for running these engines on a cluster
- Scaling LLM Inference: DP, PP, and TP with vLLM — TP+EP vs DP+EP and the concurrency crossover
- Disaggregated LLM Inference on Kubernetes with llm-d — wide expert parallelism across nodes
-
NVIDIA, H100 Tensor Core GPU — H100 SXM: 80 GB, 3.35 TB/s memory bandwidth. ↩↩
-
llama.cpp,
tools/quantize/README.md— bits/weight and size per quant type on Llama-3.1-8B. ↩↩↩ -
Open Compute Project, OCP Microscaling Formats (MX) v1.0 Specification — MXFP4 (E2M1, block 32, E8M0 scale); E4M3/E5M2 ranges. ↩↩
-
NVIDIA Technical Blog, Introducing NVFP4 for Efficient and Accurate Low-Precision Inference — 16-value blocks, 4.5 bits/value, memory ratios, DeepSeek-R1-0528 accuracy. ↩↩↩↩
-
Frantar et al., GPTQ: Accurate Post-Training Quantization for Generative Pre-trained Transformers (2022) — 175B models to 3–4 bits in ~4 GPU hours. ↩
-
Lin et al., AWQ: Activation-aware Weight Quantization for LLM Compression and Acceleration — protecting 1% salient weights; MLSys 2024 Best Paper. ↩
-
Micikevicius et al., FP8 Formats for Deep Learning (2022) — E4M3 and E5M2 encodings. ↩
-
Kurtic et al., "Give Me BF16 or Give Me Death"? Accuracy-Performance Trade-Offs in LLM Quantization — 500,000+ evaluations on Llama-3.1. ↩↩↩
-
NVIDIA, TensorRT-LLM Quantization — recipes and hardware support matrix. ↩↩↩
-
Hugging Face configs for DeepSeek-V3, Kimi-K2-Instruct, DeepSeek-V4-Pro —
fmt: e4m3,weight_block_size: [128, 128]. ↩ -
OpenAI, gpt-oss-120b & gpt-oss-20b Model Card (2025) — 116.8B total, 5.1B active, 128 experts, top-4; MXFP4 MoE weights (~4.25 bits); 60.8 GiB checkpoint. ↩↩↩↩
-
DeepSeek-AI, DeepSeek-V4-Pro model card — 1.6T total / 49B active; FP4 experts, FP8 elsewhere. ↩↩
-
ggml, GGUF specification — single-file, mmap-compatible, key-value metadata. ↩
-
llama.cpp,
tools/quantize/quantize.cpp— perplexity deltas on Llama-3-8B per quant type. ↩↩ -
llama.cpp PR #1684, k-quants (June 2023) — Q4_K: super-blocks of 8 blocks × 32 weights, 4.5 bpw. ↩
-
llama.cpp PR #15091, llama : add gpt-oss — merged August 5, 2025, with MXFP4 support. ↩
-
llama.cpp PR #22196, ggml-cuda: Blackwell native NVFP4 support — merged April 28, 2026. ↩
-
llama.cpp, v0.9.0 release notes — OCP FP8 E4M3 tensor type. ↩
-
vLLM, NVIDIA Model Optimizer — NVFP4 falls back to Marlin W4A16 without native FP4 GEMM. ↩
-
SGLang, Quantization — offline and online methods; Marlin fallback; plain
gptqremoved. ↩↩ -
GitHub releases as of 2026-11-05: vLLM, SGLang, TensorRT-LLM, llama.cpp, Ollama, Model Optimizer, LLM Compressor. ↩
-
vLLM, GGUF — "highly experimental and under-optimized"; requires
vllm-gguf-plugin. ↩↩ -
vLLM Recipes, GPT-OSS — 120b on a single 80 GB A100 via Marlin MXFP4. ↩
-
Ollama, Importing a Model — GGUF is not quantized during import; use
llama-quantizefirst. ↩ -
Ollama, v0.34.1 release notes (Sept 14, 2026). ↩
-
Ollama source,
server/create.go— "supported types are int4, int8, nvfp4, mxfp4, mxfp8". ↩ -
Ollama source,
mlx/quant/quant.go— "FP8" and "Q8" alias toint8. ↩ -
Ollama Blog, Ollama's highest performance on Apple Silicon yet with MLX (June 11, 2026). ↩
-
vLLM project, LLM Compressor — supported schemes,
oneshotquick start, MoE router exclusion. ↩↩ -
llama.cpp,
tools/imatrix/README.md. ↩ -
Jiang et al., Mixtral of Experts (2024) — 47B accessible, 13B active per token; matches or beats Llama 2 70B and GPT-3.5. ↩↩
-
Qwen, Qwen3-30B-A3B
config.json— dimensions used above;router_aux_loss_coef0.001. ↩↩↩ -
Qwen, Qwen3-30B-A3B model card — 30.5B total, 3.3B activated, 128 experts, 8 activated. ↩↩
-
Shazeer et al., Outrageously Large Neural Networks: The Sparsely-Gated Mixture-of-Experts Layer (2017). ↩
-
Fedus, Zoph, Shazeer, Switch Transformers (2021) — top-1 routing, up to 7× pretraining speedup, auxiliary balance loss. ↩↩
-
Dai et al., DeepSeekMoE (2024) — fine-grained and shared experts; 16B ≈ LLaMA2 7B at ~40% compute. ↩↩
-
DeepSeek-AI, DeepSeek-V3 Technical Report (2024) — 671B/37B, aux-loss-free balancing, 2.788M H800 GPU hours; MTP acceptance 85–90%, 1.8× TPS. ↩↩↩↩
-
DeepSeek-AI, DeepSeek-V3
config.json— 256 routed + 1 shared, 8 per token,noaux_tc. ↩↩ -
Meta AI, The Llama 4 herd (April 2025) — Maverick 400B/17B, 128 routed + 1 shared, alternating dense and MoE layers. ↩↩
-
Qwen Team, Qwen3 Technical Report (2025) — 128 experts, 8 active, no shared experts, global-batch balance loss. ↩↩↩
-
Moonshot AI, Kimi-K2-Instruct model card — 1T total, 32B activated, 384 experts, 8 selected, 1 shared. ↩
-
Moonshot AI, Kimi-K2-Instruct
config.json—topk_method: noaux_tc. ↩ -
Qwen, Qwen3.5-397B-A17B model card — 512 experts, 10 routed + 1 shared. ↩↩
-
DeepSeek-AI, DeepSeek-V4-Pro
config.json— 384 routed + 1 shared, 6 per token,noaux_tc. ↩↩ -
Zoph et al., ST-MoE: Designing Stable and Transferable Sparse Expert Models (2022) — router z-loss for training stability. ↩
-
Qwen, Qwen3-8B model card — 8.2B parameters. ↩
-
Qwen, Qwen3-32B model card — 32.8B parameters. ↩
-
vLLM, Expert Parallel Deployment —
--enable-expert-parallel; only takes effect when TP × DP > 1. ↩ -
llama.cpp,
common/arg.cpp—--cpu-moeand--n-cpu-moe N. ↩ -
Zheng et al., Group Sequence Policy Optimization (2025) — sequence-level importance ratio stabilizes MoE RL training. ↩
-
Leviathan, Kalman, Matias, Fast Inference from Transformers via Speculative Decoding, ICML 2023 — 2–3× on T5-XXL, identical outputs; expected-tokens and speedup formulas. ↩↩↩
-
Chen et al., Accelerating Large Language Model Decoding with Speculative Sampling, DeepMind 2023. ↩
-
vLLM, v0.33.0 release notes (2026-11-02) — Medusa removed; FLy lossy verification; DSpark benchmark on GB300. ↩↩↩
-
Li et al., EAGLE-3, 2025 — up to 6.5×, ~1.4× over EAGLE-2; 1.38× at batch 64 in SGLang. ↩↩
-
SGLang docs, Speculative Decoding —
EAGLE3,DFLASH,NGRAMand others; EAGLE-3 recommended. ↩↩↩ -
vLLM docs, EAGLE draft models — EAGLE-3 example with
RedHatAI/Llama-3.1-8B-Instruct-speculator.eagle3. ↩ -
NVIDIA TensorRT-LLM blog, Optimizing DeepSeek-R1 Performance on NVIDIA B200 GPUs — 1 MTP layer: 111 → 198 TPS/user. ↩
-
Chen, Liang, Liu, DFlash: Block Diffusion for Flash Speculative Decoding, ICML 2026. ↩
-
vLLM docs, Speculative Decoding — methods list; medium-to-low QPS framing; PP compatibility note. ↩↩↩↩↩
-
vLLM source, vllm/v1/spec_decode/metrics.py — spec-decode counters; mean acceptance length = 1 + accepted / drafts. ↩
Discussion
Have thoughts on this post? Share them below — questions, corrections, or your own experience are all welcome.
