<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:media="http://search.yahoo.com/mrss/"><channel><title>Decode on k4i's blog</title><link>https://k4i.top/tags/decode/</link><description>Recent content in Decode on k4i's blog</description><generator>Hugo -- gohugo.io</generator><language>en</language><managingEditor>sky_io@outlook.com (K4i)</managingEditor><webMaster>sky_io@outlook.com (K4i)</webMaster><copyright>All content is subject to the license of &lt;a rel="license noopener" href="https://creativecommons.org/licenses/by-nc-sa/4.0/" target="_blank"&gt;CC BY-NC-SA 4.0&lt;/a&gt; .</copyright><lastBuildDate>Fri, 05 Jun 2026 22:30:00 +0800</lastBuildDate><atom:link href="https://k4i.top/tags/decode/index.xml" rel="self" type="application/rss+xml"/><item><title>Prefill vs Decode: Why One Model Has Two Very Different Bottlenecks</title><link>https://k4i.top/posts/prefill-vs-decode/</link><pubDate>Fri, 05 Jun 2026 22:30:00 +0800</pubDate><author>sky_io@outlook.com (K4i)</author><atom:modified>Fri, 05 Jun 2026 22:30:00 +0800</atom:modified><guid>https://k4i.top/posts/prefill-vs-decode/</guid><description>&lt;p&gt;LLM inference looks like one operation: send a prompt, get tokens back. under the hood it is two workloads sharing the same model weights.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;prefill&lt;/strong&gt; processes the input prompt and builds the initial KV cache. &lt;strong&gt;decode&lt;/strong&gt; generates new tokens one step at a time while reading that cache. the weights are the same, but the hardware bottleneck is not. prefill behaves like a large batched matrix multiplication problem; decode behaves like a stream of small queries repeatedly reading a growing memory table.&lt;/p&gt;</description><dc:creator>K4i</dc:creator><media:content url="https://k4i.top//images/posts/prefill-vs-decode/two-bottlenecks.svg" medium="image"><media:title type="html">featured image</media:title></media:content><category>llm</category><category>inference</category><category>prefill</category><category>decode</category><category>kv-cache</category><category>serving</category><category>systems</category><category>AI</category><category>LLM Inference Internals</category></item></channel></rss>