Rank these chat-API cost levers from highest to lowest typical ROI
- 1Switch to a smaller model that still meets quality bar (e.g. 70B -> 8B with a quality eval)
- 2Turn on speculative decoding with a small draft model
- 3Quantize weights to INT4 (AWQ / GPTQ) on a self-hosted deployment
- 4Enable prompt caching on a repeated system prompt that fires on most requests
- 5Quantize the KV cache to FP8 on a self-hosted deployment
Model substitution dominates because it cuts the workload by 5-20x. Prompt caching wins on whatever fraction of input repeats.
Picture a kitchen that is too expensive to run. The biggest single fix is hiring a cook who is one-tenth the salary but can still make every dish you actually serve. That dwarfs every other change. The next fix is realizing the chef keeps re-reading the same opening recipe ten times a day, so you laminate it and the chef glances at it for almost free. After that, you can buy thinner ingredients (lighter weight stock), use smaller storage containers (smaller KV cache), or pre-prep two dishes in parallel and throw out the bad one (speculative decoding). All three help, but they share the same constraint, the kitchen's serving counter, so their gains overlap and shrink each other. And the speculative trick mostly makes plates come out faster, not cheaper.
Detailed answer & concept explanation~6 min readEverything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example.
Everything important, quickly.
3 min: workload-changing vs efficiency-changing distinction + the model-substitution win + prompt-cache pricing math + why the three infra levers share the bandwidth bottleneck + speculative decoding as a latency lever.
Real products, models, and research that use this idea.
- OpenAI's GPT-4o-mini and Anthropic's Claude Haiku tiers exist precisely to capture the model-substitution savings without forcing teams to self-host.
- Cursor, Perplexity, and many RAG-heavy products report 60-80% input-cost reductions from Anthropic prompt caching on stable system prompts and retrieval contexts.
- vLLM in 2026 defaults to W4A16 + FP8 KV on H100 deployments because the stack matches the decode-bandwidth bottleneck.
- NVIDIA TensorRT-LLM's Medusa and EAGLE speculative-decoding modes ship primarily as latency features, with serving guides noting the verifier-compute overhead.
- Anthropic's Claude Sonnet 4.5 and OpenAI's gpt-5-mini are the 2026 'right-sized' tiers that downstream teams route most non-hard traffic to.
What an interviewer would ask next. Try answering before peeking at the approach.
QHow do you build a model-substitution eval that doesn't leave 30% of regressions in the dark?
QWhy does INT4 weights + FP8 KV cache stack less than additively?
Don't say thisRed flags and common mistakes that signal junior thinking. Click to expand.
Red flags and common mistakes that signal junior thinking. Click to expand.
Putting quantization or speculative decoding first because they sound technical. Model substitution beats them by an order of magnitude when the quality bar allows, and prompt caching often beats them on real production traffic.
The night-before-the-interview bullets. Scan these on the way to the call.
Primary sources. Skim if you want the original framing.
Same topic, related formats. Practice these next.