<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>schristoph.online</title><link>https://schristoph.online/tags/kvcache/</link><description>Personal homepage and blog of Stefan Christoph</description><generator>Hugo -- gohugo.io</generator><language>en-us</language><copyright>Stefan Christoph. All rights reserved.</copyright><lastBuildDate>Wed, 15 Jul 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://schristoph.online/tags/kvcache/index.xml" rel="self" type="application/rss+xml"/><item><title>Why AI Tokens Are So Expensive — and What Actually Makes Them Cheaper</title><link>https://schristoph.online/blog/why-ai-tokens-are-expensive/?utm=rss-feed</link><pubDate>Wed, 15 Jul 2026 00:00:00 +0000</pubDate><guid>https://schristoph.online/blog/why-ai-tokens-are-expensive/</guid><description>&lt;div class="tldr" data-pagefind-weight="5" data-pagefind-meta="tldr" style="display:block;font-size:.875em;margin:2rem 0;border-left:4px solid #ccc;padding-left:1rem;line-height:1.5;">&lt;strong>TL;DR:&lt;/strong> Autoregressive LLM generation has two phases with different bottlenecks: prefill processes input positions in parallel and is usually compute-intensive, while decode produces tokens sequentially and is often limited by memory bandwidth. Long contexts also grow the KV cache, consuming memory that could otherwise support more concurrent requests. In a multi-turn chat, repeatedly sending the full history makes the number of input tokens grow quadratically with the number of similarly sized turns; dense-attention arithmetic is a separate measure and grows faster still. Amazon Bedrock prompt caching does not make those costs disappear or change their Big-O by fiat: it reuses matching prefix state and charges cache reads at a reduced rate, with AWS reporting up to 90% lower input-token cost and up to 85% lower latency for supported models and workloads.&lt;/div>
&lt;p>During some time off in Austria, three of us sat at a marble café table and lost most of an afternoon to a single question: why does an AI token cost what it costs? Two of us have worked deeply on these systems, and the Melange kept coming while we argued over napkins about memory bandwidth, KV caches, and what the machine is doing when it &amp;ldquo;prefills&amp;rdquo; a prompt. I walked out with the same feeling I get from the best hallway conversations: the answer is not exotic. It comes down to two things every computer science graduate already carries around. Memory bandwidth, and Big-O.&lt;/p></description></item></channel></rss>