The efficient frontier of LLM inference
TL;DR Highlight
LLM inference techniques either slide along the latency-throughput curve or push the whole curve outward
Who Should Read
A backend or MLOps developer self-hosting LLMs who is unsure which serving settings to tune first to balance latency and cost
Core Mechanics
- Inference techniques come in two kinds
- Moving along the curve: trade latency against throughput (which drives cost).
- Pushing the curve out: create more overall efficiency you can allocate.
- Batch size is the simplest dial
- Small batches give great per-user latency but few tokens per GPU, so cost per token is high.
- Larger batches worsen per-user latency but improve throughput and lower cost.
- Parallelism strategy shapes the tradeoff
- For latency, increase Tensor Parallelism (TP), since its communication is fast over NVLink.
- Lower Expert Parallelism (EP) favors latency, while wide EP across a rack favors throughput.
- Attention Data Parallelism (ADP) replicates attention layers, trading per-request speed for throughput.
- Quantization pushes the curve out but trades quality
- Lower precision in weights, activations, or KV cache improves both latency and throughput.
- With microscaling formats like MXFP4 and NVFP4, big efficiency gains are possible with little-to-no quality loss.
- The frontier is jagged, not smooth
- Small config changes can have big impacts, and the cutoffs are unintuitive.
- You have to find them empirically through sweeps.
- Techniques that push the frontier compound
- Kernel/runtime optimization, speculative decoding, and P/D disaggregation belong here.
- Doubling from hardware and doubling from software gives 4x overall, which you can allocate across latency and throughput.
- Speculative decoding and disaggregation are now practical
- EAGLE-3, DSpark, and DFlash work well on predictable output like code generation.
- They compete with the main model for resources, somewhat limiting max batch size.
- P/D disaggregation mostly raises throughput while keeping latency the same or slightly better.
Community Reactions
- Experience running cheap self-hosted hardware showed the same techniques matter
- A commenter listed pipeline parallelism, RAM caching, speculative decoding with domain n-grams, Q5-Q6 support, FP8 contexts, paged attention, and prefix caching.
- They reported llama.cpp decode dropping to about 5 tok/s during long prefills, and vLLM/SGLang being buggy on non-standard setups.
- Opinion that P/D disaggregation is the next big thing
- A commenter noted prefill is compute-bound and decode is memory-bound, so different node types could suit each.
- Another said spec-dec matured in 2026 and is adopted by all major OSS engines.
- Pushback on terminology and framing
- Commenters said this is a Pareto frontier, while 'efficient frontier' is a portfolio theory term.
- Quality is a third dimension not discussed deeply, and a jagged curve needs bespoke benchmarks.
- One called the opening sentence a tautology.
- Opinion that these techniques haven't changed in years
- A commenter said precision got lower and acceptance rates better, but no new concepts appeared.
- They argued the biggest efficiency gains come at architecture design time.
How to Apply
- Sort your current serving config into two buckets
- List your vLLM/SGLang settings as 'moves along the curve' or 'pushes the curve out'.
- Paste the config and traffic profile into the prompt below to get the classification.
- Sweep batch size to draw your own curve
- Run several batch sizes and record per-user tok/s and total GPU tok/s together.
- Find the sharp bend and pick the point that meets your SLA.
- Compare quantization candidates with a quality benchmark
- Enable a low-precision format like NVFP4 and measure quality drop on your own eval set.
- If the loss is acceptable, keep the latency and throughput gains.
- Try speculative decoding for code-generation traffic
- Enable EAGLE-3 or similar on predictable-output workloads and compare tok/s.
- Also check whether max batch size shrinks.
Try It
# Paste into Claude or ChatGPT (simple prompt version of the article's classification)
I want to optimize LLM inference serving. I use this classification.
- Moves along the curve (tradeoffs): batch size, parallelism strategy (TP/EP/ADP), quantization (trades with quality)
- Pushes the curve out: kernel/runtime optimization, speculative decoding, P/D disaggregation
My setup:
- Model: {{model name}}
- GPU: {{GPU type and count}}
- Serving engine: {{vLLM/SGLang etc.}}
- Traffic profile: {{e.g. coding agent, input length, output length, cache hit rate}}
- Current config: {{batch size, parallelism, precision, etc.}}
- Goal: {{latency first / cost first}}
Request:
1. Sort my current config into the two categories as a table.
2. Rank the techniques I haven't used yet by expected impact, with reasons.
3. Design a sweep experiment for each (variables to change, metrics to measure).
Next step: paste your sweep results and ask it to interpret where the curve bends.Terminology
Related Papers
A Beginner's Guide to Local AI with Inkling, Qwen, and Unsloth
Install Unsloth Desktop, load a quantized Qwen model, and share a private ChatGPT-like AI on your home LAN.
Muru – AI-assisted Rust server for Python apps by mod_WSGI's creator
mod_wsgi's creator is building Muru, an AI-assisted Rust ASGI/WSGI server, documenting it in public
87% of the Anthropic power will come from gas and 11% from coal in 2028
Analysis of Anthropic's contracted data centers: 87% gas, 11% coal power in 2028
Anthropic’s Nasdaq debut
Anthropic listed on Nasdaq and closed its first day below its opening price.
OpenAI still has a WebRTC Problem
WebRTC drops late audio, hurting voice AI; MoQ retransmits and buffers instead
Gemini 4 Neon
Gemini 4 Neon cuts cost per task 32% versus Carbon, at $3 input and $15 output per million tokens
AI is killing All About Berlin
After Google AI Overviews, a Berlin guide site lost 70-75% of its traffic.
Not Everything Needs an LLM
PostHog used small decision models to skip 98.7% of expensive LLM calls