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.
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.
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
Mercury 3: Diffusion at scale
Scaling diffusion LLM 40x gives Mercury 3: 4–8x faster than speed-tier models, similar quality
Timestral: Mistral's time-series foundation models
A 209M time-series model ranks first on three benchmarks and runs on CPU.
DeepSeek V4.1 Flash 1017 (Max)
DeepSeek V4.1 Flash 1017 Max scores 45 on the Intelligence Index at 211 tok/s and $0.30 input.
If you don't run your own LLM proxy, how do you know whats going on?
Running your own LLM proxy shows which keys, models, and cache misses drive your usage.
DeepSeek: DeepSeek v4.1 Flash 1017
DeepSeek V4.1 Flash 1017: $0.05/M input, 1M context, built for agents
DeepSeek-v4.1-Flash-1017
DeepSeek V4.1 Flash minor update lifts coding and agent benchmarks while cutting run time and output length
Show HN: Llmspeed – feel how fast a local LLM runs before you buy the hardware