LearnQuestion bank

What levers do you have for cutting LLM latency and cost, and what does each trade away?

AI leadershipTechnicalHard

Theme reported publicly: Anthropic

Answer it yourself first, out loud or on paper, then compare.

Answer

Model answer, written in a candidate's voice

In short

  • Continuous batching and KV/prompt caching: raise throughput and reuse prefixes; trade memory pressure, cache-hit dependence, and latency variance.
  • Quantisation and distillation/smaller models: cut memory bandwidth and per-token cost; trade accuracy, robustness, and long-tail/reasoning quality.
  • Speculative decoding: speed up decoding with a draft model; trade extra compute/memory and gains only when the draft agrees.
  • Routing and cascades: cheap model first, escalate on need; trade orchestration complexity and mis-routing risk.
  • Utilisation: right-size vs self-host; trade flexibility and ops burden against cost and latency.
  • Quality checks on every change: gate each win with evals; trade evaluation time/cost and benchmark overfitting risk.

In full

The main levers are throughput, reuse, smaller/faster inference, routing, capacity, and verification. Continuous batching and KV/prompt caching improve utilisation and reuse shared prefixes, but they add memory pressure, depend on cache hits, and can make tail latency less predictable. Quantisation and distillation or smaller models reduce memory bandwidth and cost, but they can hurt accuracy, robustness, and harder reasoning, so they need task-specific evals rather than a blanket swap. Speculative decoding can cut decode latency by letting a draft model propose tokens, but it spends extra compute and memory and only helps when the draft is usually right. Routing and cascades send easy traffic to a cheap model and escalate only when needed, which saves money but adds orchestration and the risk of mis-routing or silent quality loss. Right-sizing and choosing between managed APIs and self-hosting trade flexibility and operational burden against cost and latency, and every change should be gated by quality checks on representative traffic, not just a benchmark, because a latency or cost win that fails on the tail is not a win.

Checked against sources by an independent AI reviewer.

What a strong answer covers

  • Continuous batching and KV/prompt caching
  • Quantisation and distillation/smaller models
  • Speculative decoding
  • Routing and cascades (cheap model first, escalate on need)
  • Utilisation (right-sizing vs self-hosting)
  • Quality checks on every change

Common mistakes

  • Listing techniques with no trade-offs or measurement