Engineering brief
LLM inference is a memory problem, not a compute problem
At a glance
- Relevance
- Practical value
- Warnings
- None
LLM inference cost is recurring, not one-off. The KV cache is the real bottleneck: memory grows with context and users.
Inference cost determines AI product viability; getting it right is a competitive advantage.
Summary
LLM inference cost is a recurring operating expense that scales with usage, unlike training's one-time cost. The core bottleneck is the KV cache—memory grows linearly with context length and concurrently with users, creating a tradeoff between quality, latency, and throughput.
Prefill is compute-bound; decode is memory-bound. Understanding these phases drives optimisation decisions. Model-level techniques like quantization (int8/int4) and grouped-query attention reduce memory footprint, often at negligible quality loss in practice. Flash attention and multi-head latent attention further compress compute.
On the serving side, KV cache management via page attention, continuous batching, and prefix caching dramatically improves throughput. Benchmarks show VLM and SGLang perform similarly for standard workloads, but SGLang can be 3-4× faster for agentic tasks with repeated prompts.
Speculative decoding is overhyped—presenters found it ineffective. The real signal is that architecture decisions (attention mechanism, serving engine) matter more than squeezing last bit of FLOPs. Teams should fix one constraint (latency or throughput) and model the capacity tradeoff systematically.
Watch the video
This video is blocked due to your privacy settings. To watch this video, please accept YouTube marketing cookies.
Related breakdowns
300 agents in 60 people: The ungoverned AI agent sprawl
A 60-person company discovered 300 AI agents running daily. The security and cost surprises that followed apply to every team deploying agents today.
Google's managed agents: convenience vs lock-in for agent deployment.
Google's managed agents promise seamless scaling and multi-agent workflows. But the real signal is the operational overhead tradeoff and vendor lock-in risk.
AI Engineers: Stop Writing Features, Start Building the Loop
The AI engineer role is pivoting from coding features to building self-improving agent loops. But enterprise data messiness and eval trust are open questions.
Get TL;DW
Too Long; Didn't Watch.
A concise breakdowns of the AI and devtools videos that actually matter for engineering leaders.
Free. Weekly. No hype.
Video and thumbnails remain the property of their respective creators. tldw.news provides editorial analysis, commentary, and discovery links to original content.