<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:googleplay="http://www.google.com/schemas/play-podcasts/1.0"><channel><title><![CDATA[The AiEdge Newsletter]]></title><description><![CDATA[A newsletter for continuous learning about Machine Learning applications, Machine Learning System Design, MLOps, the latest techniques and news. 
Subscribe and receive a free Machine Learning book PDF!]]></description><link>https://newsletter.theaiedge.io</link><image><url>https://substackcdn.com/image/fetch/$s_!kRD-!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ff6e9c582-b22b-45c5-a64e-a9105824fb01_1067x1067.png</url><title>The AiEdge Newsletter</title><link>https://newsletter.theaiedge.io</link></image><generator>Substack</generator><lastBuildDate>Fri, 27 Nov 2026 01:20:51 GMT</lastBuildDate><atom:link href="https://newsletter.theaiedge.io/feed" rel="self" type="application/rss+xml"/><copyright><![CDATA[AiEdge]]></copyright><language><![CDATA[en]]></language><webMaster><![CDATA[damienb@theaiedge.io]]></webMaster><itunes:owner><itunes:email><![CDATA[damienb@theaiedge.io]]></itunes:email><itunes:name><![CDATA[Damien Benveniste]]></itunes:name></itunes:owner><itunes:author><![CDATA[Damien Benveniste]]></itunes:author><googleplay:owner><![CDATA[damienb@theaiedge.io]]></googleplay:owner><googleplay:email><![CDATA[damienb@theaiedge.io]]></googleplay:email><googleplay:author><![CDATA[Damien Benveniste]]></googleplay:author><itunes:block><![CDATA[Yes]]></itunes:block><item><title><![CDATA[How LLMs Encode Token Position]]></title><description><![CDATA[Follow learned vectors, sinusoids, RoPE, and ALiBi from token indices to attention scores.]]></description><link>https://newsletter.theaiedge.io/p/how-llms-encode-token-position</link><guid isPermaLink="false">https://newsletter.theaiedge.io/p/how-llms-encode-token-position</guid><dc:creator><![CDATA[Damien Benveniste]]></dc:creator><pubDate>Mon, 23 Nov 2026 16:02:52 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/85586e3a-c39d-453c-a7d4-d726cbe38b1d_1536x1024.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p><strong>Positional encodings make a token's place in a sequence affect an LLM's computation.</strong> They introduce position numbers while the model processes its input or compares tokens inside attention. The same word can then be represented differently at two locations, or receive a different attention score because it is farther away.</p><p>Ahead of AI's recent <a href="https://magazine.sebastianraschka.com/p/understanding-positional-embeddings">positional-embedding explainer</a> connects these architecture choices to context extension, making their behavior relevant when judging what a longer context setting actually changes.</p><p>How does a position number become something a neural network can use?</p><p>The useful organizing question is <strong>where position enters the calculation</strong>. We will develop four members of the positional-encoding family:</p><ul><li><p><strong>Learned absolute positions:</strong> look up a trained vector for each slot and add it to the token's vector.</p></li><li><p><strong>Sinusoidal positions:</strong> compute that added vector from sine and cosine functions instead of learning a table.</p></li><li><p><strong>Rotary position embeddings, or RoPE:</strong> rotate the vectors used to compare tokens, making their dot product depend on relative position.</p></li><li><p><strong>Attention with Linear Biases, or ALiBi:</strong> subtract a distance cost directly from attention scores, with different strengths across attention heads.</p></li></ul><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!coXu!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1f541bb5-cbac-4cf9-a984-5356296aaf70_1774x887.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!coXu!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1f541bb5-cbac-4cf9-a984-5356296aaf70_1774x887.png 424w, https://substackcdn.com/image/fetch/$s_!coXu!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1f541bb5-cbac-4cf9-a984-5356296aaf70_1774x887.png 848w, https://substackcdn.com/image/fetch/$s_!coXu!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1f541bb5-cbac-4cf9-a984-5356296aaf70_1774x887.png 1272w, https://substackcdn.com/image/fetch/$s_!coXu!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1f541bb5-cbac-4cf9-a984-5356296aaf70_1774x887.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!coXu!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1f541bb5-cbac-4cf9-a984-5356296aaf70_1774x887.png" width="1774" height="887" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/1f541bb5-cbac-4cf9-a984-5356296aaf70_1774x887.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:887,&quot;width&quot;:1774,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1108436,&quot;alt&quot;:&quot;Two identical earlier tokens are five positions and one position behind the current token. Both are available, but their positional relationships differ.&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Two identical earlier tokens are five positions and one position behind the current token. Both are available, but their positional relationships differ." title="Two identical earlier tokens are five positions and one position behind the current token. Both are available, but their positional relationships differ." srcset="https://substackcdn.com/image/fetch/$s_!coXu!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1f541bb5-cbac-4cf9-a984-5356296aaf70_1774x887.png 424w, https://substackcdn.com/image/fetch/$s_!coXu!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1f541bb5-cbac-4cf9-a984-5356296aaf70_1774x887.png 848w, https://substackcdn.com/image/fetch/$s_!coXu!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1f541bb5-cbac-4cf9-a984-5356296aaf70_1774x887.png 1272w, https://substackcdn.com/image/fetch/$s_!coXu!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1f541bb5-cbac-4cf9-a984-5356296aaf70_1774x887.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Token identity alone does not specify where an occurrence sits relative to the current token.</figcaption></figure></div><p>Here is an immediate consequence. A positional rule and an attention mask answer different questions. A causal mask determines whether a token may consult a particular position at all. A positional encoding changes the information or score used when that consultation is allowed. The final attention weight also depends on content and on the other available tokens.</p><p>That distinction explains why a nearby token need not receive the largest weight, and why giving every position a coordinate does not ensure that the model will retrieve the right distant fact. To understand those outcomes, we need to follow the coordinate into the calculation.</p><p><strong>Contents</strong></p><ul><li><p>What position changes in attention</p></li><li><p>Learned positions add a coordinate</p></li><li><p>Sinusoids provide reusable coordinates</p></li><li><p>RoPE rotates queries and keys</p></li><li><p>ALiBi adds a distance cost</p></li><li><p>What changes when context grows</p></li></ul>
      <p>
          <a href="https://newsletter.theaiedge.io/p/how-llms-encode-token-position">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[How RAG Stays in Sync with Its Sources]]></title><description><![CDATA[Follow document edits through indexing, version publication, permissions, and cached answers.]]></description><link>https://newsletter.theaiedge.io/p/how-rag-stays-in-sync-with-its-sources</link><guid isPermaLink="false">https://newsletter.theaiedge.io/p/how-rag-stays-in-sync-with-its-sources</guid><dc:creator><![CDATA[Damien Benveniste]]></dc:creator><pubDate>Fri, 20 Nov 2026 16:02:23 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/9746715b-270f-4ec0-a2b8-7132a9ebf333_1536x1024.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p><strong>A retrieval-augmented generation (RAG) system answers with information fetched from an external collection.</strong> It usually prepares documents for search before a question arrives, then retrieves passages and places them in the language model's context. Editing a source document changes that external evidence. It does not automatically update the search index, cached answers, or the model's weights.</p><p>Daily Dose of Data Science's recent <a href="https://blog.dailydoseofds.com/p/moving-from-rag-apps-to-rag-systems">RAG systems coverage</a> includes document synchronization, making the path from a source edit to a usable answer a concrete engineering concern.</p><p>How does a RAG system keep its evidence current when documents are edited, deleted, or restricted?</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!cf1f!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6a019b1d-0979-4221-9041-0849ea0be4a1_1774x887.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!cf1f!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6a019b1d-0979-4221-9041-0849ea0be4a1_1774x887.png 424w, https://substackcdn.com/image/fetch/$s_!cf1f!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6a019b1d-0979-4221-9041-0849ea0be4a1_1774x887.png 848w, https://substackcdn.com/image/fetch/$s_!cf1f!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6a019b1d-0979-4221-9041-0849ea0be4a1_1774x887.png 1272w, https://substackcdn.com/image/fetch/$s_!cf1f!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6a019b1d-0979-4221-9041-0849ea0be4a1_1774x887.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!cf1f!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6a019b1d-0979-4221-9041-0849ea0be4a1_1774x887.png" width="1774" height="887" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/6a019b1d-0979-4221-9041-0849ea0be4a1_1774x887.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:887,&quot;width&quot;:1774,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1255673,&quot;alt&quot;:&quot;The source says 30 days while an old indexed passage says 60 days and still matches the question.&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="The source says 30 days while an old indexed passage says 60 days and still matches the question." title="The source says 30 days while an old indexed passage says 60 days and still matches the question." srcset="https://substackcdn.com/image/fetch/$s_!cf1f!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6a019b1d-0979-4221-9041-0849ea0be4a1_1774x887.png 424w, https://substackcdn.com/image/fetch/$s_!cf1f!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6a019b1d-0979-4221-9041-0849ea0be4a1_1774x887.png 848w, https://substackcdn.com/image/fetch/$s_!cf1f!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6a019b1d-0979-4221-9041-0849ea0be4a1_1774x887.png 1272w, https://substackcdn.com/image/fetch/$s_!cf1f!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6a019b1d-0979-4221-9041-0849ea0be4a1_1774x887.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">A passage can match the question perfectly while describing a superseded source revision.</figcaption></figure></div><p>The useful mental model is a <strong>derived view with two interacting paths</strong>. The update path observes changes and builds searchable representations. The read path decides which retrieved representations may enter the answer. They meet at a small record of document state: what revision has been observed, which completed version is published, and whether the document may still be used.</p><p>One immediate consequence: a high similarity score cannot tell you whether a passage is current. A superseded policy can be an excellent semantic match for a question about that policy. Asking the answering model to prefer recent information cannot reliably repair an index that never supplied the replacement.</p><p>The system therefore needs two different capabilities: stop using evidence that has become ineligible, and make newly eligible evidence discoverable. A permission check can do the first while leaving the second completely unsolved.</p><p>We will follow the contracts connecting source capture, document generations, publication, retrieval, and reuse. The examples use illustrative revisions and offsets, not measured service timings. The goal is an adaptable architecture: which state must agree, where a transaction helps, and which gaps remain when components update independently.</p><p><strong>Contents</strong></p><ul><li><p>The two paths behind a RAG answer</p></li><li><p>Capture every source change</p></li><li><p>Publish complete document versions</p></li><li><p>Admit only eligible evidence</p></li><li><p>Carry changes through caches and deletion</p></li><li><p>Choose and test the consistency boundary</p></li></ul>
      <p>
          <a href="https://newsletter.theaiedge.io/p/how-rag-stays-in-sync-with-its-sources">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[How PPO, RLOO, and GRPO Train LLMs]]></title><description><![CDATA[Follow rewards through prefix predictions, response groups, and clipped updates to understand what each method changes.]]></description><link>https://newsletter.theaiedge.io/p/how-ppo-rloo-and-grpo-train-llms</link><guid isPermaLink="false">https://newsletter.theaiedge.io/p/how-ppo-rloo-and-grpo-train-llms</guid><dc:creator><![CDATA[Damien Benveniste]]></dc:creator><pubDate>Mon, 16 Nov 2026 16:02:57 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/91facf62-6685-4710-8824-17b105268d24_1536x1024.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p><strong>Reinforcement learning trains an LLM by scoring answers it generates and using those scores to change its weights.</strong> The model samples a response, a checker or reward model evaluates it, and training adjusts the probabilities of the tokens that produced it. Those changes remain when the model answers another question. Selecting the best of several answers at inference time does not, by itself, perform this training.</p><p>Ahead of AI's recent <a href="https://magazine.sebastianraschka.com/p/building-reasoning-models">reasoning-model course</a> includes implementing GRPO, making the path from answer scores to weight updates a concrete part of learning how reasoning models are trained.</p><p>How can one score at the end of an answer tell the model how to change thousands of token probabilities?</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!5Rsh!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1e0f8cdc-5f2b-4294-a723-7baf1f05d2d0_2175x723.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!5Rsh!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1e0f8cdc-5f2b-4294-a723-7baf1f05d2d0_2175x723.png 424w, https://substackcdn.com/image/fetch/$s_!5Rsh!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1e0f8cdc-5f2b-4294-a723-7baf1f05d2d0_2175x723.png 848w, https://substackcdn.com/image/fetch/$s_!5Rsh!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1e0f8cdc-5f2b-4294-a723-7baf1f05d2d0_2175x723.png 1272w, https://substackcdn.com/image/fetch/$s_!5Rsh!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1e0f8cdc-5f2b-4294-a723-7baf1f05d2d0_2175x723.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!5Rsh!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1e0f8cdc-5f2b-4294-a723-7baf1f05d2d0_2175x723.png" width="2175" height="723" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/1e0f8cdc-5f2b-4294-a723-7baf1f05d2d0_2175x723.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:723,&quot;width&quot;:2175,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1149913,&quot;alt&quot;:&quot;With the same baseline of 0.4, reward zero gives advantage minus 0.4 and discourages sampled behavior; reward one gives advantage plus 0.6 and encourages it.&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="With the same baseline of 0.4, reward zero gives advantage minus 0.4 and discourages sampled behavior; reward one gives advantage plus 0.6 and encourages it." title="With the same baseline of 0.4, reward zero gives advantage minus 0.4 and discourages sampled behavior; reward one gives advantage plus 0.6 and encourages it." srcset="https://substackcdn.com/image/fetch/$s_!5Rsh!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1e0f8cdc-5f2b-4294-a723-7baf1f05d2d0_2175x723.png 424w, https://substackcdn.com/image/fetch/$s_!5Rsh!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1e0f8cdc-5f2b-4294-a723-7baf1f05d2d0_2175x723.png 848w, https://substackcdn.com/image/fetch/$s_!5Rsh!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1e0f8cdc-5f2b-4294-a723-7baf1f05d2d0_2175x723.png 1272w, https://substackcdn.com/image/fetch/$s_!5Rsh!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1e0f8cdc-5f2b-4294-a723-7baf1f05d2d0_2175x723.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">A zero reward can still produce a negative learning signal. These illustrative comparisons use the same baseline of 0.4.</figcaption></figure></div><p>The useful starting point is <strong>reward relative to an expectation</strong>. A training algorithm constructs an <em>advantage</em>: a signed estimate of how much better or worse sampled behavior was than a baseline. Positive advantage encourages that behavior; negative advantage discourages it. The difficult choice is what evidence supplies the baseline and how strongly to weight the difference.</p><p>We will follow three policy-gradient methods, which train the model through the probabilities of its sampled actions:</p><ul><li><p><strong>PPO, Proximal Policy Optimization:</strong> in its common actor&#8211;critic form, a learned value model predicts the future reward available from each unfinished response. The training signal compares observed progress with those predictions.</p></li><li><p><strong>RLOO, REINFORCE Leave-One-Out:</strong> other independently sampled answers to the same prompt provide the baseline. There is no learned value model to fit.</p></li><li><p><strong>GRPO, Group Relative Policy Optimization:</strong> answers are compared with their group mean, and the differences are divided by the group's reward spread.</p></li></ul><p>This organizing axis is the source and scale of the advantage. PPO also names an update-control rule, clipping, that can be combined with group-based advantages. These are partly interchangeable components, not three sealed systems.</p><p>One immediate consequence: an answer with reward zero can still produce a useful negative training signal if the baseline is positive. Conversely, a successful answer need not receive a large positive signal when success was already strongly expected. <strong>The score describes the outcome; the advantage determines its relative push on the model.</strong> Neither tells us that every token in a successful response was necessary or correct.</p><p><strong>Contents</strong></p><ul><li><p>From reward to a weight update</p></li><li><p>PPO learns a value for each prefix</p></li><li><p>RLOO compares separate attempts</p></li><li><p>GRPO standardizes the group</p></li><li><p>Control how far an update moves</p></li><li><p>Choose the evidence your training needs</p></li></ul>
      <p>
          <a href="https://newsletter.theaiedge.io/p/how-ppo-rloo-and-grpo-train-llms">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[How FlashAttention Speeds Up LLM Attention]]></title><description><![CDATA[Follow the running sum that saves GPU memory, then see how training and decoding change the work.]]></description><link>https://newsletter.theaiedge.io/p/how-flashattention-speeds-up-llm-attention</link><guid isPermaLink="false">https://newsletter.theaiedge.io/p/how-flashattention-speeds-up-llm-attention</guid><dc:creator><![CDATA[Damien Benveniste]]></dc:creator><pubDate>Fri, 13 Nov 2026 16:03:36 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/d2e8beba-f41b-42c3-a3cc-3ecf93d09ad4_1536x1024.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p><strong>FlashAttention computes attention in small pieces and combines them without storing the full matrix of attention scores.</strong> It runs inside a Transformer's attention layer, where each token compares its query with keys from other allowed positions and mixes their values. The change is in how that calculation uses GPU memory. It still evaluates the attention connections specified by the model.</p><p>PyTorch exposes FlashAttention through its <a href="https://docs.pytorch.org/docs/2.14/generated/torch.nn.functional.scaled_dot_product_attention.html">scaled-dot-product-attention interface</a>, making the distinction between an attention formula and its execution a practical choice for running LLMs.</p><p>How can the result stay the same when the implementation never keeps the whole matrix?</p><p>The answer is that each query needs a <strong>normalized weighted sum</strong>. FlashAttention maintains a small running state for that sum, updates it as more keys arrive, and discards the temporary scores. The difficult part is keeping contributions from different pieces on the same numerical scale.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!m3-R!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7ade87d7-4861-4e7a-9e5e-177d8c8347bb_1774x887.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!m3-R!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7ade87d7-4861-4e7a-9e5e-177d8c8347bb_1774x887.png 424w, https://substackcdn.com/image/fetch/$s_!m3-R!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7ade87d7-4861-4e7a-9e5e-177d8c8347bb_1774x887.png 848w, https://substackcdn.com/image/fetch/$s_!m3-R!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7ade87d7-4861-4e7a-9e5e-177d8c8347bb_1774x887.png 1272w, https://substackcdn.com/image/fetch/$s_!m3-R!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7ade87d7-4861-4e7a-9e5e-177d8c8347bb_1774x887.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!m3-R!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7ade87d7-4861-4e7a-9e5e-177d8c8347bb_1774x887.png" width="1774" height="887" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/7ade87d7-4861-4e7a-9e5e-177d8c8347bb_1774x887.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:887,&quot;width&quot;:1774,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1280684,&quot;alt&quot;:&quot;One query reaches the same output by retaining four scores or by consuming two score tiles with a running state. Each query has its own state.&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="One query reaches the same output by retaining four scores or by consuming two score tiles with a running state. Each query has its own state." title="One query reaches the same output by retaining four scores or by consuming two score tiles with a running state. Each query has its own state." srcset="https://substackcdn.com/image/fetch/$s_!m3-R!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7ade87d7-4861-4e7a-9e5e-177d8c8347bb_1774x887.png 424w, https://substackcdn.com/image/fetch/$s_!m3-R!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7ade87d7-4861-4e7a-9e5e-177d8c8347bb_1774x887.png 848w, https://substackcdn.com/image/fetch/$s_!m3-R!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7ade87d7-4861-4e7a-9e5e-177d8c8347bb_1774x887.png 1272w, https://substackcdn.com/image/fetch/$s_!m3-R!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7ade87d7-4861-4e7a-9e5e-177d8c8347bb_1774x887.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Preserving every allowed connection does not require preserving every intermediate score.</figcaption></figure></div><p>This gives us a useful distinction immediately. Sparse attention changes which positions participate in the calculation. FlashAttention can preserve every allowed connection while changing how long its intermediate results live. An attention matrix can describe the computation without becoming a large array that the GPU must write out and read back.</p><p>We will build that distinction from the attention calculation itself, derive the running update, then follow it into GPU execution, training, and token generation. You will be able to explain both the memory saving and the conditions that limit the speedup.</p><p><strong>Table of contents</strong></p><ul><li><p>What attention computes</p></li><li><p>Why the matrix is expensive</p></li><li><p>Normalize attention in pieces</p></li><li><p>Keep the work on the GPU chip</p></li><li><p>Recompute probabilities for training</p></li><li><p>Understand the speedup's limits</p></li></ul>
      <p>
          <a href="https://newsletter.theaiedge.io/p/how-flashattention-speeds-up-llm-attention">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[How Astra Edited Qwen’s Weights]]></title><description><![CDATA[From diagnosing repetitive reasoning to a persistent patch, and what the results establish about weight-space programming.]]></description><link>https://newsletter.theaiedge.io/p/how-astra-edited-qwens-weights</link><guid isPermaLink="false">https://newsletter.theaiedge.io/p/how-astra-edited-qwens-weights</guid><dc:creator><![CDATA[Damien Benveniste]]></dc:creator><pubDate>Mon, 09 Nov 2026 16:01:14 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/94cf18f1-52b6-4b3e-8584-790a83eb9166_1536x1024.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p><strong>Weight-space programming means inspecting and directly modifying the numerical parameters of a neural network.</strong> Instead of asking a training optimizer to find an update, an agent can write code that measures internal behavior, constructs a specific change, and tests the resulting model. The weights retain that change when the next request arrives.</p><p>In the November 2026 Astra experiments, the released checkpoint, edit manifests, and investigation logs make this proposed model-repair workflow inspectable: we can connect the claimed improvement to the actual numbers changed. <a href="https://rikiyat.github.io/blog/weight-space-programming/">The release</a></p><p>Astra, the AI agent conducting the investigation, edited <strong>Qwen3.5-0.8B</strong>, a small language model. It modified another model&#8217;s weights, not its own.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Umty!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4ac06b17-9657-482e-8f67-b5103ec4c133_1774x887.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Umty!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4ac06b17-9657-482e-8f67-b5103ec4c133_1774x887.png 424w, https://substackcdn.com/image/fetch/$s_!Umty!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4ac06b17-9657-482e-8f67-b5103ec4c133_1774x887.png 848w, https://substackcdn.com/image/fetch/$s_!Umty!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4ac06b17-9657-482e-8f67-b5103ec4c133_1774x887.png 1272w, https://substackcdn.com/image/fetch/$s_!Umty!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4ac06b17-9657-482e-8f67-b5103ec4c133_1774x887.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Umty!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4ac06b17-9657-482e-8f67-b5103ec4c133_1774x887.png" width="1774" height="887" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/4ac06b17-9657-482e-8f67-b5103ec4c133_1774x887.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:887,&quot;width&quot;:1774,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1249193,&quot;alt&quot;:&quot;The same prompt enters two Qwen checkpoints. Selected weight columns differ, and their generated continuations can diverge.&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="The same prompt enters two Qwen checkpoints. Selected weight columns differ, and their generated continuations can diverge." title="The same prompt enters two Qwen checkpoints. Selected weight columns differ, and their generated continuations can diverge." srcset="https://substackcdn.com/image/fetch/$s_!Umty!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4ac06b17-9657-482e-8f67-b5103ec4c133_1774x887.png 424w, https://substackcdn.com/image/fetch/$s_!Umty!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4ac06b17-9657-482e-8f67-b5103ec4c133_1774x887.png 848w, https://substackcdn.com/image/fetch/$s_!Umty!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4ac06b17-9657-482e-8f67-b5103ec4c133_1774x887.png 1272w, https://substackcdn.com/image/fetch/$s_!Umty!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4ac06b17-9657-482e-8f67-b5103ec4c133_1774x887.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">A persistent weight change is reused at every generation step. These paths illustrate the relationship, not recorded text.</figcaption></figure></div><p>How could changing a small part of Qwen&#8217;s weights produce a large improvement?</p><p>The compact answer is that Astra changed what selected internal components contribute to Qwen&#8217;s working representation. Those contributions depend on the current input. The edited model consequently follows different generation paths, often escaping repetitive reasoning that previously consumed its entire output allowance.</p><p>The reported MATH-500 accuracy rose from <strong>7.9% to 48.1%</strong>. Those figures average four generations for each of 500 questions; they are not the percentage of questions solved at least once. Under the same study settings, the share of generations hitting the 32,768-token limit fell from <strong>93.0% to about 33.1%</strong>. <a href="https://github.com/RikiyaT/lm_understand-logs/blob/main/exp8_math/eval/RESULTS_excerpt.md">Released evaluation results</a></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!gRlH!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F872a9ea7-53f2-4c6c-b754-4adb3ec2ea9a_1600x650.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!gRlH!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F872a9ea7-53f2-4c6c-b754-4adb3ec2ea9a_1600x650.png 424w, https://substackcdn.com/image/fetch/$s_!gRlH!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F872a9ea7-53f2-4c6c-b754-4adb3ec2ea9a_1600x650.png 848w, https://substackcdn.com/image/fetch/$s_!gRlH!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F872a9ea7-53f2-4c6c-b754-4adb3ec2ea9a_1600x650.png 1272w, https://substackcdn.com/image/fetch/$s_!gRlH!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F872a9ea7-53f2-4c6c-b754-4adb3ec2ea9a_1600x650.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!gRlH!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F872a9ea7-53f2-4c6c-b754-4adb3ec2ea9a_1600x650.png" width="1600" height="650" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/872a9ea7-53f2-4c6c-b754-4adb3ec2ea9a_1600x650.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:650,&quot;width&quot;:1600,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:44784,&quot;alt&quot;:&quot;Original and edited MATH-500 accuracy was 7.9% and 48.1%; token-limit rates were 93.0% and 33.1%, with 2,000 generations per checkpoint.&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Original and edited MATH-500 accuracy was 7.9% and 48.1%; token-limit rates were 93.0% and 33.1%, with 2,000 generations per checkpoint." title="Original and edited MATH-500 accuracy was 7.9% and 48.1%; token-limit rates were 93.0% and 33.1%, with 2,000 generations per checkpoint." srcset="https://substackcdn.com/image/fetch/$s_!gRlH!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F872a9ea7-53f2-4c6c-b754-4adb3ec2ea9a_1600x650.png 424w, https://substackcdn.com/image/fetch/$s_!gRlH!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F872a9ea7-53f2-4c6c-b754-4adb3ec2ea9a_1600x650.png 848w, https://substackcdn.com/image/fetch/$s_!gRlH!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F872a9ea7-53f2-4c6c-b754-4adb3ec2ea9a_1600x650.png 1272w, https://substackcdn.com/image/fetch/$s_!gRlH!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F872a9ea7-53f2-4c6c-b754-4adb3ec2ea9a_1600x650.png 1456w" sizes="100vw"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Reported MATH-500 results: 500 questions, four samples each. Thinking enabled; temperature 0.6, top-p 0.95, top-k 20, presence penalty 1.5, cap 32,768 tokens. Correctness and cap-hits can overlap; these are not new measurements.</figcaption></figure></div><p>This gives us a useful first distinction. A math benchmark measures whether a run produces a correct, extractable answer under its evaluation conditions. A model that repeatedly restarts its reasoning can fail that test even when parts of its reasoning are useful. Changing how it continues can improve the measured score without establishing that new mathematical knowledge was inserted.</p><p>Accuracy and completion are also separate outcomes. A run can write the correct answer and then continue until the limit. We need both measurements, plus the actual intervention, to understand the result.</p><p>We will follow the computation from MLP columns to changed generations, then examine the controls, alternative generation settings, and requirements for reproduction.</p><p><strong>Contents</strong></p><ul><li><p>What weight-space programming changes</p></li><li><p>How an MLP writes into a token state</p></li><li><p>How Astra found a candidate repair</p></li><li><p>What the final patch computes</p></li><li><p>Why generations changed</p></li><li><p>Which conclusions survive the controls</p></li><li><p>Reproduce the patch and test the claim</p></li></ul>
      <p>
          <a href="https://newsletter.theaiedge.io/p/how-astra-edited-qwens-weights">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[How LLM Distillation Trains Smaller Models]]></title><description><![CDATA[From teacher-written answers to probability targets and feedback on the student&#8217;s own output.]]></description><link>https://newsletter.theaiedge.io/p/how-llm-distillation-trains-smaller-models</link><guid isPermaLink="false">https://newsletter.theaiedge.io/p/how-llm-distillation-trains-smaller-models</guid><dc:creator><![CDATA[Damien Benveniste]]></dc:creator><pubDate>Fri, 06 Nov 2026 16:02:12 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/cd02b71f-6d9c-4f6e-9e78-426c40931151_1536x1024.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p><strong>LLM distillation trains one language model using the behavior of another.</strong> The teacher supplies answers or probabilities for possible next tokens. Training compares those targets with the student's predictions and changes the student's weights. When training ends, the student can generate answers on its own.</p><p>Ahead of AI's recent <a href="https://magazine.sebastianraschka.com/p/building-reasoning-models">reasoning-model course</a> teaches distillation as a route to smaller reasoning models, making the transfer of useful behavior into a cheaper model a concrete training choice.</p><p>How does that transfer happen? Through three decisions: <strong>what the teacher supplies, where the student practices, and which differences the training loss penalizes.</strong> Those decisions determine what the student has an opportunity to learn. They do not guarantee that it acquires everything the teacher can do.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!gYka!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F055aede3-c4c7-4f91-8739-9d76a6575e1c_1536x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!gYka!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F055aede3-c4c7-4f91-8739-9d76a6575e1c_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!gYka!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F055aede3-c4c7-4f91-8739-9d76a6575e1c_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!gYka!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F055aede3-c4c7-4f91-8739-9d76a6575e1c_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!gYka!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F055aede3-c4c7-4f91-8739-9d76a6575e1c_1536x1024.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!gYka!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F055aede3-c4c7-4f91-8739-9d76a6575e1c_1536x1024.png" width="1536" height="1024" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/055aede3-c4c7-4f91-8739-9d76a6575e1c_1536x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1024,&quot;width&quot;:1536,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1368211,&quot;alt&quot;:&quot;Teacher targets change student weights during training; deployment uses the trained student alone.&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Teacher targets change student weights during training; deployment uses the trained student alone." title="Teacher targets change student weights during training; deployment uses the trained student alone." srcset="https://substackcdn.com/image/fetch/$s_!gYka!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F055aede3-c4c7-4f91-8739-9d76a6575e1c_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!gYka!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F055aede3-c4c7-4f91-8739-9d76a6575e1c_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!gYka!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F055aede3-c4c7-4f91-8739-9d76a6575e1c_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!gYka!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F055aede3-c4c7-4f91-8739-9d76a6575e1c_1536x1024.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Distillation moves the teacher&#8217;s influence into the student&#8217;s learned parameters.</figcaption></figure></div><p>A useful distinction comes before any equations. Distillation changes a model during training. It does not normally keep a larger model beside it to check every answer during deployment. In speculative decoding, a small model proposes tokens and a larger model verifies them. After distillation, the smaller model's own predictions determine its output. Removing the teacher from that loop creates the potential saving, and also makes the student's independent quality the relevant test.</p><p>Nor does distillation automatically make a model smaller. We choose a student architecture, usually start from an already pretrained checkpoint, and train it to reproduce selected behavior. A smaller student might learn a specialized task well while losing some of the teacher's breadth. Distillation can also use a student of the same size; here we will focus on transferring behavior into a smaller model.</p><p>We will follow the training signal from recorded answers to probability targets, then change who produces the prefixes used for training. That will let us explain why a teacher can provide useful feedback on student mistakes without becoming a correctness oracle.</p><p><strong>Contents</strong></p><ul><li><p>What moves from teacher to student</p></li><li><p>Learn from a teacher's answers</p></li><li><p>Learn from a teacher's probabilities</p></li><li><p>Train where the student actually goes</p></li><li><p>Choose what the student should match</p></li><li><p>Check what transferred</p></li></ul>
      <p>
          <a href="https://newsletter.theaiedge.io/p/how-llm-distillation-trains-smaller-models">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[How Quantization Compresses LLMs]]></title><description><![CDATA[Follow GPTQ, AWQ, and SmoothQuant through weight compensation, channel scaling, and low-precision execution.]]></description><link>https://newsletter.theaiedge.io/p/how-quantization-compresses-llms</link><guid isPermaLink="false">https://newsletter.theaiedge.io/p/how-quantization-compresses-llms</guid><dc:creator><![CDATA[Damien Benveniste]]></dc:creator><pubDate>Mon, 02 Nov 2026 16:01:35 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/515aaea2-266e-4d9c-b7db-54210d84f3d0_1536x1024.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p><strong>LLM quantization represents a model&#8217;s numbers with fewer bits.</strong> Post-training quantization does this after the model has learned its weights. It maps those weights, and sometimes the changing numerical inputs called activations, onto a smaller set of representable values. The model still computes new answers, but its calculations now use approximations.</p><p>Serving engines such as <a href="https://docs.vllm.ai/en/latest/features/quantization/">vLLM</a> support several quantization methods with different hardware requirements, making a smaller checkpoint a choice about execution as well as storage.</p><p>How can we remove precision without removing the computation that makes the model useful?</p><p>The central idea is to preserve what the numbers <strong>do together</strong>. A weight contributes to an output by multiplying an activation. A small weight error can matter greatly when its input is large. Errors in different weights can also reinforce or cancel one another.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!IKoH!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F76e12d05-e0bf-4a71-a6e7-6837aa78a510_1944x809.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!IKoH!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F76e12d05-e0bf-4a71-a6e7-6837aa78a510_1944x809.png 424w, https://substackcdn.com/image/fetch/$s_!IKoH!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F76e12d05-e0bf-4a71-a6e7-6837aa78a510_1944x809.png 848w, https://substackcdn.com/image/fetch/$s_!IKoH!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F76e12d05-e0bf-4a71-a6e7-6837aa78a510_1944x809.png 1272w, https://substackcdn.com/image/fetch/$s_!IKoH!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F76e12d05-e0bf-4a71-a6e7-6837aa78a510_1944x809.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!IKoH!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F76e12d05-e0bf-4a71-a6e7-6837aa78a510_1944x809.png" width="1944" height="809" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/76e12d05-e0bf-4a71-a6e7-6837aa78a510_1944x809.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:809,&quot;width&quot;:1944,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1156623,&quot;alt&quot;:&quot;The same weight error contributes 0.04 when multiplied by input 1 and 0.8 when multiplied by input 20.&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="The same weight error contributes 0.04 when multiplied by input 1 and 0.8 when multiplied by input 20." title="The same weight error contributes 0.04 when multiplied by input 1 and 0.8 when multiplied by input 20." srcset="https://substackcdn.com/image/fetch/$s_!IKoH!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F76e12d05-e0bf-4a71-a6e7-6837aa78a510_1944x809.png 424w, https://substackcdn.com/image/fetch/$s_!IKoH!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F76e12d05-e0bf-4a71-a6e7-6837aa78a510_1944x809.png 848w, https://substackcdn.com/image/fetch/$s_!IKoH!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F76e12d05-e0bf-4a71-a6e7-6837aa78a510_1944x809.png 1272w, https://substackcdn.com/image/fetch/$s_!IKoH!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F76e12d05-e0bf-4a71-a6e7-6837aa78a510_1944x809.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">A coefficient&#8217;s error reaches the output through the activation it multiplies.</figcaption></figure></div><p>We will follow three members of the post-training quantization family, organized by where they absorb that error:</p><ul><li><p><strong>GPTQ</strong> rounds a weight, then adjusts weights that have not yet been rounded to compensate for its effect.</p></li><li><p><strong>AWQ</strong>, activation-aware weight quantization, rescales input channels so consequential weights get a more useful rounding grid.</p></li><li><p><strong>SmoothQuant</strong> redistributes large activation values into the weights, making it easier to quantize both operands of a matrix multiplication.</p></li></ul><p>These choices are related, but they are not three interchangeable file formats. GPTQ and AWQ are commonly used for weight-only compression. SmoothQuant addresses the additional difficulty of quantizing activations, and its transformation can be followed by GPTQ.</p><p>Here is the first useful distinction: <strong>the largest weight is not automatically the most important weight to preserve.</strong> Its effect depends on the input it multiplies and the other contributions to the output. That is why a conversion method may run calibration text through a trained model before deciding how to round its weights. It needs examples of the computation it is trying to preserve.</p><p><strong>Table of contents</strong></p><ul><li><p>What rounding changes</p></li><li><p>GPTQ compensates across weights</p></li><li><p>AWQ changes the effective grid</p></li><li><p>SmoothQuant balances two operands</p></li><li><p>From compressed weights to execution</p></li></ul>
      <p>
          <a href="https://newsletter.theaiedge.io/p/how-quantization-compresses-llms">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[How CUDA Graphs Speed Up LLM Inference]]></title><description><![CDATA[Replay GPU operations with fresh tokens, growing caches, and changing batches.]]></description><link>https://newsletter.theaiedge.io/p/how-cuda-graphs-speed-up-llm-inference</link><guid isPermaLink="false">https://newsletter.theaiedge.io/p/how-cuda-graphs-speed-up-llm-inference</guid><dc:creator><![CDATA[Damien Benveniste]]></dc:creator><pubDate>Fri, 30 Oct 2026 15:01:29 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/dd83d786-690b-411f-bb0c-77f0ff41eb33_1536x1024.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p><strong>CUDA Graphs can speed up repeated GPU work by preparing its execution plan once and replaying it with new data.</strong> They are a feature of NVIDIA&#8217;s CUDA platform. In LLM inference, that work can be the sequence of operations used to generate the next token. Replay launches those operations again; it does not return an earlier answer or avoid computing the new token.</p><p>Serving engines such as <a href="https://docs.vllm.ai/en/latest/design/cuda_graphs/">vLLM</a> expose full and piecewise graph modes, making replay coverage a practical choice about latency and GPU memory.</p><p>How can a reusable plan handle an LLM whose tokens, context lengths, and active requests keep changing?</p><p>The useful distinction is between <strong>the description of the work</strong> and <strong>the data that work reads</strong>. A captured operation can keep the same input address while the values stored at that address change. The GPU then follows the prepared dependencies and computes a fresh result.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!PodH!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1672d516-423a-4fc8-b62c-7770f5a2fe32_2172x724.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!PodH!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1672d516-423a-4fc8-b62c-7770f5a2fe32_2172x724.png 424w, https://substackcdn.com/image/fetch/$s_!PodH!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1672d516-423a-4fc8-b62c-7770f5a2fe32_2172x724.png 848w, https://substackcdn.com/image/fetch/$s_!PodH!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1672d516-423a-4fc8-b62c-7770f5a2fe32_2172x724.png 1272w, https://substackcdn.com/image/fetch/$s_!PodH!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1672d516-423a-4fc8-b62c-7770f5a2fe32_2172x724.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!PodH!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1672d516-423a-4fc8-b62c-7770f5a2fe32_2172x724.png" width="2172" height="724" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/1672d516-423a-4fc8-b62c-7770f5a2fe32_2172x724.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:724,&quot;width&quot;:2172,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1303831,&quot;alt&quot;:&quot;Two replays of the same doubling operation read different input values and compute different outputs.&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Two replays of the same doubling operation read different input values and compute different outputs." title="Two replays of the same doubling operation read different input values and compute different outputs." srcset="https://substackcdn.com/image/fetch/$s_!PodH!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1672d516-423a-4fc8-b62c-7770f5a2fe32_2172x724.png 424w, https://substackcdn.com/image/fetch/$s_!PodH!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1672d516-423a-4fc8-b62c-7770f5a2fe32_2172x724.png 848w, https://substackcdn.com/image/fetch/$s_!PodH!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1672d516-423a-4fc8-b62c-7770f5a2fe32_2172x724.png 1272w, https://substackcdn.com/image/fetch/$s_!PodH!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1672d516-423a-4fc8-b62c-7770f5a2fe32_2172x724.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Replay reuses the operation description. It still computes from the values present when it runs.</figcaption></figure></div><p>A fixed execution plan does not require a fixed answer. An operation that doubles the numbers in an input buffer produces a different output after those numbers change, even though the operation and its input address are unchanged. Replacing the buffer itself is a different matter: the prepared operation may still point to the original storage.</p><p>LLM serving builds on that distinction. New tokens, positions, and cache locations can become updated data inside persistent buffers. Changes to the amount or arrangement of work may instead require another prepared graph, a smaller captured region, or ordinary execution.</p><p>We will follow that boundary from GPU launches to growing token histories, then examine when the cost of keeping several graph variants ready outweighs the launch savings.</p><p><strong>Table of contents</strong></p><ul><li><p>Where a decoding step spends time</p></li><li><p>Capture a plan, replay fresh work</p></li><li><p>Keep addresses stable while values change</p></li><li><p>Fit changing LLM state into a replay</p></li><li><p>Choose the right graph for the batch</p></li><li><p>Decide whether replay pays</p></li></ul>
      <p>
          <a href="https://newsletter.theaiedge.io/p/how-cuda-graphs-speed-up-llm-inference">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[How LLM Rerankers Order Retrieved Passages]]></title><description><![CDATA[Follow pointwise scores, pairwise preferences, and listwise windows from model judgment to useful context.]]></description><link>https://newsletter.theaiedge.io/p/how-llm-rerankers-order-retrieved-passages</link><guid isPermaLink="false">https://newsletter.theaiedge.io/p/how-llm-rerankers-order-retrieved-passages</guid><dc:creator><![CDATA[Damien Benveniste]]></dc:creator><pubDate>Mon, 26 Oct 2026 15:02:18 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/6379da09-c9af-433f-9edb-1a165dbfac69_1536x1024.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>A reranker takes a question and a shortlist of retrieved passages, reads them again, and changes their order before a large language model (LLM) receives its context. The first search finds candidates across a large collection. Reranking spends more computation deciding which of those candidates deserve the limited space in the answering model's prompt.</p><p>Cohere's release of <a href="https://cohere.com/blog/rerank-5">Rerank 5</a> for retrieval-based answers and agents makes this a concrete application choice: a pipeline can spend additional computation deciding which evidence reaches the answering model.</p><p>How does that extra computation produce a better order? The main distinction is <strong>what the model judges together</strong>:</p><ul><li><p><strong>Pointwise:</strong> read the question with one passage, produce a score, then sort the scores.</p></li><li><p><strong>Pairwise:</strong> read the question with two passages, choose the better one, then assemble those preferences into an order.</p></li><li><p><strong>Listwise:</strong> read the question with a group of passages and return their order, sometimes one overlapping group at a time.</p></li></ul><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!RtGM!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F58855a7e-3a3e-44b6-872c-69e173f27704_1774x887.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!RtGM!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F58855a7e-3a3e-44b6-872c-69e173f27704_1774x887.png 424w, https://substackcdn.com/image/fetch/$s_!RtGM!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F58855a7e-3a3e-44b6-872c-69e173f27704_1774x887.png 848w, https://substackcdn.com/image/fetch/$s_!RtGM!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F58855a7e-3a3e-44b6-872c-69e173f27704_1774x887.png 1272w, https://substackcdn.com/image/fetch/$s_!RtGM!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F58855a7e-3a3e-44b6-872c-69e173f27704_1774x887.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!RtGM!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F58855a7e-3a3e-44b6-872c-69e173f27704_1774x887.png" width="1774" height="887" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/58855a7e-3a3e-44b6-872c-69e173f27704_1774x887.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:887,&quot;width&quot;:1774,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1404632,&quot;alt&quot;:&quot;Three rows show independent scores followed by sorting, two-passage preferences followed by aggregation, and a group judgment returning an order.&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Three rows show independent scores followed by sorting, two-passage preferences followed by aggregation, and a group judgment returning an order." title="Three rows show independent scores followed by sorting, two-passage preferences followed by aggregation, and a group judgment returning an order." srcset="https://substackcdn.com/image/fetch/$s_!RtGM!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F58855a7e-3a3e-44b6-872c-69e173f27704_1774x887.png 424w, https://substackcdn.com/image/fetch/$s_!RtGM!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F58855a7e-3a3e-44b6-872c-69e173f27704_1774x887.png 848w, https://substackcdn.com/image/fetch/$s_!RtGM!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F58855a7e-3a3e-44b6-872c-69e173f27704_1774x887.png 1272w, https://substackcdn.com/image/fetch/$s_!RtGM!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F58855a7e-3a3e-44b6-872c-69e173f27704_1774x887.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">The unit of judgment determines what the application must do with the model output.</figcaption></figure></div><p>These methods buy different kinds of judgment. Independent scores can be computed in parallel. Comparisons let the model weigh competing evidence directly, but the application must decide how to reconcile those judgments. A listwise answer orders several candidates at once, at the cost of a longer input and a more demanding output.</p><p>The names describe the ranking procedure. The underlying model architecture and training objective are separate choices. We will separate those dimensions, follow the numbers and comparisons into an actual ordering, and see where the methods can work together.</p><p><strong>Contents</strong></p><ul><li><p>What a reranker changes</p></li><li><p>Pointwise: score each passage</p></li><li><p>Pairwise: compare two passages</p></li><li><p>Listwise: order a group</p></li><li><p>Choose the work your query needs</p></li></ul><p>There is one useful boundary to establish immediately. A reranker cannot promote a passage that never entered its shortlist. If the answer is present but buried, reordering may help. If the necessary evidence is absent, the pipeline needs another search or a different way to retrieve it. This distinction tells you where to investigate a bad answer before choosing a more expensive ranking model.</p>
      <p>
          <a href="https://newsletter.theaiedge.io/p/how-llm-rerankers-order-retrieved-passages">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[How Looped Transformers Reuse Their Weights]]></title><description><![CDATA[Follow changing attention states, shared gradients, and the real cost of extra passes.]]></description><link>https://newsletter.theaiedge.io/p/how-looped-transformers-reuse-their-weights</link><guid isPermaLink="false">https://newsletter.theaiedge.io/p/how-looped-transformers-reuse-their-weights</guid><dc:creator><![CDATA[Damien Benveniste]]></dc:creator><pubDate>Fri, 23 Oct 2026 15:02:21 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/ed5784d8-4c46-4733-b5f2-0287a96a14f6_1536x1024.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>A <strong>looped Transformer</strong> reuses a group of neural-network layers several times before predicting the next token. Each pass receives the hidden representations produced by the previous pass. Those representations are the model's working state: numerical vectors that change as it processes the input. The learned weights stay fixed during inference.</p><p>Open-weight models such as <a href="https://huggingface.co/tomg-group-umd/huginn-0125">Huginn</a> expose the number of recurrent passes as an inference setting, making model size and computation per token separate design choices.</p><p>How can applying the same weights again produce useful new work?</p><p>The answer is in what gets passed around the loop. Restart a deterministic computation from the same state and it returns the same result. Feed its result into the next pass and the computation can advance. A query can change after retrieving a fact, an intermediate result can become the input to another operation, or a partial representation can be refined.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!tjsy!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcb677bb5-d908-42e5-a653-d8db81430dd8_1774x887.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!tjsy!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcb677bb5-d908-42e5-a653-d8db81430dd8_1774x887.png 424w, https://substackcdn.com/image/fetch/$s_!tjsy!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcb677bb5-d908-42e5-a653-d8db81430dd8_1774x887.png 848w, https://substackcdn.com/image/fetch/$s_!tjsy!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcb677bb5-d908-42e5-a653-d8db81430dd8_1774x887.png 1272w, https://substackcdn.com/image/fetch/$s_!tjsy!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcb677bb5-d908-42e5-a653-d8db81430dd8_1774x887.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!tjsy!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcb677bb5-d908-42e5-a653-d8db81430dd8_1774x887.png" width="1774" height="887" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/cb677bb5-d908-42e5-a653-d8db81430dd8_1774x887.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:887,&quot;width&quot;:1774,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1396017,&quot;alt&quot;:&quot;Independent restarts return the same state, while feeding each result into the same transformation produces a sequence of changed states.&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Independent restarts return the same state, while feeding each result into the same transformation produces a sequence of changed states." title="Independent restarts return the same state, while feeding each result into the same transformation produces a sequence of changed states." srcset="https://substackcdn.com/image/fetch/$s_!tjsy!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcb677bb5-d908-42e5-a653-d8db81430dd8_1774x887.png 424w, https://substackcdn.com/image/fetch/$s_!tjsy!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcb677bb5-d908-42e5-a653-d8db81430dd8_1774x887.png 848w, https://substackcdn.com/image/fetch/$s_!tjsy!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcb677bb5-d908-42e5-a653-d8db81430dd8_1774x887.png 1272w, https://substackcdn.com/image/fetch/$s_!tjsy!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcb677bb5-d908-42e5-a653-d8db81430dd8_1774x887.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Weight reuse becomes recurrent computation when one pass's result becomes the next pass's input.</figcaption></figure></div><p>This gives us a useful first distinction. Suppose a core contains two layers, A and B, and we run it three times. The execution is A, B, A, B, A, B. We store two sets of layer weights but perform six layer applications. The copies in an unrolled drawing represent uses of the same parameters.</p><p>That can provide more computation without storing six independent transformations. It does not make the extra applications free, and it does not establish that the sixth application produces a better answer. The state must contain something useful for the next pass, training must encourage useful repeated transformations, and the model needs a sensible place to stop.</p><p>We will follow those dependencies from attention and changing hidden states through training, halting, and memory. Along the way, a small constructed attention block will make the intermediate operations visible. Its calculations illustrate what shared weights can do; they are not a claim about the internal variables of a trained language model.</p><p><strong>Table of contents</strong></p><ul><li><p>What repeats inside the model</p></li><li><p>Why another pass can change the answer</p></li><li><p>Training the shared computation</p></li><li><p>Deciding when to stop</p></li><li><p>What looping costs</p></li><li><p>Depth and reasoning tokens are different budgets</p></li></ul>
      <p>
          <a href="https://newsletter.theaiedge.io/p/how-looped-transformers-reuse-their-weights">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[How the KV Cache Shapes AI Agent Costs]]></title><description><![CDATA[Why shrinking the cache, reusing a prefix, and keeping it nearby save different resources.]]></description><link>https://newsletter.theaiedge.io/p/how-the-kv-cache-shapes-ai-agent-costs</link><guid isPermaLink="false">https://newsletter.theaiedge.io/p/how-the-kv-cache-shapes-ai-agent-costs</guid><dc:creator><![CDATA[Damien Benveniste]]></dc:creator><pubDate>Mon, 19 Oct 2026 15:03:35 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/a1a7d5bd-86b1-4ebc-9cd6-7949b12aa5de_1536x1024.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>An AI agent can spend most of a model call reading a history it has already processed. The <strong>KV cache</strong> preserves the keys and values that a causal Transformer computed for earlier tokens, at each attention layer. Later tokens can consult those saved states instead of running the historical tokens through the model again. The model's weights stay unchanged; this is reusable inference state.</p><p>DeepSeek explicitly connects cache-hit charges to a large share of its agent workloads' costs, making the storage and reuse of that state a product-cost concern as well as a serving optimization. <a href="https://www.deepseek.com/en/news/deepseek-v4-1-flash/">DeepSeek's release explanation</a></p><p>Consider the shape of the work. A short chat might contain 500 input tokens and produce 500 output tokens. A coding agent can accumulate system instructions, repository files, earlier decisions, dozens of tool calls, and long tool results. It may then read 200,000 tokens to produce just 200 more before calling another tool.</p><p>Must the next call rebuild everything the model already computed?</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!LXF6!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8eab90d7-f73e-4ca4-ae4f-b58206433695_1983x793.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!LXF6!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8eab90d7-f73e-4ca4-ae4f-b58206433695_1983x793.png 424w, https://substackcdn.com/image/fetch/$s_!LXF6!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8eab90d7-f73e-4ca4-ae4f-b58206433695_1983x793.png 848w, https://substackcdn.com/image/fetch/$s_!LXF6!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8eab90d7-f73e-4ca4-ae4f-b58206433695_1983x793.png 1272w, https://substackcdn.com/image/fetch/$s_!LXF6!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8eab90d7-f73e-4ca4-ae4f-b58206433695_1983x793.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!LXF6!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8eab90d7-f73e-4ca4-ae4f-b58206433695_1983x793.png" width="1983" height="793" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/8eab90d7-f73e-4ca4-ae4f-b58206433695_1983x793.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:793,&quot;width&quot;:1983,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1229089,&quot;alt&quot;:&quot;An agent reuses its processed history on the next turn, while new queries still consult that history.&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="An agent reuses its processed history on the next turn, while new queries still consult that history." title="An agent reuses its processed history on the next turn, while new queries still consult that history." srcset="https://substackcdn.com/image/fetch/$s_!LXF6!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8eab90d7-f73e-4ca4-ae4f-b58206433695_1983x793.png 424w, https://substackcdn.com/image/fetch/$s_!LXF6!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8eab90d7-f73e-4ca4-ae4f-b58206433695_1983x793.png 848w, https://substackcdn.com/image/fetch/$s_!LXF6!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8eab90d7-f73e-4ca4-ae4f-b58206433695_1983x793.png 1272w, https://substackcdn.com/image/fetch/$s_!LXF6!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8eab90d7-f73e-4ca4-ae4f-b58206433695_1983x793.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Keeping the earlier computation avoids rebuilding it; continuing the task still requires reading its result.</figcaption></figure></div><p>It need not. But preserving the work creates a second question: <strong>where is the saved state, and how much of it must move before the agent can continue?</strong></p><p>Three different savings sit behind that question. A smaller representation reduces the bytes needed for each remembered position. Prefix caching reuses computation from an earlier call. Keeping the reusable state near the executing GPU avoids restoring it across a slower connection. These savings interact, but they are not interchangeable.</p><p>Here is the useful starting distinction: <strong>a cache hit can eliminate the work of rebuilding an old token without eliminating the work of consulting it.</strong> A newly arrived tool result still needs to interact with the previous context. Every new generated token may consult that context again. A cheap input-cache hit therefore does not imply cheap generation from a long history.</p><p>We'll follow those saved states from attention through head sharing, latent compression, paging, persistent storage, and separate prefill and decode workers. Then we'll account for a 50-turn agent and use a separate timing example to decide when retaining, restoring, or rebuilding state pays off.</p><p><strong>Table of contents</strong></p><ul><li><p>The work a KV cache saves</p></li><li><p>When bytes limit decoding</p></li><li><p>Shrink the state per token</p></li><li><p>Reuse the prefix without copying it</p></li><li><p>Keep, move, or recompute</p></li><li><p>Account for a 50-turn agent</p></li><li><p>Choose a retention policy</p></li><li><p>Design models around the cache</p></li></ul>
      <p>
          <a href="https://newsletter.theaiedge.io/p/how-the-kv-cache-shapes-ai-agent-costs">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[How Hybrid LLMs Combine Memory, Attention, and Experts]]></title><description><![CDATA[Follow Mamba-2, Gated DeltaNet and KDA from state updates to the costs that active parameter counts miss.]]></description><link>https://newsletter.theaiedge.io/p/how-hybrid-llms-combine-memory-attention-and</link><guid isPermaLink="false">https://newsletter.theaiedge.io/p/how-hybrid-llms-combine-memory-attention-and</guid><dc:creator><![CDATA[Damien Benveniste]]></dc:creator><pubDate>Fri, 16 Oct 2026 15:00:46 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/507df679-3e9e-4b54-b364-dfb0ce3b7f34_1536x1024.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>A hybrid LLM processes a sequence with more than one kind of memory. Some layers update a compact running state as tokens arrive. Other layers retain representations of individual positions and consult them through attention. The model can also use a mixture of experts, selecting a few feedforward networks for each token instead of evaluating one large dense network everywhere.</p><p>Released architectures from Qwen, Moonshot AI and NVIDIA now combine these mechanisms, making the meaning of &#8220;model size&#8221; depend on both how history is stored and which parameters actually execute.</p><p>Why combine them? <strong>They separate three resources: memory of the sequence, access to individual positions, and capacity to transform a token.</strong> Improving one resource does not automatically improve the others.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!oO6d!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F55da9df9-60c6-4d7d-8f58-966a5545bb06_1774x887.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!oO6d!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F55da9df9-60c6-4d7d-8f58-966a5545bb06_1774x887.png 424w, https://substackcdn.com/image/fetch/$s_!oO6d!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F55da9df9-60c6-4d7d-8f58-966a5545bb06_1774x887.png 848w, https://substackcdn.com/image/fetch/$s_!oO6d!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F55da9df9-60c6-4d7d-8f58-966a5545bb06_1774x887.png 1272w, https://substackcdn.com/image/fetch/$s_!oO6d!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F55da9df9-60c6-4d7d-8f58-966a5545bb06_1774x887.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!oO6d!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F55da9df9-60c6-4d7d-8f58-966a5545bb06_1774x887.png" width="1774" height="887" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/55da9df9-60c6-4d7d-8f58-966a5545bb06_1774x887.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:887,&quot;width&quot;:1774,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1141050,&quot;alt&quot;:&quot;Attention retains separate position entries; recurrence folds successive inputs into a fixed-size current state.&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Attention retains separate position entries; recurrence folds successive inputs into a fixed-size current state." title="Attention retains separate position entries; recurrence folds successive inputs into a fixed-size current state." srcset="https://substackcdn.com/image/fetch/$s_!oO6d!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F55da9df9-60c6-4d7d-8f58-966a5545bb06_1774x887.png 424w, https://substackcdn.com/image/fetch/$s_!oO6d!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F55da9df9-60c6-4d7d-8f58-966a5545bb06_1774x887.png 848w, https://substackcdn.com/image/fetch/$s_!oO6d!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F55da9df9-60c6-4d7d-8f58-966a5545bb06_1774x887.png 1272w, https://substackcdn.com/image/fetch/$s_!oO6d!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F55da9df9-60c6-4d7d-8f58-966a5545bb06_1774x887.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">A hybrid combines access to individual positions with a compact state that is updated as the sequence advances.</figcaption></figure></div><p>The recurrent sequence mixers belong to a recognizable family, but their writes differ:</p><ul><li><p><strong>Mamba-2</strong> selectively fades a running state and adds new information.</p></li><li><p><strong>Gated DeltaNet</strong> also checks what its memory predicts, then writes a correction.</p></li><li><p><strong>Kimi Delta Attention</strong>, or <strong>KDA</strong>, adds finer control over which state coordinates fade.</p></li></ul><p>Retained attention gives these compact memories a complementary path through position-indexed history. Mixture of experts, or <strong>MoE</strong>, changes a different component: the feedforward computation applied to each token representation.</p><p>That distinction already lets you read a hybrid architecture more accurately. In Qwen3-Next, a hybrid language model with a 3:1 mixer design, three recurrent mixers are followed by an attention mixer along the model's depth. Every token runs through that configured sequence. The model does not wait three generated tokens before using attention, and it does not decide at runtime whether a particular token deserves an attention layer.</p><p>The expert router does make a per-token choice. Mixer placement is fixed; expert selection depends on the current representation. Calling both &#8220;conditional computation&#8221; without this qualification hides how the model actually runs.</p><p>We will follow those two design decisions from the original decoder block to the memory updates, then put them back together. The payoff is practical: given another hybrid model, you should be able to explain what grows with context, what remains fixed, and why its active parameter count cannot tell you its serving cost.</p><p><strong>Contents</strong></p><ul><li><p>Two jobs inside a Transformer</p></li><li><p>Mamba-2 keeps a running state</p></li><li><p>Delta memory corrects what it stores</p></li><li><p>Why hybrids retain attention</p></li><li><p>Sparse experts change the other half</p></li><li><p>When the combination is better</p></li></ul>
      <p>
          <a href="https://newsletter.theaiedge.io/p/how-hybrid-llms-combine-memory-attention-and">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[How Persistent Agents Keep Working]]></title><description><![CDATA[Reconstruct a coding task&#8217;s context, preserve accepted work, and recover safely when a worker disappears.]]></description><link>https://newsletter.theaiedge.io/p/how-persistent-agents-keep-working</link><guid isPermaLink="false">https://newsletter.theaiedge.io/p/how-persistent-agents-keep-working</guid><dc:creator><![CDATA[Damien Benveniste]]></dc:creator><pubDate>Mon, 12 Oct 2026 15:00:33 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/f1faa5ef-5f71-4170-a382-fdea7abc4b8d_1536x1024.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>A persistent agent keeps a task moving after the model's current context, the worker process, or the execution environment has ended. It does that by saving enough information outside those components to reconstruct the next valid step. Remembering a user's preferences helps future conversations; recovering a half-finished job requires a different set of guarantees.</p><p>OpenAI's managed Agents API now exposes durable sessions, context compaction, recovery, and separate execution environments, making the boundary between a saved conversation and a recoverable task a concrete platform decision. <a href="https://developers.openai.com/api/docs/guides/agents-api/overview">Agents API overview</a>.</p><p>What actually allows an agent to continue tomorrow?</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!_YZ1!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F50fcac19-6307-4a67-8546-841f77a211ee_1774x887.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!_YZ1!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F50fcac19-6307-4a67-8546-841f77a211ee_1774x887.png 424w, https://substackcdn.com/image/fetch/$s_!_YZ1!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F50fcac19-6307-4a67-8546-841f77a211ee_1774x887.png 848w, https://substackcdn.com/image/fetch/$s_!_YZ1!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F50fcac19-6307-4a67-8546-841f77a211ee_1774x887.png 1272w, https://substackcdn.com/image/fetch/$s_!_YZ1!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F50fcac19-6307-4a67-8546-841f77a211ee_1774x887.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!_YZ1!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F50fcac19-6307-4a67-8546-841f77a211ee_1774x887.png" width="1774" height="887" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/50fcac19-6307-4a67-8546-841f77a211ee_1774x887.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:887,&quot;width&quot;:1774,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1395540,&quot;alt&quot;:&quot;A worker disappears while task state, a saved artifact and an external receiver record remain available to a replacement.&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="A worker disappears while task state, a saved artifact and an external receiver record remain available to a replacement." title="A worker disappears while task state, a saved artifact and an external receiver record remain available to a replacement." srcset="https://substackcdn.com/image/fetch/$s_!_YZ1!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F50fcac19-6307-4a67-8546-841f77a211ee_1774x887.png 424w, https://substackcdn.com/image/fetch/$s_!_YZ1!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F50fcac19-6307-4a67-8546-841f77a211ee_1774x887.png 848w, https://substackcdn.com/image/fetch/$s_!_YZ1!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F50fcac19-6307-4a67-8546-841f77a211ee_1774x887.png 1272w, https://substackcdn.com/image/fetch/$s_!_YZ1!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F50fcac19-6307-4a67-8546-841f77a211ee_1774x887.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">A replacement needs evidence from several resources, not the old process stack.</figcaption></figure></div><p>The familiar agent loop is straightforward: receive a goal, ask the LLM for an action, execute a tool, return the observation, and repeat. A short demonstration can keep almost everything in one process. Stretch that task across several hours and the assumptions change. The agent may edit files, wait for approval, lose a network response, and outlive its container. Its next prompt cannot reconstruct facts that were never durably recorded.</p><p>The useful mental model is a distributed system with a probabilistic planner inside it. The model proposes what to do. The surrounding runtime records accepted decisions, preserves evidence, executes actions, and determines what can safely happen next.</p><p>One consequence is immediately useful: <strong>a missing result is different from a failed action</strong>. An external service may have completed the request before the worker disappeared. A saved task record saying &#8220;no result recorded&#8221; tells us about the worker's knowledge. It does not tell us whether the world changed. Recovering the job means closing that gap, not asking the model to guess.</p><p>We will separate the kinds of state, reconstruct a bounded context, and work through the commit boundaries. Then we will build a local runtime, continue a code repair in a fresh context, and terminate a process between an external effect and its saved acknowledgement.</p><p><strong>Table of contents</strong></p><ul><li><p>Separate the state that must survive</p></li><li><p>Rebuild context from durable evidence</p></li><li><p>Recover execution across a crash</p></li><li><p>Resume workspaces, approvals, and delegated work</p></li><li><p>Connect the complete runtime</p></li><li><p>Build the durable runtime</p></li><li><p>Continue a coding task across context windows</p></li><li><p>Break it and compare recovery strategies</p></li></ul>
      <p>
          <a href="https://newsletter.theaiedge.io/p/how-persistent-agents-keep-working">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[How Self-Improving Agents Learn from Experience]]></title><description><![CDATA[How executable tasks and adaptive curricula turn production failures into useful practice.]]></description><link>https://newsletter.theaiedge.io/p/how-self-improving-agents-learn-from-experience</link><guid isPermaLink="false">https://newsletter.theaiedge.io/p/how-self-improving-agents-learn-from-experience</guid><dc:creator><![CDATA[Damien Benveniste]]></dc:creator><pubDate>Fri, 09 Oct 2026 15:03:57 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/a55da6d7-048b-4060-829a-929bd75b2a5a_1536x1024.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>A <strong>self-improving agent</strong> uses evidence from earlier tasks to change something retained for later tasks, then demonstrates better behavior on new runs. The change might be a prompt, a tool, a reusable procedure, or the model&#8217;s weights. Criticizing an answer and trying again can help finish today&#8217;s task. Persistent improvement changes what happens when tomorrow&#8217;s task begins.</p><p>OpenAI&#8217;s Tax AI deployment turns practitioner corrections into evaluated product changes, making the quality of this feedback loop a concrete engineering problem.</p><p>The interesting question is how to turn those failures into useful practice, then retain what helps on future tasks.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Xzf4!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F72b1e68f-79a9-4ee8-ab8a-b3171f3082c9_1774x887.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Xzf4!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F72b1e68f-79a9-4ee8-ab8a-b3171f3082c9_1774x887.png 424w, https://substackcdn.com/image/fetch/$s_!Xzf4!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F72b1e68f-79a9-4ee8-ab8a-b3171f3082c9_1774x887.png 848w, https://substackcdn.com/image/fetch/$s_!Xzf4!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F72b1e68f-79a9-4ee8-ab8a-b3171f3082c9_1774x887.png 1272w, https://substackcdn.com/image/fetch/$s_!Xzf4!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F72b1e68f-79a9-4ee8-ab8a-b3171f3082c9_1774x887.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Xzf4!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F72b1e68f-79a9-4ee8-ab8a-b3171f3082c9_1774x887.png" width="1774" height="887" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/72b1e68f-79a9-4ee8-ab8a-b3171f3082c9_1774x887.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:887,&quot;width&quot;:1774,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1217323,&quot;alt&quot;:&quot;A retry loops inside one task, while a checked version change is loaded by a later task.&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="A retry loops inside one task, while a checked version change is loaded by a later task." title="A retry loops inside one task, while a checked version change is loaded by a later task." srcset="https://substackcdn.com/image/fetch/$s_!Xzf4!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F72b1e68f-79a9-4ee8-ab8a-b3171f3082c9_1774x887.png 424w, https://substackcdn.com/image/fetch/$s_!Xzf4!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F72b1e68f-79a9-4ee8-ab8a-b3171f3082c9_1774x887.png 848w, https://substackcdn.com/image/fetch/$s_!Xzf4!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F72b1e68f-79a9-4ee8-ab8a-b3171f3082c9_1774x887.png 1272w, https://substackcdn.com/image/fetch/$s_!Xzf4!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F72b1e68f-79a9-4ee8-ab8a-b3171f3082c9_1774x887.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Persistence requires a retained artifact and a later execution that uses it.</figcaption></figure></div><p>The answer has two paths. One repairs the <strong>agent system</strong>: its code, instructions, tools, retrieval, or stored skills. The other improves the <strong>model</strong> using selected demonstrations or rewards from fresh attempts. Both need a way to decide whether a proposed change actually helps.</p><p>That is where <strong>environments</strong> become important. An environment supplies a task, a starting state, tools that change that state, and a way to evaluate the consequences. It can produce new experience when the agent tries a different action. A saved conversation contains only the experience that already happened.</p><p>This distinction changes what we should scale. More failure logs can reveal recurring defects. More executable environments can let an agent practice different decisions. Neither produces improvement until an update is made and tested on future behavior.</p><p>A useful first check is to ask what survives the run. A reflection left in a discarded conversation changes nothing for the next user. A saved skill changes future behavior only if another run retrieves and executes it. A newly trained checkpoint changes nothing until the application serves it. Persistence needs an actual connection to the next execution.</p><p>We will follow that connection through traces, three ways to construct executable environments, training, curriculum, and deployment.</p><p><strong>Contents</strong></p><ul><li><p>What persists after a run</p></li><li><p>Turn traces into testable failures</p></li><li><p>An environment produces new experience</p></li><li><p>How executable environments are built</p></li><li><p>Check what the environment rewards</p></li><li><p>Convert experience into an agent update</p></li><li><p>Build a curriculum from agent outcomes</p></li><li><p>Promote improvements on independent evidence</p></li></ul>
      <p>
          <a href="https://newsletter.theaiedge.io/p/how-self-improving-agents-learn-from-experience">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[How DeepSeek V4.1 Flash Separates Reading and Generation]]></title><description><![CDATA[How a shorter input path, shared attention memory, and selective reconstruction change the cost of long conversations.]]></description><link>https://newsletter.theaiedge.io/p/how-deepseek-v4-1-flash-separates-reading-and</link><guid isPermaLink="false">https://newsletter.theaiedge.io/p/how-deepseek-v4-1-flash-separates-reading-and</guid><dc:creator><![CDATA[Damien Benveniste]]></dc:creator><pubDate>Wed, 07 Oct 2026 15:00:38 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/347ca444-69c1-4f29-bd01-de4963a09be4_1536x1024.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>DeepSeek V4.1 Flash generates text one <strong>token</strong> at a time. A token is a piece of text, often a word or part of one. To choose what comes next, the model transforms the text already available through successive processing stages called <strong>layers</strong>. Its unusual feature is that most supplied text can take a shorter path through those stages than a token being used to generate the next one.</p><p>DeepSeek's <a href="https://arxiv.org/html/2609.19969">technical report</a> motivates this design with agents that repeatedly receive long tool results and accumulated history, making the cost of reading and retaining that information a major part of running the model. Why should preparing old text for later use require the same computation as deciding what to write next?</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!s7qx!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9c40d6fa-0499-46aa-ac38-866b0f52b443_1774x887.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!s7qx!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9c40d6fa-0499-46aa-ac38-866b0f52b443_1774x887.png 424w, https://substackcdn.com/image/fetch/$s_!s7qx!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9c40d6fa-0499-46aa-ac38-866b0f52b443_1774x887.png 848w, https://substackcdn.com/image/fetch/$s_!s7qx!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9c40d6fa-0499-46aa-ac38-866b0f52b443_1774x887.png 1272w, https://substackcdn.com/image/fetch/$s_!s7qx!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9c40d6fa-0499-46aa-ac38-866b0f52b443_1774x887.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!s7qx!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9c40d6fa-0499-46aa-ac38-866b0f52b443_1774x887.png" width="1774" height="887" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/9c40d6fa-0499-46aa-ac38-866b0f52b443_1774x887.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:887,&quot;width&quot;:1774,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1060771,&quot;alt&quot;:&quot;Most supplied positions pass through the first 20 layers to prepare memory. The final 128 also prepare recent context in the next 20 layers. Each chosen answer token uses both halves and earlier memory to predict the following token.&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Most supplied positions pass through the first 20 layers to prepare memory. The final 128 also prepare recent context in the next 20 layers. Each chosen answer token uses both halves and earlier memory to predict the following token." title="Most supplied positions pass through the first 20 layers to prepare memory. The final 128 also prepare recent context in the next 20 layers. Each chosen answer token uses both halves and earlier memory to predict the following token." srcset="https://substackcdn.com/image/fetch/$s_!s7qx!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9c40d6fa-0499-46aa-ac38-866b0f52b443_1774x887.png 424w, https://substackcdn.com/image/fetch/$s_!s7qx!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9c40d6fa-0499-46aa-ac38-866b0f52b443_1774x887.png 848w, https://substackcdn.com/image/fetch/$s_!s7qx!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9c40d6fa-0499-46aa-ac38-866b0f52b443_1774x887.png 1272w, https://substackcdn.com/image/fetch/$s_!s7qx!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9c40d6fa-0499-46aa-ac38-866b0f52b443_1774x887.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">The shorter route prepares memory for later use. Recent input still enters the upper half before generation, and each chosen answer token uses both halves.</figcaption></figure></div><p>The design divides 40 layers into two halves. The first 20 prepare reusable memory of the input. Most input positions can stop there; a final slice of up to 128 positions also passes through the upper half to prepare its recent context. Once generation begins, each newly chosen token goes through both halves to predict the following token. The architecture is called a <strong>causal encoder-decoder</strong>, or <strong>CED</strong>. We will unpack those roles, then trace how sharing memory, selecting what to read, storing fewer bits, and rebuilding recent state change different costs.</p><p>The useful distinction is already visible: preparing a record of earlier text and using that record to choose a new token need not follow identical paths. The shorter input route matters most when there is much more new text to read than text to generate.</p><p><strong>Table of contents</strong></p><ul><li><p>Why one causal stack reads and writes</p></li><li><p>Why agent workloads change the budget</p></li><li><p>Prefill, decode, and the cache between them</p></li><li><p>How CED changes the old-token dependency</p></li><li><p>Why generated tokens still use the full model</p></li><li><p>Why this is a different encoder-decoder</p></li><li><p>How CSA2 shares global history</p></li><li><p>Why sparse search needs a hierarchy</p></li><li><p>How the cache bytes add up</p></li><li><p>What bounded replay rebuilds</p></li><li><p>Putting the architecture together</p></li><li><p>What the quality evidence establishes</p></li><li><p>What this means for agent architectures</p></li></ul>
      <p>
          <a href="https://newsletter.theaiedge.io/p/how-deepseek-v4-1-flash-separates-reading-and">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[Build a Jev-Supervised AI Agent]]></title><description><![CDATA[Typed decisions, guarded tools, and a measured comparison with LLM supervisors]]></description><link>https://newsletter.theaiedge.io/p/build-a-jev-supervised-ai-agent-218605208</link><guid isPermaLink="false">https://newsletter.theaiedge.io/p/build-a-jev-supervised-ai-agent-218605208</guid><dc:creator><![CDATA[Damien Benveniste]]></dc:creator><pubDate>Sat, 03 Oct 2026 15:02:23 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/73d933ba-a75a-4f7f-80be-67272008fb19_1536x1024.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>An AI agent does more than write its final answer. It chooses a tool, reads the result, decides whether to continue, and sometimes has to admit that an action's outcome is unknown. TypeSafe released Jev in September 2026 as a model for typed decisions inside software, which makes those small transitions a practical design choice.</p><p>Here is the agent we will build: a generative model plans and writes; Jev chooses among named next actions using the current state; Python checks hard rules, executes a local tool, and records what actually happened. The central question is where a fast decision belongs when the task still needs open-ended reasoning and real effects. The short answer is <strong>between observations and permitted transitions</strong>. Jev can judge the state, but its choice cannot itself refund an account or prove that a refund settled.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!-VLK!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F095f2c53-358d-477c-8b8d-3924a52be8a6_1942x809.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!-VLK!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F095f2c53-358d-477c-8b8d-3924a52be8a6_1942x809.png 424w, https://substackcdn.com/image/fetch/$s_!-VLK!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F095f2c53-358d-477c-8b8d-3924a52be8a6_1942x809.png 848w, https://substackcdn.com/image/fetch/$s_!-VLK!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F095f2c53-358d-477c-8b8d-3924a52be8a6_1942x809.png 1272w, https://substackcdn.com/image/fetch/$s_!-VLK!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F095f2c53-358d-477c-8b8d-3924a52be8a6_1942x809.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!-VLK!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F095f2c53-358d-477c-8b8d-3924a52be8a6_1942x809.png" width="1942" height="809" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/095f2c53-358d-477c-8b8d-3924a52be8a6_1942x809.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:809,&quot;width&quot;:1942,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1279431,&quot;alt&quot;:&quot;Agent loop in which an LLM plans, Jev proposes a next action, code guards and executes a tool, observations update state, and an LLM writes the answer.&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Agent loop in which an LLM plans, Jev proposes a next action, code guards and executes a tool, observations update state, and an LLM writes the answer." title="Agent loop in which an LLM plans, Jev proposes a next action, code guards and executes a tool, observations update state, and an LLM writes the answer." srcset="https://substackcdn.com/image/fetch/$s_!-VLK!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F095f2c53-358d-477c-8b8d-3924a52be8a6_1942x809.png 424w, https://substackcdn.com/image/fetch/$s_!-VLK!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F095f2c53-358d-477c-8b8d-3924a52be8a6_1942x809.png 848w, https://substackcdn.com/image/fetch/$s_!-VLK!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F095f2c53-358d-477c-8b8d-3924a52be8a6_1942x809.png 1272w, https://substackcdn.com/image/fetch/$s_!-VLK!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F095f2c53-358d-477c-8b8d-3924a52be8a6_1942x809.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Jev sits inside the state transition loop; the executor and observation record determine what actually changed.</figcaption></figure></div><p>We will make one Jev call first, then connect it to a small support agent. Then we will compare Jev with two structured-output LLMs using our experiments on support and document-research tasks. The experiment is useful because it records both proposed actions and actual local effects.</p><p><strong>In this guide</strong></p><ul><li><p>What Jev decides</p></li><li><p>Give the agent observable state</p></li><li><p>Build the guarded loop</p></li><li><p>Run support and research tasks</p></li><li><p>Compare three supervisors</p></li><li><p>Read probabilities and disagreements</p></li><li><p>Decide where Jev belongs</p></li></ul><p>One distinction will keep the rest of the build honest. A tool returning HTTP 202 says a request was accepted for processing. It does not say the requested business outcome happened. That gap is exactly where a supervisor needs evidence, and where code must resist an unsafe retry.</p>
      <p>
          <a href="https://newsletter.theaiedge.io/p/build-a-jev-supervised-ai-agent-218605208">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[How Jev Turns Questions Into Decisions]]></title><description><![CDATA[Inside the state, typed-output, probability, and application-policy contracts of a decision model]]></description><link>https://newsletter.theaiedge.io/p/how-jev-turns-questions-into-decisions</link><guid isPermaLink="false">https://newsletter.theaiedge.io/p/how-jev-turns-questions-into-decisions</guid><dc:creator><![CDATA[Damien Benveniste]]></dc:creator><pubDate>Wed, 30 Sep 2026 15:02:22 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/f25bb621-bfb9-43ff-afd5-ab71ff0ac615_1536x1024.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Jev is a decision model whose interface asks bounded questions about a supplied state and returns probabilities over the allowed answers. A support system might ask which queue should receive a ticket, whether a tool result actually resolved it, and how urgent it is. The application, rather than the model, decides what to do with those answers. In September 2026, TypeSafe introduced Jev for this kind of typed decision request, making an old systems question concrete: when the useful output is a small distribution, why generate a sentence to carry it?</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!kHLg!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faccfeb76-a169-4b6d-847a-ee9507fa373a_1912x823.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!kHLg!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faccfeb76-a169-4b6d-847a-ee9507fa373a_1912x823.png 424w, https://substackcdn.com/image/fetch/$s_!kHLg!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faccfeb76-a169-4b6d-847a-ee9507fa373a_1912x823.png 848w, https://substackcdn.com/image/fetch/$s_!kHLg!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faccfeb76-a169-4b6d-847a-ee9507fa373a_1912x823.png 1272w, https://substackcdn.com/image/fetch/$s_!kHLg!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faccfeb76-a169-4b6d-847a-ee9507fa373a_1912x823.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!kHLg!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faccfeb76-a169-4b6d-847a-ee9507fa373a_1912x823.png" width="1912" height="823" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/accfeb76-a169-4b6d-847a-ee9507fa373a_1912x823.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:823,&quot;width&quot;:1912,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1221157,&quot;alt&quot;:&quot;One state feeds several typed questions, each returning a bounded probability distribution; code uses the answers to choose actions.&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="One state feeds several typed questions, each returning a bounded probability distribution; code uses the answers to choose actions." title="One state feeds several typed questions, each returning a bounded probability distribution; code uses the answers to choose actions." srcset="https://substackcdn.com/image/fetch/$s_!kHLg!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faccfeb76-a169-4b6d-847a-ee9507fa373a_1912x823.png 424w, https://substackcdn.com/image/fetch/$s_!kHLg!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faccfeb76-a169-4b6d-847a-ee9507fa373a_1912x823.png 848w, https://substackcdn.com/image/fetch/$s_!kHLg!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faccfeb76-a169-4b6d-847a-ee9507fa373a_1912x823.png 1272w, https://substackcdn.com/image/fetch/$s_!kHLg!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faccfeb76-a169-4b6d-847a-ee9507fa373a_1912x823.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">The external contract: state and typed questions produce distributions; the application retains control.</figcaption></figure></div><p>The short answer is that Jev moves the boundary. A conventional language model can certainly emit <code>{"route":"billing"}</code>; strict structured output can make that object parse. Jev instead accepts the answer space as part of the question and returns the chosen answer <em>and its distribution</em> as the native result. Several questions can refer to one supplied state. That makes semantic judgments easier to place inside software, but it does not make their probabilities self-validating or authorize any action.</p><p>This is a model category worth understanding even if a particular workload ends up using rules, a fine-tuned classifier, or a constrained LLM. We will follow the interfaces first, then the computation they may avoid, the architecture that is and is not disclosed, and finally the policy that turns a judgment into a safe system decision.</p><p><strong>In this deep dive</strong></p><ol><li><p>What Jev receives and returns</p></li><li><p>Why a separate decision model might help</p></li><li><p>What can be inferred about Jev's architecture</p></li><li><p>Calibration, RLCD, and action thresholds</p></li><li><p>Where Jev fits among existing tools</p></li><li><p>A system with generation and decision separated</p></li></ol><p>One useful rule already follows from the interface: a model's answer should be treated as evidence about a defined outcome, while the application's code retains the choice of action. The rest of the article explains exactly what must be defined, computed, and checked before that rule is useful.</p>
      <p>
          <a href="https://newsletter.theaiedge.io/p/how-jev-turns-questions-into-decisions">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[The Complete Guide to Evaluation Pipelines for AI Agents]]></title><description><![CDATA[From production traces and isolated trials to evidence you can use for release decisions]]></description><link>https://newsletter.theaiedge.io/p/how-to-build-an-evaluation-pipeline-fo-217656816</link><guid isPermaLink="false">https://newsletter.theaiedge.io/p/how-to-build-an-evaluation-pipeline-fo-217656816</guid><dc:creator><![CDATA[Damien Benveniste]]></dc:creator><pubDate>Mon, 28 Sep 2026 15:04:25 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/efc7964b-db00-4133-9ab7-0231adb5b628_1536x1024.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>An agent can say that a refund is complete while the customer's account shows no refund. For an agent that can use tools, a convincing reply is only one piece of evidence. A production evaluation has to check the actions the agent took and the world those actions left behind.</p><p>Teams are already using production conversations and human labels to build agent evaluations, as <a href="https://dropbox.tech/machine-learning/how-we-turned-ai-evaluations-into-better-responses-in-dash-chat">Dropbox's engineering account</a> illustrates; the durable problem is deciding whether an agent actually completed an authorized task. How do we turn that question into a pipeline that can test a new agent version before release and keep learning afterward?</p><p>The compact answer is a loop: <strong>observed request &#8594; reviewed case &#8594; isolated trial &#8594; trace and final state &#8594; graders &#8594; version comparison &#8594; release decision &#8594; production feedback</strong>. A case describes the starting world and acceptable outcomes. A trial runs one agent attempt against that world. Graders inspect independent evidence, and the comparison asks whether the new version improves the tasks that matter without breaking important slices. The loop is reusable; the meaning of success changes with the agent's job.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!hJJ7!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffb912402-de63-4ce2-9f13-113df6ae0158_1536x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!hJJ7!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffb912402-de63-4ce2-9f13-113df6ae0158_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!hJJ7!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffb912402-de63-4ce2-9f13-113df6ae0158_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!hJJ7!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffb912402-de63-4ce2-9f13-113df6ae0158_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!hJJ7!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffb912402-de63-4ce2-9f13-113df6ae0158_1536x1024.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!hJJ7!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffb912402-de63-4ce2-9f13-113df6ae0158_1536x1024.png" width="1536" height="1024" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/fb912402-de63-4ce2-9f13-113df6ae0158_1536x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1024,&quot;width&quot;:1536,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1464243,&quot;alt&quot;:&quot;Agent claims a refund is complete, while the tool only accepted the request and the ledger has no refund.&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Agent claims a refund is complete, while the tool only accepted the request and the ledger has no refund." title="Agent claims a refund is complete, while the tool only accepted the request and the ledger has no refund." srcset="https://substackcdn.com/image/fetch/$s_!hJJ7!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffb912402-de63-4ce2-9f13-113df6ae0158_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!hJJ7!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffb912402-de63-4ce2-9f13-113df6ae0158_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!hJJ7!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffb912402-de63-4ce2-9f13-113df6ae0158_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!hJJ7!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffb912402-de63-4ce2-9f13-113df6ae0158_1536x1024.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">An answer, a tool acknowledgment and a committed state are different evidence.</figcaption></figure></div><p>The first useful rule is to give a completed action its own proof. If a support agent says &#8220;refunded,&#8221; a ledger record or service commit is the proof, subject to the service's consistency contract. If the record is absent, the polished sentence cannot rescue the task. That single separation prevents an answer-only judge from turning a failed action into a pass.</p><p>The second rule is to test the task from a known starting point. The same request can require a refund when the customer verifies identity, a clarifying question when they cannot, or a refusal when policy forbids it. An evaluation case must carry those starting facts and accepted branches. Otherwise a grader may punish a careful agent for asking or reward a reckless one for acting.</p><p>Before trusting a score, ask what its grader can observe. If it sees only messages, the score measures answer quality. If it sees tool calls but no final state, it can verify attempted actions without proving durable effects. Reserve &#8220;task success&#8221; for a test whose evidence covers the task's actual outcome. This distinction is useful even before the full pipeline exists.</p><p><strong>Table of contents</strong></p><ol><li><p><a href="#define-what-success-must-prove">Define what success must prove</a></p></li><li><p><a href="#turn-production-evidence-into-cases">Turn production evidence into cases</a></p></li><li><p><a href="#run-isolated-observable-trials">Run isolated, observable trials</a></p></li><li><p><a href="#grade-the-evidence">Grade the evidence</a></p></li><li><p><a href="#compare-agent-versions-fairly">Compare agent versions fairly</a></p></li><li><p><a href="#operate-the-pipeline-and-close-the-loop">Operate the pipeline and close the loop</a></p></li></ol>
      <p>
          <a href="https://newsletter.theaiedge.io/p/how-to-build-an-evaluation-pipeline-fo-217656816">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[How AI Agent Memory Updates a Changed Preference]]></title><description><![CDATA[Follow one correction from a user message to the active fact a future task retrieves.]]></description><link>https://newsletter.theaiedge.io/p/how-ai-agent-memory-updates-a-changed-preference</link><guid isPermaLink="false">https://newsletter.theaiedge.io/p/how-ai-agent-memory-updates-a-changed-preference</guid><dc:creator><![CDATA[Damien Benveniste]]></dc:creator><pubDate>Fri, 25 Sep 2026 15:04:28 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/66908f83-ab4a-4bd8-b3a3-f60d09768c5c_1536x1024.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>An AI coding assistant can remember that you use Python for deployment scripts and still get the next deployment wrong after you switch to Go. The problem is not that it forgot everything. It may remember <strong>both</strong> instructions and have no reliable way to tell which one is current.</p><p>Persistent agent memory tools now let applications carry stored information across sessions and update it, making the quality of that update consequential for later tasks. The question is: when a user changes a standing preference, what must happen so an agent acts on the new one? A useful memory system treats the new message as a proposed change to stored state. It identifies the fact, finds the existing fact about the same thing, reconciles the two, commits the active version, and retrieves that version when the next task needs it.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!lKkE!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1c4eadc1-4906-4596-b74f-9407734b1e42_1536x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!lKkE!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1c4eadc1-4906-4596-b74f-9407734b1e42_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!lKkE!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1c4eadc1-4906-4596-b74f-9407734b1e42_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!lKkE!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1c4eadc1-4906-4596-b74f-9407734b1e42_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!lKkE!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1c4eadc1-4906-4596-b74f-9407734b1e42_1536x1024.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!lKkE!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1c4eadc1-4906-4596-b74f-9407734b1e42_1536x1024.png" width="1536" height="1024" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/1c4eadc1-4906-4596-b74f-9407734b1e42_1536x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1024,&quot;width&quot;:1536,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1359304,&quot;alt&quot;:&quot;Two conflicting remembered script-language preferences converge on one later task.&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Two conflicting remembered script-language preferences converge on one later task." title="Two conflicting remembered script-language preferences converge on one later task." srcset="https://substackcdn.com/image/fetch/$s_!lKkE!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1c4eadc1-4906-4596-b74f-9407734b1e42_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!lKkE!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1c4eadc1-4906-4596-b74f-9407734b1e42_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!lKkE!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1c4eadc1-4906-4596-b74f-9407734b1e42_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!lKkE!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1c4eadc1-4906-4596-b74f-9407734b1e42_1536x1024.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">The future request needs one current preference, but a transcript can offer two.</figcaption></figure></div><p>That differs from appending messages to a transcript. We can see why by following one preference from its first instruction through a correction and a later task. The same failure can affect a project decision or customer preference.</p><h2>What changes when an agent has memory?</h2><p>The model receives a limited working context with each request. A conversation transcript can be placed in that context, but it grows, contains incidental remarks, and may contain claims that no longer hold. <strong>Persistent memory</strong> here means an external store that keeps selected information beyond one request or session. A write operation changes that store; a later read returns a useful part of it to the model. The model's weights are not being retrained every time a preference changes.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!fH45!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4a72a9ec-af95-4d21-b1d7-eb77479a4853_1536x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!fH45!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4a72a9ec-af95-4d21-b1d7-eb77479a4853_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!fH45!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4a72a9ec-af95-4d21-b1d7-eb77479a4853_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!fH45!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4a72a9ec-af95-4d21-b1d7-eb77479a4853_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!fH45!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4a72a9ec-af95-4d21-b1d7-eb77479a4853_1536x1024.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!fH45!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4a72a9ec-af95-4d21-b1d7-eb77479a4853_1536x1024.png" width="1536" height="1024" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/4a72a9ec-af95-4d21-b1d7-eb77479a4853_1536x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1024,&quot;width&quot;:1536,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1292665,&quot;alt&quot;:&quot;A fact is written outside the model and read into a later session.&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="A fact is written outside the model and read into a later session." title="A fact is written outside the model and read into a later session." srcset="https://substackcdn.com/image/fetch/$s_!fH45!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4a72a9ec-af95-4d21-b1d7-eb77479a4853_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!fH45!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4a72a9ec-af95-4d21-b1d7-eb77479a4853_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!fH45!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4a72a9ec-af95-4d21-b1d7-eb77479a4853_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!fH45!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4a72a9ec-af95-4d21-b1d7-eb77479a4853_1536x1024.png 1456w" sizes="100vw"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Persistent memory changes external state, then supplies selected context later.</figcaption></figure></div><p>Suppose a user tells a coding assistant, &#8220;For the Atlas repository, write deployment scripts in Python.&#8221; The assistant might store a compact record with four parts: the user, the Atlas repository, the subject <em>deployment-script language</em>, and the current value <em>Python</em>. The message that supplied the preference is its source. This is more useful than an unqualified memory such as &#8220;prefers Python,&#8221; because the latter could affect unrelated work.</p><p>The store has two distinct paths. On the <strong>write path</strong>, a message or tool result is examined for information worth retaining, then compared with what is already stored. On the <strong>read path</strong>, the next task retrieves applicable memory and places it where the model can use it. If the write path is wrong, fast retrieval brings back a mistake. If the read path misses the right record, a perfect update sits unused.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!YZUN!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F615048b0-ae1b-4698-a677-4d0d2de23091_1774x887.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!YZUN!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F615048b0-ae1b-4698-a677-4d0d2de23091_1774x887.png 424w, https://substackcdn.com/image/fetch/$s_!YZUN!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F615048b0-ae1b-4698-a677-4d0d2de23091_1774x887.png 848w, https://substackcdn.com/image/fetch/$s_!YZUN!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F615048b0-ae1b-4698-a677-4d0d2de23091_1774x887.png 1272w, https://substackcdn.com/image/fetch/$s_!YZUN!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F615048b0-ae1b-4698-a677-4d0d2de23091_1774x887.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!YZUN!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F615048b0-ae1b-4698-a677-4d0d2de23091_1774x887.png" width="1774" height="887" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/615048b0-ae1b-4698-a677-4d0d2de23091_1774x887.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:887,&quot;width&quot;:1774,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1159703,&quot;alt&quot;:&quot;A write path maintains stored facts; a read path returns applicable facts to the model.&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="A write path maintains stored facts; a read path returns applicable facts to the model." title="A write path maintains stored facts; a read path returns applicable facts to the model." srcset="https://substackcdn.com/image/fetch/$s_!YZUN!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F615048b0-ae1b-4698-a677-4d0d2de23091_1774x887.png 424w, https://substackcdn.com/image/fetch/$s_!YZUN!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F615048b0-ae1b-4698-a677-4d0d2de23091_1774x887.png 848w, https://substackcdn.com/image/fetch/$s_!YZUN!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F615048b0-ae1b-4698-a677-4d0d2de23091_1774x887.png 1272w, https://substackcdn.com/image/fetch/$s_!YZUN!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F615048b0-ae1b-4698-a677-4d0d2de23091_1774x887.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">A good write is useful only when the later read selects it.</figcaption></figure></div><p>Now the user says, &#8220;For Atlas, use Go for deployment scripts from now on.&#8221; Adding that sentence as a second, equally active memory would leave the future assistant to arbitrate a contradiction each time. A better result is an active Atlas deployment-language preference of <em>Go</em>, with the former Python preference no longer active. The old statement may remain in an audit history, but it should not be presented as another current instruction.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!n67r!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc56e100f-5ee5-4498-ad99-da38b8fde01b_1774x887.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!n67r!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc56e100f-5ee5-4498-ad99-da38b8fde01b_1774x887.png 424w, https://substackcdn.com/image/fetch/$s_!n67r!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc56e100f-5ee5-4498-ad99-da38b8fde01b_1774x887.png 848w, https://substackcdn.com/image/fetch/$s_!n67r!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc56e100f-5ee5-4498-ad99-da38b8fde01b_1774x887.png 1272w, https://substackcdn.com/image/fetch/$s_!n67r!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc56e100f-5ee5-4498-ad99-da38b8fde01b_1774x887.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!n67r!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc56e100f-5ee5-4498-ad99-da38b8fde01b_1774x887.png" width="1774" height="887" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c56e100f-5ee5-4498-ad99-da38b8fde01b_1774x887.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:887,&quot;width&quot;:1774,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1054108,&quot;alt&quot;:&quot;Appending leaves two candidate instructions; updating leaves one active value.&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Appending leaves two candidate instructions; updating leaves one active value." title="Appending leaves two candidate instructions; updating leaves one active value." srcset="https://substackcdn.com/image/fetch/$s_!n67r!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc56e100f-5ee5-4498-ad99-da38b8fde01b_1774x887.png 424w, https://substackcdn.com/image/fetch/$s_!n67r!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc56e100f-5ee5-4498-ad99-da38b8fde01b_1774x887.png 848w, https://substackcdn.com/image/fetch/$s_!n67r!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc56e100f-5ee5-4498-ad99-da38b8fde01b_1774x887.png 1272w, https://substackcdn.com/image/fetch/$s_!n67r!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc56e100f-5ee5-4498-ad99-da38b8fde01b_1774x887.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">A correction must change what the next read sees.</figcaption></figure></div><p><strong>Remembering a correction means changing the state that future reads see</strong>, not merely remembering that a correction was said. The change has to preserve the subject and scope of the fact, or it will solve one task by creating a wider error.</p><div id="youtube2-5HgG6_K4DYo" class="youtube-wrap" data-attrs="{&quot;videoId&quot;:&quot;5HgG6_K4DYo&quot;,&quot;startTime&quot;:null,&quot;endTime&quot;:null}" data-component-name="Youtube2ToDOM"><div class="youtube-inner"><iframe src="https://www.youtube-nocookie.com/embed/5HgG6_K4DYo?rel=0&amp;autoplay=0&amp;showinfo=0&amp;enablejsapi=0" frameborder="0" loading="lazy" gesture="media" allow="autoplay; fullscreen" allowautoplay="true" allowfullscreen="true" width="728" height="409"></iframe></div></div>
      <p>
          <a href="https://newsletter.theaiedge.io/p/how-ai-agent-memory-updates-a-changed-preference">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[How LLM Routers Balance Cache Reuse and Queue Time]]></title><description><![CDATA[Four routing strategies, one repeated prompt, and the point where a cold replica wins]]></description><link>https://newsletter.theaiedge.io/p/how-cache-aware-routing-chooses-between-warm-and</link><guid isPermaLink="false">https://newsletter.theaiedge.io/p/how-cache-aware-routing-chooses-between-warm-and</guid><dc:creator><![CDATA[Damien Benveniste]]></dc:creator><pubDate>Wed, 23 Sep 2026 15:03:38 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/0523da2d-4b65-4099-911d-4712db320d9c_1536x1024.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>An LLM request router sits in front of several replicas of the same model and chooses which replica should receive each prompt. <strong>Cache-aware routing</strong> makes that placement decision before execution by considering reusable prompt state at each replica, not only how busy it looks. The surprising part is that replicas stop being interchangeable after they begin serving traffic: one may already hold reusable computation for the prompt, while another may have a shorter queue.</p><p>Prefix-aware routing became a managed endpoint option in September 2026, a sign that cache locality has moved from an engine detail into a deployment decision.</p><p>So where should the next request go: to the warm replica or the idle one? The compact answer is to send it where the saved prompt computation is worth more than the extra work already waiting there. A useful router therefore needs two views at once: <strong>what can be reused</strong> and <strong>what must still be processed</strong>.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!T8m-!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4d246b2c-fdb6-474d-9b13-7b616e92218a_1774x887.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!T8m-!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4d246b2c-fdb6-474d-9b13-7b616e92218a_1774x887.png 424w, https://substackcdn.com/image/fetch/$s_!T8m-!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4d246b2c-fdb6-474d-9b13-7b616e92218a_1774x887.png 848w, https://substackcdn.com/image/fetch/$s_!T8m-!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4d246b2c-fdb6-474d-9b13-7b616e92218a_1774x887.png 1272w, https://substackcdn.com/image/fetch/$s_!T8m-!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4d246b2c-fdb6-474d-9b13-7b616e92218a_1774x887.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!T8m-!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4d246b2c-fdb6-474d-9b13-7b616e92218a_1774x887.png" width="1774" height="887" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/4d246b2c-fdb6-474d-9b13-7b616e92218a_1774x887.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:887,&quot;width&quot;:1774,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1091918,&quot;alt&quot;:&quot;One LLM request faces two destinations: a warm replica with a queue and a cold replica with no queue, making the faster choice ambiguous.&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="One LLM request faces two destinations: a warm replica with a queue and a cold replica with no queue, making the faster choice ambiguous." title="One LLM request faces two destinations: a warm replica with a queue and a cold replica with no queue, making the faster choice ambiguous." srcset="https://substackcdn.com/image/fetch/$s_!T8m-!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4d246b2c-fdb6-474d-9b13-7b616e92218a_1774x887.png 424w, https://substackcdn.com/image/fetch/$s_!T8m-!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4d246b2c-fdb6-474d-9b13-7b616e92218a_1774x887.png 848w, https://substackcdn.com/image/fetch/$s_!T8m-!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4d246b2c-fdb6-474d-9b13-7b616e92218a_1774x887.png 1272w, https://substackcdn.com/image/fetch/$s_!T8m-!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4d246b2c-fdb6-474d-9b13-7b616e92218a_1774x887.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">The cached destination is not automatically the fastest destination.</figcaption></figure></div><p>To see why, start with the work a cached prefix actually removes. Then we will keep one support prompt fixed while four routing policies make different placement decisions. That comparison will expose the useful rule, its failure modes, and the state a production router has to keep current.</p><h2>What a warm prefix actually saves</h2><p>Before routing makes sense, we need one piece of transformer serving machinery.</p><p>An incoming prompt is a sequence of tokens. During <strong>prefill</strong>, the model processes those input tokens through every transformer layer. In each attention layer it derives a key vector and a value vector for every position. Those vectors are the processed state that later tokens attend to. The first generated token can appear only after this prompt work has finished.</p><p>During <strong>decode</strong>, the model generates one new token, appends its new key and value state, and repeats. Decode can reuse the state for all earlier positions instead of rebuilding it. The stored collection is called the <strong>KV cache</strong>.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!XLMl!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2d71ed3b-080e-4f22-b562-573ec9d91339_1923x817.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!XLMl!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2d71ed3b-080e-4f22-b562-573ec9d91339_1923x817.png 424w, https://substackcdn.com/image/fetch/$s_!XLMl!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2d71ed3b-080e-4f22-b562-573ec9d91339_1923x817.png 848w, https://substackcdn.com/image/fetch/$s_!XLMl!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2d71ed3b-080e-4f22-b562-573ec9d91339_1923x817.png 1272w, https://substackcdn.com/image/fetch/$s_!XLMl!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2d71ed3b-080e-4f22-b562-573ec9d91339_1923x817.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!XLMl!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2d71ed3b-080e-4f22-b562-573ec9d91339_1923x817.png" width="1923" height="817" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/2d71ed3b-080e-4f22-b562-573ec9d91339_1923x817.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:817,&quot;width&quot;:1923,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1198485,&quot;alt&quot;:&quot;Prefill processes all prompt tokens into KV state before the first output token, while decode reuses that state and adds one token at a time.&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Prefill processes all prompt tokens into KV state before the first output token, while decode reuses that state and adds one token at a time." title="Prefill processes all prompt tokens into KV state before the first output token, while decode reuses that state and adds one token at a time." srcset="https://substackcdn.com/image/fetch/$s_!XLMl!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2d71ed3b-080e-4f22-b562-573ec9d91339_1923x817.png 424w, https://substackcdn.com/image/fetch/$s_!XLMl!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2d71ed3b-080e-4f22-b562-573ec9d91339_1923x817.png 848w, https://substackcdn.com/image/fetch/$s_!XLMl!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2d71ed3b-080e-4f22-b562-573ec9d91339_1923x817.png 1272w, https://substackcdn.com/image/fetch/$s_!XLMl!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2d71ed3b-080e-4f22-b562-573ec9d91339_1923x817.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Routing can save prefill work; it cannot make unknown output tokens exist early.</figcaption></figure></div><p>Now consider a support assistant whose prompt begins with 3,200 tokens of policies, tool descriptions, and response rules. Only the short customer question at the end changes. If the engine has already processed the same beginning, it can reuse the matching KV state and prefill only the new suffix.</p><p>Prefix caching does not mean that the model remembers a similar idea. The match is structural. Serving engines divide the prompt into token blocks, identify a block using its tokens and the blocks before it, and reuse only an unbroken matching prefix. If block three changes, later blocks no longer describe the same model state, even if much of their text looks familiar.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!w2th!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff76bb78d-091d-48c2-8ce1-1ba972743c4f_1774x887.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!w2th!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff76bb78d-091d-48c2-8ce1-1ba972743c4f_1774x887.png 424w, https://substackcdn.com/image/fetch/$s_!w2th!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff76bb78d-091d-48c2-8ce1-1ba972743c4f_1774x887.png 848w, https://substackcdn.com/image/fetch/$s_!w2th!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff76bb78d-091d-48c2-8ce1-1ba972743c4f_1774x887.png 1272w, https://substackcdn.com/image/fetch/$s_!w2th!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff76bb78d-091d-48c2-8ce1-1ba972743c4f_1774x887.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!w2th!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff76bb78d-091d-48c2-8ce1-1ba972743c4f_1774x887.png" width="1774" height="887" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/f76bb78d-091d-48c2-8ce1-1ba972743c4f_1774x887.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:887,&quot;width&quot;:1774,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1041065,&quot;alt&quot;:&quot;A prompt split into ordered token blocks reuses only the consecutive cached blocks from the beginning, stopping at the first changed block.&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="A prompt split into ordered token blocks reuses only the consecutive cached blocks from the beginning, stopping at the first changed block." title="A prompt split into ordered token blocks reuses only the consecutive cached blocks from the beginning, stopping at the first changed block." srcset="https://substackcdn.com/image/fetch/$s_!w2th!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff76bb78d-091d-48c2-8ce1-1ba972743c4f_1774x887.png 424w, https://substackcdn.com/image/fetch/$s_!w2th!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff76bb78d-091d-48c2-8ce1-1ba972743c4f_1774x887.png 848w, https://substackcdn.com/image/fetch/$s_!w2th!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff76bb78d-091d-48c2-8ce1-1ba972743c4f_1774x887.png 1272w, https://substackcdn.com/image/fetch/$s_!w2th!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff76bb78d-091d-48c2-8ce1-1ba972743c4f_1774x887.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Prefix reuse is an unbroken chain from the first token, not a bag of similar passages.</figcaption></figure></div><p>That distinction gives prefix caching an honest boundary. It skips model computation already performed for the input prefix. It does not skip the generation of new output tokens, because those tokens do not exist yet. A workload with long repeated inputs and short answers can gain a lot; a workload with unrelated prompts or very long answers may gain little.</p><p>Within one replica, the rule is simple: reuse every valid prefix block that is still resident, prefill the remaining input, then decode normally.</p>
      <p>
          <a href="https://newsletter.theaiedge.io/p/how-cache-aware-routing-chooses-between-warm-and">
              Read more
          </a>
      </p>
   ]]></content:encoded></item></channel></rss>