<?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:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[thecinderellaproject - Medium]]></title>
        <description><![CDATA[Humanity &amp; Ai: ⭐ Bringing the world together under one universe. Write for us young 🌱 ones - Medium]]></description>
        <link>https://medium.com/thecinderellaproject?source=rss----78e703a1065b---4</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>thecinderellaproject - Medium</title>
            <link>https://medium.com/thecinderellaproject?source=rss----78e703a1065b---4</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 03 Dec 2026 11:15:13 GMT</lastBuildDate>
        <atom:link href="https://medium.com/feed/thecinderellaproject" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Prefill grows with the square, decode with the cache: what changes when the prompt is rebuilt from…]]></title>
            <link>https://medium.com/thecinderellaproject/prefill-grows-with-the-square-decode-with-the-cache-what-changes-when-the-prompt-is-rebuilt-from-2c3bc8bf51fb?source=rss----78e703a1065b---4</link>
            <guid isPermaLink="false">https://medium.com/p/2c3bc8bf51fb</guid>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[Shalendra gaur]]></dc:creator>
            <pubDate>Thu, 03 Dec 2026 09:59:38 GMT</pubDate>
            <atom:updated>2026-12-03T09:59:40.333Z</atom:updated>
            <content:encoded><![CDATA[<h3>Prefill grows with the square, decode with the cache: what changes when the prompt is rebuilt from held state</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*IIHZ3wK4lidIQ3c1.png" /></figure><p><em>Architecture by Rajnish Choubey; tests by Shalendra Gaur (with an AI assistant as a tool: this article was written with AI assistance and every number is read from a saved file in the repository linked at the end). AXI is a layer on the host side, for the company that runs the model; the model is unchanged and every claim here is about the state the host holds.</em></p><p>NVIDIA’s engineers Nidhi Bhatia, Samkit Jain, Sai Kishan Pampana, Ritika Borkar and Bita Darvish Rouhani published a clear account of long-context inference on the NVIDIA Technical Blog on 31 July 2026. Prefill cost grows with the square of the input length. Decode cost grows linearly with the KV cache length. Attention’s share of DeepSeek-R1 prefill time rises from 18% at 4K context to 85% at 128K. Their answer is co-design: KV-cache compression, sparse or sliding-window attention, hybrid architectures, and sharding that matches the number of KV heads.</p><p>The workload side is described in AgentPerfBench (Imperial College London, University of Cambridge and University of Oxford). The median input of the coding-agent profile is 9,995 tokens against 187 for single-turn chat; accumulated context reaches up to 120,000 tokens by the final turn of a long coding-agent session; and on Llama-3.1-8B the median time to first token at the saturation point rises from 343 ms for chat to 11,719 ms for the coding agent (medium multi-turn trace replays on H100 with vLLM).</p><p>Both sources show that what drives cost is how long the input is. This article is about another way to pull that lever: changing what the prompt contains.</p><h3>What AXI does to the prompt</h3><p>AXI is Rajnish Choubey’s architecture for the company that runs the model. The application holds the exact state. At every step the model proposes one change, a deterministic gate admits or refuses it, and the prompt for the next step is rebuilt, short, from the held state. The model is unchanged. It fits any LLM application that holds state, short jobs and long ones, from the first step. Because the prompt is built from the state, its size is the size of the state, and it is the same at step 1,500 as at step 1.</p><h3>What was measured</h3><ul><li>One 1,500-step job on Gemini 3.8 Flash: the AXI prompt was <strong>2,824 tokens at every step</strong>, and the state was exact on <strong>1,500 of 1,500 steps</strong>. The same job as a kept chat averaged 476,835 prompt tokens a step (largest 949,591): <strong>169 times fewer tokens a step</strong> with AXI.</li><li>Median time to first token: <strong>2.27 s</strong> with AXI against <strong>9.13 s</strong> for the kept chat at prompts of 500,000 tokens or more. This is a hosted API, so the serving hardware is not ours to state and the figures are not comparable with the NVIDIA ones above.</li><li>On NVIDIA hardware, one L4 with vLLM 0.31.0 and Qwen2.5-7B-Instruct-AWQ served <strong>256 AXI sessions at once for 25,557 steps, every one exact</strong>, at 94.4 computed prompt tokens a step with 71.46% of the prompt tokens served from the prefix cache.</li></ul><h3>The arithmetic, with the post’s own scaling</h3><p>A prompt of 476,835 tokens against one of 2,824 is a ratio of 169 (476,835 / 2,824 = 168.8). Terms that grow linearly with the number of tokens, such as decode against the KV cache, change by that ratio. A term that grows with the square of the length changes by the square of the ratio, about 28,500 (this is arithmetic on the post’s scaling for these two prompt lengths, not a measurement of any model or of NVIDIA hardware).</p><h3>How the two approaches fit</h3><p>Attention co-design is what the jobs need that must keep a long context. Held state is what the jobs need whose state the host already holds: they never build the long context to begin with. The two stack.</p><h3>A test you can run</h3><p>Take one multi-turn workload from your own profiling. Run it twice on the same GPUs, once as a kept chat and once with each prompt rebuilt from held state, and read prefill share, decode time per token and time to first token side by side. The numbers can be published whichever way they fall. The jobs, scripts and saved results are in the repository:</p><p>Page for companies: <a href="https://github.com/gaurshalendra2412/axi-runtime/blob/main/docs/AXI_FOR_COMPANIES.md">https://github.com/gaurshalendra2412/axi-runtime/blob/main/docs/AXI_FOR_COMPANIES.md</a></p><p>The 1,500-step job: <a href="https://github.com/gaurshalendra2412/axi-runtime/blob/main/docs/GEMINI_LONG_TEST.md">https://github.com/gaurshalendra2412/axi-runtime/blob/main/docs/GEMINI_LONG_TEST.md</a></p><p>The 256-session L4 run: <a href="https://github.com/gaurshalendra2412/axi-runtime/blob/main/docs/SESSIONS_PER_CHIP_TEST.md">https://github.com/gaurshalendra2412/axi-runtime/blob/main/docs/SESSIONS_PER_CHIP_TEST.md</a></p><p>White paper: <a href="https://doi.org/10.5281/zenodo.23958737">https://doi.org/10.5281/zenodo.23958737</a></p><p>Sources read for this article:</p><p>NVIDIA Technical Blog, “Co-Designing AI Model Attention for Fast, Interactive Long-Context Inference” (31 July 2026): <a href="https://developer.nvidia.com/blog/co-designing-ai-model-attention-for-fast-interactive-long-context-inference/">https://developer.nvidia.com/blog/co-designing-ai-model-attention-for-fast-interactive-long-context-inference/</a></p><p>AgentPerfBench: A Benchmarking and Evaluation Suite for Inference Performance of Agentic LLMs, arXiv 2609.34683: <a href="https://arxiv.org/abs/2609.34683">https://arxiv.org/abs/2609.34683</a></p><p><em>Originally published at </em><a href="https://dev.to/shalendra_gaur_ecd0567a49/prefill-grows-with-the-square-decode-with-the-cache-what-changes-when-the-prompt-is-rebuilt-from-k3j"><em>https://dev.to</em></a><em> on December 3, 2026.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2c3bc8bf51fb" width="1" height="1" alt=""><hr><p><a href="https://medium.com/thecinderellaproject/prefill-grows-with-the-square-decode-with-the-cache-what-changes-when-the-prompt-is-rebuilt-from-2c3bc8bf51fb">Prefill grows with the square, decode with the cache: what changes when the prompt is rebuilt from…</a> was originally published in <a href="https://medium.com/thecinderellaproject">thecinderellaproject</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Google’s TPU post, next to AXI: 169x more sessions in a chip’s memory, 256 on one L4, every step…]]></title>
            <link>https://medium.com/thecinderellaproject/googles-tpu-post-next-to-axi-169x-more-sessions-in-a-chip-s-memory-256-on-one-l4-every-step-14a0543acd50?source=rss----78e703a1065b---4</link>
            <guid isPermaLink="false">https://medium.com/p/14a0543acd50</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[llm-large-language-model]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[machine-learning-ai]]></category>
            <dc:creator><![CDATA[Shalendra gaur]]></dc:creator>
            <pubDate>Mon, 30 Nov 2026 09:46:10 GMT</pubDate>
            <atom:updated>2026-11-30T09:46:11.654Z</atom:updated>
            <content:encoded><![CDATA[<h3>Google’s TPU post, next to AXI: 169x more sessions in a chip’s memory, 256 on one L4, every step exact</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*_MJFL1PDNETGevsf.png" /></figure><p>On 9 November 2026 Google described <a href="https://blog.google/innovation-and-ai/infrastructure-and-cloud/global-network/tpu-8i-max-and-8tx/">two answers to the memory wall</a>: TPU 8i Max puts two TPU 8i chips in one package, with double the compute, SRAM and HBM bandwidth, and TPU Sync, an open-sourced layer, tiers KV caches off the chip into host DRAM and shared storage. Both add room for what a long session asks of a chip. AXI changes what a session asks of it. One NVIDIA L4 ran 256 sessions of a 7B model at once with the held state exact on 25,557 of 25,557 steps, at 105,230 exact steps an hour and 71 W.</p><h3>What AXI is</h3><p>AXI is a layer on the host side, for the company that runs the model. The architecture is by Rajnish Choubey. The model is unchanged. The host holds the exact state, the model proposes one change per step, a deterministic gate admits or refuses it, and the prompt is rebuilt short from the held state at every step. It fits any LLM application that holds state, short jobs and long ones, from the first step.</p><h3>A chip’s memory, counted</h3><p>The KV cache a session takes grows with the tokens in its prompt. An AXI step is 2,824 tokens. The kept chat of the same long job averaged 476,835 tokens and reached 949,591. On a TPU v6e chip (33.5 GB), with real cache-shaped arrays and no model run, 927 sessions fit at the AXI step size, against 5 at the kept chat’s mean and 2 at its largest. The count of 927 is within 3 of the count computed from the real bytes a session takes (924). On an NVIDIA T4, 430 against 2. The ratio is the token ratio, 169, and it is the same on both chips ( <a href="https://github.com/gaurshalendra2412/axi-runtime/blob/main/docs/TPU_SESSIONS_TEST.md">Test 30</a>).</p><h3>A chip’s work, measured on one L4</h3><p>A real model, Qwen2.5–7B (AWQ) on vLLM, one NVIDIA L4, 100-step jobs, 8 to 256 sessions at once, the state held on the host ( <a href="https://github.com/gaurshalendra2412/axi-runtime/blob/main/docs/SESSIONS_PER_CHIP_TEST.md">Test 38</a>):</p><ul><li>8 sessions: 800 of 800 steps exact, 51,134 exact steps per GPU hour, 5.035 joules per exact step</li><li>32 sessions: 3,200 of 3,200 steps exact, 88,635 exact steps per GPU hour, 2.923 joules per exact step</li><li>128 sessions: 12,800 of 12,800 steps exact, 105,043 exact steps per GPU hour, 2.464 joules per exact step</li><li>256 sessions: 25,557 of 25,557 steps exact, 105,230 exact steps per GPU hour, 2.458 joules per exact step</li></ul><p>The state was exact on every step at every size. Steps an hour rose until about 128 sessions, where the card is full, and the energy per exact step fell from 5.0 J to 2.46 J as more sessions shared the card (board power 71 W). Each step computed 94.4 prompt tokens, and 71.46 percent of the prompt tokens were served from the prefix cache.</p><h3>Computed tokens, with the kept chat’s cache counted</h3><p>Gemini 3.8 Flash, one long job ( <a href="https://github.com/gaurshalendra2412/axi-runtime/blob/main/docs/GEMINI_LONG_TEST.md">the run</a>). Once its prompt passed 500,000 tokens, the kept chat had 99.3 percent of its prompt tokens served from the cache and still computed 5,419 tokens for each exact step. AXI, with 0.0 percent served from the cache, computed 3,108: 1.7 times fewer. Over the whole job the prompt was 2,824 tokens a step against 476,835 (169 times fewer), and the held state was exact on 1,500 of 1,500 steps. On a 400-step job, with a warm cache serving 97.0 percent of the kept chat’s prompt tokens, a step of the kept chat still cost 6.5 to 19.5 times as much at Claude, Grok and Gemini list prices ( <a href="https://github.com/gaurshalendra2412/axi-runtime/blob/main/docs/AGENTX_NOTE.md">the 400-step note</a>).</p><h3>The same chip work on step 20,000 as on step 1</h3><p>On the 7B model, four jobs of 20,000 steps ended with the state exact on 80,000 of 80,000 steps. The prompt stayed near 620 tokens and never passed 660, and a step took 0.1605 s early and 0.1651 s late ( <a href="https://github.com/gaurshalendra2412/axi-runtime/blob/main/docs/ENDURANCE_7B_TEST.md">Test 43</a>). A prompt built from the held state is the size of the state, not of the steps already run.</p><h3>Next to Google’s two moves</h3><p>TPU 8i Max adds silicon to the chip. TPU Sync decides where a long session’s cache lives. AXI decides how much each session asks of the chip at every step. They sit at different layers of the same host, and a shorter prompt leaves less cache to hold, tier or move for each session.</p><h3>Check it yourself</h3><p>No key and no GPU, about 3 seconds. It replays the saved replies of the 4,000-step run and recomputes the held state with the repository’s own code.</p><pre>git clone https://github.com/gaurshalendra2412/axi-runtime cd axi-runtime/python python3 quickstart_replay.py</pre><p>Companies that run models, to run AXI on a workload of yours: <a href="/service/mailto:gaur.shalendra2412@gmail.com">gaur.shalendra2412@gmail.com</a>.</p><p><em>Architecture by Rajnish Choubey; tests by Shalendra Gaur (with an AI assistant as a tool).</em></p><p>Sources: <a href="https://blog.google/innovation-and-ai/infrastructure-and-cloud/global-network/tpu-8i-max-and-8tx/">Amin Vahdat, Google, 9 Nov 2026</a>; <a href="https://infoq.com/news/2026/11/google-tpu-sync">InfoQ on TPU Sync, 12 Nov 2026</a>.</p><p><em>Originally published at </em><a href="https://dev.to/shalendra_gaur_ecd0567a49/googles-tpu-post-next-to-axi-169x-more-sessions-in-a-chips-memory-256-on-one-l4-every-step-30c3"><em>https://dev.to</em></a><em> on November 30, 2026.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=14a0543acd50" width="1" height="1" alt=""><hr><p><a href="https://medium.com/thecinderellaproject/googles-tpu-post-next-to-axi-169x-more-sessions-in-a-chip-s-memory-256-on-one-l4-every-step-14a0543acd50">Google’s TPU post, next to AXI: 169x more sessions in a chip’s memory, 256 on one L4, every step…</a> was originally published in <a href="https://medium.com/thecinderellaproject">thecinderellaproject</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[169x fewer prompt tokens, state exact on every step: AXI next to what Google, Meta, Microsoft and…]]></title>
            <link>https://medium.com/thecinderellaproject/169x-fewer-prompt-tokens-state-exact-on-every-step-axi-next-to-what-google-meta-microsoft-and-2dcfefe0e22e?source=rss----78e703a1065b---4</link>
            <guid isPermaLink="false">https://medium.com/p/2dcfefe0e22e</guid>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[large-language-models]]></category>
            <dc:creator><![CDATA[Shalendra gaur]]></dc:creator>
            <pubDate>Mon, 30 Nov 2026 03:28:57 GMT</pubDate>
            <atom:updated>2026-11-30T03:28:58.547Z</atom:updated>
            <content:encoded><![CDATA[<h3>169x fewer prompt tokens, state exact on every step: AXI next to what Google, Meta, Microsoft and Anthropic reported</h3><p>Between March and October 2026, five teams published, from different angles, what it costs, and what goes wrong, when an LLM application carries its history from one step to the next. Anthropic wrote about long-running application development. The authors of SKILL.state (two at Google, one at Purdue) wrote about replacing a replayed history with an explicit state. Meta described how it split a large agent job into deterministic steps and one model step. Microsoft wrote about the tokens an agentic task uses. Google Cloud wrote about serving long prompts with llm-d. This article collects what each one documented, with the date and the numbers, and then sets next to it what we measured when the host, not the chat, holds the state.</p><h3>What each team documented</h3><p><strong>SKILL.state</strong> (Sanket Badhe, Priyanka Tiwari, Jonghyun Chung; arXiv:2608.26263, version 3 of 2 September 2026). An explicit, mutable execution state replaces the replayed history. At 100 steps the stateful baseline used 1,062,387 tokens against 65,408 for SKILL.state, 16.2 times fewer, with accuracy 0.91 against 0.94. At 200 steps a summary-memory baseline used 6,175,509 tokens against 122,384. On tau-Bench Airline the prompt stayed flat at about 2,800 tokens a step. The state is changed through structured JSON patches that the runtime validates against a schema, with a rollback and retry when a patch is invalid. The authors state their own limits: the state has to be a sufficient statistic for the task, and the work is single-agent.</p><p><strong>Meta, “The Thin Orchestrator”</strong> (Plawan Rath, Akhil Jindal, Ashwini Verma; 19 October 2026). A single agent mixed up the rules of different subsystems as its context grew, and neither better prompts nor a bigger window fixed it. The answer was a seven-step orchestrator in which six steps are deterministic code and the model works in one of them, inside an isolated subagent, across fourteen subagents. One lesson the post draws is to set the line between the deterministic and the probabilistic parts explicitly.</p><p><strong>Google Cloud, llm-d 1.0</strong> (Mark Lohmeyer, Sean Horgan; 20 October 2026). The serving side. The post names “prefix-eviction storms” as a problem, and describes offloading the KV cache to host memory and then to SSD or Managed Lustre. On Ironwood TPUs, with prefix-aware routing and host offload, the median time to first token fell by more than 85 percent and throughput rose 2.4 times. Google also reports that the prefix-cache hit rate on its Gemini platform went from 35 to 70 percent.</p><p><strong>Microsoft, “The Yield Imperative”</strong> (Rani Borkar, 1 September 2026). A single agentic task can use more than 3,400 times the tokens of a typical chat. The post defines useful yield as capability times deployment velocity times utilization.</p><p><strong>Anthropic, “Harness design for long-running application development”</strong> (Prithvi Rajasekaran, 24 March 2026). Models showed what the post calls context anxiety (it was seen with Sonnet 4.5), and agents reliably skewed positive when grading their own work. The harness answered with a separate evaluator that applies hard thresholds.</p><h3>What they have in common</h3><p>This is our reading, not theirs, and these are four different kinds of work (a research paper, a production case study, serving infrastructure, a development harness); none of them is about AXI. In each report, the cost or the error comes from what is carried from one step to the next: a replayed history, a growing context, a cache that has to keep it, a model that checks its own output. And each answer moves that thing: out of the prompt and into a state (SKILL.state), into deterministic code (Meta), into a cheaper tier of memory (llm-d), or into a separate checker (Anthropic).</p><h3>What holding the state on the host measures</h3><p>AXI is Rajnish Choubey’s architecture, a layer on the host side for the company that runs the model. The host holds the exact state as data. Each step the model proposes one change; the host parses it strictly, checks it against the job’s rules, completes what the rules can complete (deleting a service also removes the services that depend on it), commits all or nothing, and rebuilds a short prompt from the held state. The model is unchanged. It fits any LLM application that holds a state, from the first step, short jobs and long: a schedule, a table with formulas, a code file, JSON tool calls. The tests are Shalendra Gaur’s, run with an AI assistant as a tool. These figures are on test pages in the repository, each with a command that re-checks it.</p><ul><li><strong>The prompt stays flat.</strong> On one long Gemini 3.8 Flash job, the kept chat averaged 476,835 prompt tokens over its 456 live steps and stopped at turn 457 (949,591 tokens, because the next prompt would pass 950,000). With AXI the prompt was 2,824 tokens a step on average and never above 3,112, which is 169 times fewer, over 1,500 steps.</li><li><strong>The state stays exact.</strong> With AXI the state was exactly right on 1,500 of 1,500 steps. A company that applied each reply of the kept chat as it came held a wrong state from turn 287 to the end, although the model’s replies were exact on 442 of 457 turns.</li><li><strong>The slips have one shape.</strong> On 4,000 edits in a row to a graph of 17 to 22 services, the held state was exact on 4,000 of 4,000 steps. The model’s own reply was exact 3,954 times (98.85 percent). All 46 slips were one kind: a delete that leaves out the services depending on it. One fixed completion rule handled all 46.</li><li><strong>It runs for a long time.</strong> On Qwen2.5–7B with vLLM 0.31.0 on one NVIDIA L4, four jobs of 20,000 steps gave 80,000 of 80,000 exact steps, with the prompt never above 660 tokens and 0.1605 seconds a step in the first 2,000 rounds against 0.1651 in the last 2,000.</li><li><strong>On a GPU.</strong> 256 concurrent sessions on one L4, 25,557 of 25,557 steps exact, 105,230 exact steps an hour, 94.4 computed prompt tokens a step, 71.46 percent of prompt tokens served from the prefix cache. By arithmetic from the model’s shape, the KV cache of one session is 161.9 MB at 2,824 tokens against 27.34 GB at 476,835 tokens.</li><li><strong>Against hostile input.</strong> 10,000,000 proposals through the gate of the Python reference, 1,401,041 of them injection attempts: none committed.</li><li><strong>Summaries.</strong> On a 14B model, three jobs of 600 steps, the arms that summarise, window or retrieve did not hold the state themselves: applying their replies as written left the state exact on 0.44 percent of steps, and none of the 22 summaries asked to write out the whole state matched the true state. With the host holding the state, every arm was exact on all steps.</li><li><strong>A public benchmark.</strong> On tau2-bench retail (50 tasks) the four arms passed 44, 44, 43 and 42 of 50 tasks, about the same pass rate. The prompt per call and the cost per pass were also about the same on those short conversations, because the saving comes with job length.</li></ul><p>The workloads differ from the ones in the five reports (a service graph rather than an airline desk, a different model, different step counts and baselines), so the numbers are not comparable one to one: the 169 times above and the 16.2 times in SKILL.state are different measurements. They point the same way.</p><h3>Where it sits next to each report</h3><ul><li><strong>Next to SKILL.state:</strong> the same direction, an explicit state in place of a replayed history. The two check at different levels. A schema answers whether a patch is well formed. The gate in AXI also asks whether the change satisfies the job’s rules and what those rules complete: in our runs the slips were replies that parsed but left out the dependents of a delete, and a fixed completion rule fixed all 46.</li><li><strong>Next to Meta:</strong> the boundary drawn explicitly. In AXI the model proposes and the host decides; the rules are the job’s own, given to the host, not found by the model.</li><li><strong>Next to llm-d:</strong> the serving tier makes a long history cheaper to keep. Holding the state makes it unnecessary to keep, so the KV cache per session stays small. The two work at different layers.</li><li><strong>Next to Microsoft’s figure:</strong> that figure is for a whole task against a typical chat, and ours is per step for one job, so they are different quantities. What they share is that the tokens an agentic task uses depend on what is carried from step to step: with the chat kept, the prompt grows every step; with the state held, every prompt is the same size.</li><li><strong>Next to Anthropic’s evaluator:</strong> the check is separate from the model, and it is deterministic: it verifies what a rule can state, for example that what a reply names exists, that dependencies point at real things, and that nothing is booked twice.</li></ul><h3>What was run</h3><p>The figures above are for jobs whose state the host can hold exactly as data, with rules for what a valid state is. “Exact” means that after every step the host’s state equals the state a program computes from the same list of instructions. It is a statement about the state the host holds. Four other kinds of state (a table with formulas, a room schedule, a code file, JSON tool calls) were run with about 30 percent conflicting requests, and the held state broke no rule on any step in all eight cells.</p><p>The repository holds the host side in Python and the measurements. The tensor-level framework is Rajnish Choubey’s own work, delivered to host companies separately, by agreement with the licensors.</p><h3>Check it yourself</h3><p>No key and no GPU:</p><pre>git clone https://github.com/gaurshalendra2412/axi-runtime<br>cd axi-runtime/python &amp;&amp; python3 quickstart_replay.py</pre><p>It replays the saved replies of the 4,000-step run with the repository’s own code and prints 4,000 of 4,000, 3,954 of 4,000, 85 of 400 and 4.5 times. A slider through every turn of the long job: <a href="https://gaurshalendra2412.github.io/axi-runtime/trace-explorer.html">https://gaurshalendra2412.github.io/axi-runtime/trace-explorer.html</a></p><p>Architecture by Rajnish Choubey; tests by Shalendra Gaur, with an AI assistant as a tool. Not affiliated with Anthropic, Google, Meta or Microsoft. The repository is under CC BY-ND 4.0.</p><p>Sources:</p><ul><li>SKILL.state, arXiv:2608.26263 (v3, 2 Sep 2026): <a href="https://arxiv.org/abs/2608.26263">https://arxiv.org/abs/2608.26263</a></li><li>Meta Engineering, The Thin Orchestrator (19 Oct 2026): <a href="https://engineering.fb.com/2026/10/19/ml-applications/thin-orchestrator-ai-agent-architecture/">https://engineering.fb.com/2026/10/19/ml-applications/thin-orchestrator-ai-agent-architecture/</a></li><li>Google Cloud, llm-d 1.0: an open source stack for distributed inference (20 Oct 2026): <a href="https://cloud.google.com/blog/topics/ai-infrastructure/llm-d-1-0-an-open-source-stack-for-distributed-inference">https://cloud.google.com/blog/topics/ai-infrastructure/llm-d-1-0-an-open-source-stack-for-distributed-inference</a></li><li>Microsoft, The yield imperative (1 Sep 2026): <a href="https://blogs.microsoft.com/blog/2026/09/01/the-yield-imperative-turning-ai-infrastructure-into-useful-intelligence/">https://blogs.microsoft.com/blog/2026/09/01/the-yield-imperative-turning-ai-infrastructure-into-useful-intelligence/</a></li><li>Anthropic, Harness design for long-running application development (24 Mar 2026): <a href="https://www.anthropic.com/engineering/harness-design-long-running-apps">https://www.anthropic.com/engineering/harness-design-long-running-apps</a></li><li>AXI test pages: <a href="https://github.com/gaurshalendra2412/axi-runtime">https://github.com/gaurshalendra2412/axi-runtime</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2dcfefe0e22e" width="1" height="1" alt=""><hr><p><a href="https://medium.com/thecinderellaproject/169x-fewer-prompt-tokens-state-exact-on-every-step-axi-next-to-what-google-meta-microsoft-and-2dcfefe0e22e">169x fewer prompt tokens, state exact on every step: AXI next to what Google, Meta, Microsoft and…</a> was originally published in <a href="https://medium.com/thecinderellaproject">thecinderellaproject</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What serving fleets pay for agent history, and the 620-token prompt that stays flat]]></title>
            <link>https://medium.com/thecinderellaproject/what-serving-fleets-pay-for-agent-history-and-the-620-token-prompt-that-stays-flat-a0b21c9a6250?source=rss----78e703a1065b---4</link>
            <guid isPermaLink="false">https://medium.com/p/a0b21c9a6250</guid>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[llm]]></category>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[Shalendra gaur]]></dc:creator>
            <pubDate>Sat, 28 Nov 2026 10:04:27 GMT</pubDate>
            <atom:updated>2026-11-28T10:04:28.730Z</atom:updated>
            <content:encoded><![CDATA[<p><em>AXI is Rajnish Choubey’s architecture for the company that runs the model: the host holds the exact state and the model stays unchanged. Tests and measurements by Shalendra Gaur. Every number below links to its source.</em></p><p>Agent traffic has changed what a serving fleet has to carry. An agent re-sends its whole history on every call, pauses for tools, and comes back. Over the last two years the groups that build serving systems have measured what that costs, and the figures are large.</p><ul><li><strong>Meta (Crossflow, </strong><a href="https://arxiv.org/pdf/2609.27085"><strong>arXiv 2609.27085</strong></a><strong>, 22 Sep 2026):</strong> fixed prefill and decode pools leave up to 17% of capacity unused; letting decode nodes lend compute to prefill raises geometric-mean token throughput by <strong>16.2% to 17.4%</strong>, up to <strong>43.4%</strong> at high load.</li><li><strong>Berkeley, Stanford, Tsinghua (Continuum, </strong><a href="https://arxiv.org/abs/2511.02230"><strong>arXiv 2511.02230</strong></a><strong>):</strong> pinning an agent’s KV cache across tool calls cuts delay by <strong>1.12 to 3.66 times</strong> and raises throughput by 1.10 to 3.22 times; on a real SWE-agent workload, delay fell by up to 8.18 times.</li><li><strong>InferCept (</strong><a href="https://arxiv.org/abs/2402.01869"><strong>ICML 2024, arXiv 2402.01869</strong></a><strong>):</strong> restarting after every tool call recomputes context already processed, <strong>37% to 40%</strong> of total forwarding time; fixing it gives 1.6 to 2 times the throughput.</li><li><strong>Mooncake, the platform behind Kimi (</strong><a href="https://arxiv.org/abs/2407.00079"><strong>arXiv 2407.00079</strong></a><strong>):</strong> a cache-centric architecture over idle CPU, DRAM and SSD lets Kimi handle <strong>75%</strong> more requests.</li><li><strong>Nanyang Technological University and Harvard (</strong><a href="https://arxiv.org/pdf/2611.02543"><strong>arXiv 2611.02543</strong></a><strong>):</strong> a ten-minute +100% surge cut the prefix hit rate from <strong>0.95 to 0.27</strong> and left median first-token time near 60 s after the surge had passed.</li></ul><p>Every one of these is a fleet-side answer to the same fact: the history is long, and it gets re-sent, stored, moved and recomputed. They are good engineering, and AXI sits on the other side of the same problem.</p><h3>AXI: send less, because the state is held exactly</h3><p>Rajnish Choubey’s architecture changes what each step has to send. The host holds the exact state of the job as data. The model proposes one change per step. A deterministic gate admits it or refuses it. The next prompt is rebuilt short from the held state, so its size follows the state and not the number of steps already run. The model is unchanged, and it is for whoever runs the model: short jobs and long ones, from the first step.</p><p>For a serving fleet that is a smaller prefill per step and a smaller footprint per session, which is exactly what the systems above spend scheduling and storage to manage.</p><h3>What it achieves, measured</h3><ul><li><strong>A prompt that does not grow.</strong> A 7B model, 80,000 steps in four jobs of 20,000: the held state was exactly right on <strong>80,000 of 80,000</strong>, and the prompt stayed near <strong>620 tokens, never above 660</strong>. <a href="https://github.com/gaurshalendra2412/axi-runtime/blob/main/docs/ENDURANCE_7B_TEST.md">Test 43</a></li><li><strong>Same engine, same cache, less computed.</strong> vLLM 0.31.0 with prefix caching on: over the same 108 steps the kept chat computed 1.78 times the prompt tokens and took 1.51 times the seconds per step, and in a 32,768-token window the kept chats stopped at 108 to 235 steps while AXI ran all 1,500. <a href="https://github.com/gaurshalendra2412/axi-runtime/blob/main/docs/KEPT_CHAT_LONG_TEST.md">Test 42</a></li><li><strong>169 times fewer tokens a step, faster first token.</strong> Gemini 3.8 Flash, 1,500 steps: 2,824 prompt tokens a step against 476,835 a turn for the kept chat; median first token 2.27 s against 9.13 s. <a href="https://github.com/gaurshalendra2412/axi-runtime/blob/main/docs/GEMINI_LONG_TEST.md">Test page</a></li><li><strong>84.8 times fewer tokens on a conversation job:</strong> 1,177 prompt tokens a turn against 99,809. <a href="https://github.com/gaurshalendra2412/axi-runtime/blob/main/docs/AGENTX_NOTE.md">AGENTX_NOTE</a></li><li><strong>More sessions per chip.</strong> 256 sessions at once on one NVIDIA L4 with a real 7B model, 25,557 steps all exact, 105,230 exact steps per GPU hour, 71.46% of prompt tokens served from the cache. In memory alone, one TPU v6e chip held 927 AXI-sized sessions against 5 with a kept chat. <a href="https://github.com/gaurshalendra2412/axi-runtime/blob/main/docs/SESSIONS_PER_CHIP_TEST.md">Test 38</a>, <a href="https://github.com/gaurshalendra2412/axi-runtime/blob/main/docs/TPU_SESSIONS_TEST.md">TPU test</a></li></ul><h3>The cost that counts is cost per completed task</h3><p>Princeton’s AI Agents That Matter ( <a href="https://arxiv.org/abs/2407.01502">arXiv 2407.01502</a>) argued that accuracy alone leads to needlessly costly agents, and the Holistic Agent Leaderboard (ICLR 2026, <a href="https://arxiv.org/abs/2510.11977">arXiv 2510.11977</a>) put numbers on it: 21,730 agent rollouts across 9 models and 9 benchmarks cost about <strong>$40,000</strong>, and in 21 of 36 combinations more reasoning effort gave equal or lower accuracy.</p><p>AXI’s number is the price of one verified step. On 4,000 Gemini 3.8 Flash requests, a step with the right state cost <strong>$0.0012</strong> with AXI against $0.0052 with replies applied as written, 4.5 times less ( <a href="https://github.com/gaurshalendra2412/axi-runtime/blob/main/docs/MILLION_TOKEN_TEST_HARD.md">page</a>). At the provider’s own rates, one verified step of a 400-turn job cost <strong>$0.0014</strong> with AXI, $0.0148 with the chat kept and its cache warm, and $0.0870 with the cache cold ( <a href="https://github.com/gaurshalendra2412/axi-runtime/blob/main/docs/BILLING_CHECK.md">BILLING_CHECK</a>).</p><h3>Memory as managed state</h3><p>MAGE ( <a href="https://arxiv.org/pdf/2606.06090">arXiv 2606.06090</a>, June 2026) treats an agent’s memory as a state tree instead of a pile of retrieved text, and reports <strong>7.8 to 20.4 points</strong> more task success than Mem0, HippoRAG2 and MemoRAG, with 55.1% fewer tokens than full context. That is the direction AXI takes, on the host and around any model: the state is exact data with a check on every change. In Test 44 (a 14B model, 600-step jobs) the state the host held was the oracle’s on every step against a kept chat, a generic summary, a state-writing summary, a sliding window and retrieval; of 22 summaries that wrote the state out, none equalled the oracle’s. <a href="https://github.com/gaurshalendra2412/axi-runtime/blob/main/docs/MEMORY_ARMS_TEST.md">Test 44</a></p><h3>Where the numbers come from</h3><p>Every paper figure above is that group’s own measurement of its own system, with the link beside it. Every AXI figure comes from the test page linked beside it, and the replay below recomputes one of them on your machine. The papers and AXI’s tests sit side by side, with what each measures, on one page: <a href="https://github.com/gaurshalendra2412/axi-runtime/blob/main/docs/THIRD_PARTY_EVIDENCE.md">What other people measured, next to what AXI measured</a>.</p><h3>Check it yourself</h3><p>No key, no GPU, about 3 seconds. It replays the saved replies of the 4,000-step Gemini run and recomputes the held state with the repository’s own code:</p><pre>git clone https://github.com/gaurshalendra2412/axi-runtime cd axi-runtime/python python3 quickstart_replay.py</pre><p>If you run an inference fleet or an agent platform, tell us where it goes next. The repository is <a href="https://github.com/gaurshalendra2412/axi-runtime">github.com/gaurshalendra2412/axi-runtime</a>; the one-page version for companies that run models is <a href="https://github.com/gaurshalendra2412/axi-runtime/blob/main/docs/AXI_COMPANY_BRIEF.md">AXI_COMPANY_BRIEF.md</a>.</p><p><em>AXI: architecture by Rajnish Choubey; tests and measurements by Shalendra Gaur.</em></p><p><em>Originally published at </em><a href="https://dev.to/shalendra_gaur_ecd0567a49/what-serving-fleets-pay-for-agent-history-and-the-620-token-prompt-that-stays-flat-1edo"><em>https://dev.to</em></a><em> on November 28, 2026.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a0b21c9a6250" width="1" height="1" alt=""><hr><p><a href="https://medium.com/thecinderellaproject/what-serving-fleets-pay-for-agent-history-and-the-620-token-prompt-that-stays-flat-a0b21c9a6250">What serving fleets pay for agent history, and the 620-token prompt that stays flat</a> was originally published in <a href="https://medium.com/thecinderellaproject">thecinderellaproject</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The best agent finishes 20.6% of long workflows. The missing piece isn't a bigger model.]]></title>
            <link>https://medium.com/thecinderellaproject/the-best-agent-finishes-20-6-of-long-workflows-the-missing-piece-isnt-a-bigger-model-e9da758b703a?source=rss----78e703a1065b---4</link>
            <guid isPermaLink="false">https://medium.com/p/e9da758b703a</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[llm]]></category>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[Shalendra gaur]]></dc:creator>
            <pubDate>Sat, 28 Nov 2026 09:10:14 GMT</pubDate>
            <atom:updated>2026-11-28T09:17:20.031Z</atom:updated>
            <content:encoded><![CDATA[<h3>The best agent finishes 20.6% of long workflows. The benchmark’s authors say the missing piece isn’t a bigger model.</h3><p><em>AXI is Rajnish Choubey’s architecture for the company that runs the model: the host holds the exact state and the model stays unchanged. Tests and measurements by Shalendra Gaur. Every number below links to its source.</em></p><p>On OSWorld 2.0 (XLANG Lab, University of Hong Kong, 26 June 2026), the best agent configuration completes <strong>20.6%</strong> of 108 long computer-use workflows, with a 54.8% partial score. The workflows take a skilled human a median of about 1.6 hours, and leading agents average more than 300 steps on them. The authors say agents carry out local actions well but cannot hold a task-level model together over a long horizon, and spend under 7% of their budget on repairing their own errors. They also write that progress depends less on longer budgets or larger models than on agents that keep a task-level model in memory across long horizons. ( <a href="https://osworld-v2.xlang.ai/">osworld-v2.xlang.ai</a>)</p><p>That is one benchmark. The same failure shows up in others.</p><ul><li><strong>TRAVERSE</strong> (Google Research, Google DeepMind, UCLA, NYU; <a href="https://arxiv.org/pdf/2609.17930">arXiv 2609.17930</a>): over 2,518 agent trajectories, after an agent’s first mistake it never notices it in <strong>38.5%</strong> of runs and does not recover in 69.5%.</li><li><strong>How Fast Do Agents Rot?</strong> (Mittal; <a href="https://arxiv.org/pdf/2609.01660">arXiv 2609.01660</a>): nine models on a tool-use task are near-perfect at 2 hops and score <strong>0.00 to 0.33 at 16 hops</strong>.</li><li><strong>LLMs Get Lost In Multi-Turn Conversation</strong> (Laban et al., ICLR 2026; <a href="https://arxiv.org/abs/2505.06120">arXiv 2505.06120</a>): a <strong>39%</strong> average drop from single-turn to multi-turn.</li><li><strong>Context Length Alone Hurts</strong> (<a href="https://arxiv.org/abs/2510.05381">arXiv 2510.05381</a>): accuracy fell by 13.9% to 85% as input grew, even with the needed evidence retrieved exactly.</li></ul><p><strong>The company that runs the model pays for this twice.</strong> First in the history it re-sends: HKUST finds that each call re-sends the full history, that one Claude Code session on a large model can hold up to 11 GB of KV cache, and that in 5 of 10 agent applications the tools, not the model, dominate or share the latency ( <a href="https://arxiv.org/html/2608.15127v1">arXiv 2608.15127</a>). Second in the cache it leans on: a short burst of extra agent sessions can leave a vLLM server at a prefix hit ratio near 0.10 against 0.94 to 0.95 in healthy runs ( <a href="https://arxiv.org/pdf/2611.13412">arXiv 2611.13412</a>), and an SGLang burst left the hit rate at zero for the remaining 7,500 s in all 30 runs ( <a href="https://arxiv.org/pdf/2611.08902">arXiv 2611.08902</a>).</p><h3>AXI: the state goes where it can be exact</h3><p>Every one of those failures starts the same way: the state of the job lives inside the model’s context, where it is re-read, re-guessed and slowly lost. Rajnish Choubey’s architecture moves it out. The host holds the exact state as data. The model proposes one change per step. A deterministic gate admits it or refuses it. The next prompt is rebuilt short from the held state, so its size follows the state and not the number of steps already run. The model is unchanged. It is for whoever runs the model, short jobs and long ones, from the first step.</p><h3>What it achieves, measured</h3><ul><li><strong>Exact state.</strong> A 7B model, 80,000 steps in four jobs of 20,000: the held state was exactly right on <strong>80,000 of 80,000</strong>. The model’s replies were admitted as written on 76.18% of steps; the gate and its repair handled the rest. The prompt stayed near 620 tokens and never passed 660. <a href="https://github.com/gaurshalendra2412/axi-runtime/blob/main/docs/ENDURANCE_7B_TEST.md">Test 43</a></li><li><strong>Flat prompt, flat step time, same engine.</strong> In a 32,768-token window four kept chats hit the limit at 108 to 235 steps, with prefix caching on; AXI ran all 1,500. Over the same steps the chat computed 1.78 times the prompt tokens and took 1.51 times the seconds per step. <a href="https://github.com/gaurshalendra2412/axi-runtime/blob/main/docs/KEPT_CHAT_LONG_TEST.md">Test 42</a></li><li><strong>169 times fewer tokens a step, and a faster first token.</strong> Gemini 3.8 Flash, 1,500 steps: 2,824 prompt tokens a step with AXI against 476,835 a turn on average for the kept chat; median first token 2.27 s against 9.13 s once the chat’s prompt passed 500,000 tokens. <a href="https://github.com/gaurshalendra2412/axi-runtime/blob/main/docs/GEMINI_LONG_TEST.md">Test page</a></li><li><strong>More sessions per chip.</strong> 256 sessions at once on one NVIDIA L4 with a real 7B model, every step exact, 105,230 exact steps per GPU hour. In memory alone, one TPU v6e chip held 927 AXI-sized sessions against 5 with a kept chat. <a href="https://github.com/gaurshalendra2412/axi-runtime/blob/main/docs/SESSIONS_PER_CHIP_TEST.md">Test 38</a>, <a href="https://github.com/gaurshalendra2412/axi-runtime/blob/main/docs/TPU_SESSIONS_TEST.md">TPU test</a></li><li><strong>Hostile input.</strong> 10 million proposals, 1,401,041 of them injection attempts: none committed. <a href="https://github.com/gaurshalendra2412/axi-runtime/blob/main/docs/GATE_STRESS_TEST.md">Test 39</a></li><li><strong>A benchmark someone else wrote.</strong> On tau2-bench retail, 50 tasks, the held-state agent passed 44 against 43 for the benchmark’s own agent; the page carries the full accounting of tokens, cost and cache. <a href="https://github.com/gaurshalendra2412/axi-runtime/blob/main/docs/TAU2_PILOT.md">Test 47</a></li></ul><h3>Where the numbers come from</h3><p>Every paper figure above is that group&#39;s own measurement of its own work, with the link beside it. Every AXI figure comes from the test page linked beside it, and the replay below recomputes one of them on your machine. The papers and AXI&#39;s tests sit side by side, with what each measures, on one page: <a href="https://github.com/gaurshalendra2412/axi-runtime/blob/main/docs/THIRD_PARTY_EVIDENCE.md">What other people measured, next to what AXI measured</a>.</p><h3>Check it yourself</h3><p>No key, no GPU, about 3 seconds. It replays the saved replies of the 4,000-step Gemini run and recomputes the held state with the repository’s own code:</p><pre>git clone https://github.com/gaurshalendra2412/axi-runtime cd axi-runtime/python python3 quickstart_replay.py</pre><p>If you run these benchmarks, or serve agent sessions, tell us where it goes next. The repository is <a href="https://github.com/gaurshalendra2412/axi-runtime">github.com/gaurshalendra2412/axi-runtime</a>; the one-page version for companies that run models is <a href="https://github.com/gaurshalendra2412/axi-runtime/blob/main/docs/AXI_COMPANY_BRIEF.md">AXI_COMPANY_BRIEF.md</a>.</p><p><em>AXI: architecture by Rajnish Choubey; tests and measurements by Shalendra Gaur.</em></p><p><em>Originally published at </em><a href="https://dev.to/shalendra_gaur_ecd0567a49/the-best-agent-finishes-206-of-long-workflows-the-benchmarks-authors-say-the-missing-piece-no5"><em>https://dev.to</em></a><em> on November 28, 2026.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e9da758b703a" width="1" height="1" alt=""><hr><p><a href="https://medium.com/thecinderellaproject/the-best-agent-finishes-20-6-of-long-workflows-the-missing-piece-isnt-a-bigger-model-e9da758b703a">The best agent finishes 20.6% of long workflows. The missing piece isn&#39;t a bigger model.</a> was originally published in <a href="https://medium.com/thecinderellaproject">thecinderellaproject</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[AXI at Claude, Grok and Gemini list prices: 61x to 79x cheaper per verified step than a kept chat…]]></title>
            <link>https://medium.com/thecinderellaproject/axi-at-claude-grok-and-gemini-list-prices-61x-to-79x-cheaper-per-verified-step-than-a-kept-chat-dc2f4a34b08f?source=rss----78e703a1065b---4</link>
            <guid isPermaLink="false">https://medium.com/p/dc2f4a34b08f</guid>
            <category><![CDATA[software-architecture]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[llm]]></category>
            <dc:creator><![CDATA[Shalendra gaur]]></dc:creator>
            <pubDate>Thu, 26 Nov 2026 11:09:33 GMT</pubDate>
            <atom:updated>2026-11-26T11:09:34.577Z</atom:updated>
            <content:encoded><![CDATA[<h3>AXI at Claude, Grok and Gemini list prices: 61x to 79x cheaper per verified step than a kept chat (measured tokens, list prices)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*uMeJ3IaOYPxLr7zI.png" /></figure><p>I priced one measured job at Anthropic’s, xAI’s and Google’s published list prices. Same token counts on every row, so the only thing that changes from row to row is the price list.</p><p>AXI is a layer on the host side, between a model and the state it edits. The host holds the exact state, the model proposes one change per step, a deterministic check admits or refuses it, and the prompt is rebuilt short from the held state at every step. The model is unchanged. It is for the company that runs the model, not for end users, and it fits any LLM application that holds state, short jobs and long, from the first step. The architecture is by Rajnish Choubey. The tests and measurements are mine, run with an AI assistant as a tool. I am not affiliated with Anthropic, xAI, Google or Meta. (“AXI” here is not the Google or Microsoft products of the same name.)</p><h3>The job</h3><p>400 steps that edit a service graph, one change per step (the cache pair test and Test 23 in the repository). Three ways of holding the state:</p><ul><li><strong>A:</strong> the host holds the state as data and rebuilds a short prompt each step (AXI).</li><li><strong>KC:</strong> the whole chat is kept and the cache is cold.</li><li><strong>KW:</strong> the whole chat is kept and the cache is warm (97.0 percent of its prompt tokens were read from the cache).</li></ul><p>A verified step is a step after which the held state equals the true state. The token counts were measured on Gemini 3.8 Flash, and Google’s own bill confirms them in total to about 1.3 percent (the earlier article on this).</p><p>The measured tokens. AXI’s host-held state (A): 400 steps, 400 verified, 470,669 prompt tokens, none cached, 57,527 output tokens, largest prompt of one step 1,390. Kept chat, cold cache (KC): 390 steps, 328 verified, 37,967,655 prompt tokens, none cached, 12,351 output tokens, largest prompt 193,411. Kept chat, warm cache (KW): 400 steps, 260 verified, 39,923,458 prompt tokens of which 38,728,988 cached, 13,456 output tokens, largest prompt 198,405.</p><h3>The cost of one verified step at list prices</h3><p>Fresh prompt tokens at the input price, cached ones at the cached price, output at the output price, divided by the verified steps of the cell.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*bG2YSNP0V96ls2WR.png" /></figure><p>The same tokens, priced per verified step. Each line gives the rates in dollars a million tokens (input / cached / output), then the cost with AXI’s host-held state, with the kept chat cold (and how many times that is) and with the kept chat warm.</p><p>Gemini 3.8 Flash (0.75 / 0.075 / 3.75): $0.0014 | $0.0870, 61.2 times | $0.0148, 10.4 times.</p><p>Claude Sonnet 5.5 (2 / 0.1 / 10): $0.0038 | $0.2319, 61.2 times | $0.0246, 6.5 times.</p><p>Claude Opus 5.5 (4 / 0.2 / 20): $0.0076 | $0.4638, 61.2 times | $0.0492, 6.5 times.</p><p>Grok 4.3 (1.25 / 0.2 / 2.5): $0.0018 | $0.1448, 79.1 times | $0.0357, 19.5 times.</p><p>Grok 4.7 (2 / 0.5 / 6): $0.0032 | $0.2317, 72.1 times | $0.0840, 26.1 times.</p><p>Per million verified steps that is $3,792 with AXI on Claude Sonnet 5.5 against $231,887 for the kept chat cold and $24,602 warm; $1,830 against $144,788 and $35,664 on Grok 4.3; $1,422 against $86,957 and $14,811 on Gemini 3.8 Flash.</p><p>Counting every step, right or wrong, so that the gap is the tokens alone: 51.4 times cold and 4.2 times warm on Claude, 66.5 and 12.7 on Grok 4.3, 51.4 and 6.8 on Gemini.</p><h3>Where the prices come from</h3><ul><li>Google: the rates in Google’s own billing report (input 0.75, cached 0.075, output 3.75).</li><li>Anthropic: the model pricing table at platform.claude.com/docs/en/about-claude/pricing, read on 26 Nov 2026. Claude Sonnet 5.5: input $2, cache hits $0.10, output $10. Claude Opus 5.5: $4, $0.20, $20.</li><li>xAI: docs.x.ai/docs/pricing, “Last updated: October 10, 2026”. Grok 4.3 under 200k tokens: input $1.25, cached $0.20, output $2.50. Grok 4.7: $2, $0.50, $6.</li></ul><p>The same arithmetic on Google’s rates gives back the figures of the Google page ($0.0014, $0.0870, $0.0148), which is the check that the method is the same.</p><h3>What the arithmetic assumes</h3><ul><li>The token counts are Gemini’s. A different model counts a different number of tokens for the same text (Anthropic’s page says its newer tokenizer gives about 30 percent more). Both arms scale together, so the ratios move little; the dollars would move.</li><li>On Claude, the fresh tokens of the warm kept chat are priced at the base input price. Anthropic charges cache writes at 1.25 times base on top; adding that would raise the kept chat’s warm figure. It is not added here.</li><li>No step reaches a long-context tier: the largest prompt of the kept chat is 198,405 tokens and Grok’s higher rates start at 200,000.</li><li>No Anthropic or xAI bill was read, and the job was not run on their models. A run on them would replace the Gemini token counts and step counts with their own; this page is the arithmetic that those would be multiplied by.</li></ul><h3>Meta’s Llama</h3><p>Llama is open-weight and priced by whoever serves it, so there is no single list price. What it shares with every host is the memory of the cache: 2 times layers times key-value heads times head size times 2 bytes per token, which is 131,072 bytes for Llama 3.1 8B and 327,680 for 70B (public configurations). At the mean prompt of each arm (1,177 tokens for A, 97,353 for the kept chat) a session takes 154.3 MB against 12.76 GB on 8B, and 385.7 MB against 31.90 GB on 70B: 82.7 times. Llama 3.1’s window is 131,072 tokens and the kept chat of this job passes it at step 264.</p><h3>Check it</h3><p>Every figure above is recomputed by a test from the saved result files and a small file of prices, with no model call: <a href="https://github.com/gaurshalendra2412/axi-runtime/blob/main/docs/PRICE_CHECK.md">PRICE_CHECK.md</a> and python/tests/test_price_check.py. To use other prices, change the numbers in docs/results/price_check.json. The repository: <a href="https://github.com/gaurshalendra2412/axi-runtime">github.com/gaurshalendra2412/axi-runtime</a>.</p><p><em>Originally published at </em><a href="https://dev.to/shalendra_gaur_ecd0567a49/axi-at-claude-grok-and-gemini-list-prices-61x-to-79x-cheaper-per-verified-step-than-a-kept-chat-i5j"><em>https://dev.to</em></a><em> on November 26, 2026.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=dc2f4a34b08f" width="1" height="1" alt=""><hr><p><a href="https://medium.com/thecinderellaproject/axi-at-claude-grok-and-gemini-list-prices-61x-to-79x-cheaper-per-verified-step-than-a-kept-chat-dc2f4a34b08f">AXI at Claude, Grok and Gemini list prices: 61x to 79x cheaper per verified step than a kept chat…</a> was originally published in <a href="https://medium.com/thecinderellaproject">thecinderellaproject</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[LLM agent cost per verified step, checked against Google’s own bill (Gemini 3.8]]></title>
            <link>https://medium.com/thecinderellaproject/llm-agent-cost-per-verified-step-checked-against-googles-own-bill-gemini-3-8-2921460dfcba?source=rss----78e703a1065b---4</link>
            <guid isPermaLink="false">https://medium.com/p/2921460dfcba</guid>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[large-language-models]]></category>
            <dc:creator><![CDATA[Shalendra gaur]]></dc:creator>
            <pubDate>Wed, 25 Nov 2026 22:38:44 GMT</pubDate>
            <atom:updated>2026-11-26T08:39:21.332Z</atom:updated>
            <content:encoded><![CDATA[<h3>AXI: $0.0014 per verified LLM agent step vs $0.0870 for a kept chat (61x cold, 10.4x warm), checked on Google’s own bill</h3><p>AXI, the host-side layer by Rajnish Choubey, cost $0.0014 per verified step on Gemini 3.8 Flash. The same job with the chat kept cost $0.0870 per verified step with the cache cold (61 times AXI) and $0.0148 with the cache warm (10.4 times). At Google’s own rates, the day’s total on Google’s billing report came within 1.3 percent of the logged total ($29.45 against $29.09).</p><p>Every cost figure I had published was a token count from my own logs times a price I typed in. A reader fairly asked what the provider’s bill says. This is that check, on Gemini 3.8 Flash.</p><p>AXI is a layer on the host side, between a model and the state it edits. The host holds the exact state, the model proposes one change per step, a deterministic check admits or refuses it, and the prompt is rebuilt short from the held state at every step. The model is unchanged. It is for the company that runs the model, not for end users, and it fits any LLM application that holds state, short jobs and long, from the first step. The architecture is by Rajnish Choubey. The tests and measurements are mine, run with an AI assistant as a tool. I am not affiliated with Google. (“AXI” here is not the ARM AMBA chip-bus protocol.)</p><h3>The job and the three ways of holding the state</h3><p>One job of 400 steps that edits a state, one change per step. Three ways of holding the state:</p><ul><li><strong>A:</strong> the host holds the state as data and rebuilds a short prompt each step (AXI).</li><li><strong>KC:</strong> the whole chat is kept and the cache is cold.</li><li><strong>KW:</strong> the whole chat is kept and the cache is warm (97.0 percent of its prompt tokens were read from the cache).</li></ul><p>A verified step is a step after which the held state equals the true state.</p><h3>What Google’s report says about the rates</h3><p>In Google’s billing report (Cloud console, Billing, Reports, grouped by SKU) an output token costs 5.000 times an input token and a cached token costs 0.100 of an input token. Those are the prices I had typed: $0.75 a million input tokens, $3.75 a million output tokens, and a cached token at a tenth of the input price. The ratios do not depend on any exchange rate. The report is in rupees and prints no rate; the typed $0.75 is ₹71.42 on the report, so ₹95.23 to the dollar.</p><h3>What it says about the totals</h3><ul><li><strong>22 November, the cache pair test (A and KC ran that day):</strong> Google charged ₹2,805.00, about $29.45. My logs gave $29.09. Google’s figure is 1.25 percent higher.</li><li><strong>2 to 3 November, an earlier test:</strong> ₹168.92, about $1.77, against $1.75 from the logs (1.1 percent).</li></ul><p>Google’s day holds 490,025 more input tokens (1.27 percent) and 5,206 more output tokens (7.45 percent) than my logs for those two runs. The bill does not say whether those are calls my logs lack or a difference in counting.</p><h3>What a verified step costs at those rates</h3><p>In each row, A is the state held by the host, KC is the chat kept with the cache cold, and KW is the chat kept with the cache warm.</p><ul><li><strong>prompt tokens in the job.</strong> A 470,669; KC 37,967,655; KW 39,923,458.</li><li><strong>verified steps.</strong> A 400; KC 328; KW 260.</li><li><strong>dollars per verified step.</strong> A $0.0014; KC $0.0870; KW $0.0148.</li><li><strong>times A.</strong> A 1; KC 61.2; KW 10.4.</li><li><strong>dollars per step, every step counted, right or wrong.</strong> A $0.0014; KC $0.0731; KW $0.0096.</li><li><strong>times A, wrongness ignored.</strong> A 1; KC 51.4; KW 6.8.</li></ul><p>The last two rows leave out whether a step was right: the same tokens divided by every step the cell ran, so the gap there is the tokens alone. At a million verified steps that is about $1,422 held by the host, $86,957 with the chat kept cold and $14,811 with it kept warm (each from the table’s cost rounded less).</p><p>The kept chat’s prompt grows every turn. The prompt rebuilt from the held state stays near 1,200 tokens, about 1,177 on average here, because it follows the size of the state and not the number of steps.</p><h3>What the bill does not show</h3><ul><li>A and KC ran on the same day, so the bill gives their total, not each arm.</li><li>KW’s figure is worked out from its tokens at Google’s cached price. It is not a line of its own on the bill, because that run was one of several on other days.</li><li>This is one model, one paid account, one month. The lines are Google’s, copied by hand from the report table, with account and project identifiers left out.</li></ul><h3>Check it</h3><p>The report lines, the arithmetic and a test that recomputes every figure above are in the repository: <a href="https://github.com/gaurshalendra2412/axi-runtime/blob/main/docs/BILLING_CHECK.md">BILLING_CHECK.md</a>. To read Google’s side yourself, open Billing, Reports in the Cloud console, group by SKU, set the dates, and compare the table with the saved lines. The repository: <a href="https://github.com/gaurshalendra2412/axi-runtime">github.com/gaurshalendra2412/axi-runtime</a>.</p><p><em>Originally published at </em><a href="https://dev.to/shalendra_gaur_ecd0567a49/llm-agent-cost-per-verified-step-checked-against-googles-own-bill-gemini-38-flash-61-times-43f7"><em>https://dev.to</em></a><em> on November 25, 2026.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2921460dfcba" width="1" height="1" alt=""><hr><p><a href="https://medium.com/thecinderellaproject/llm-agent-cost-per-verified-step-checked-against-googles-own-bill-gemini-3-8-2921460dfcba">LLM agent cost per verified step, checked against Google’s own bill (Gemini 3.8</a> was originally published in <a href="https://medium.com/thecinderellaproject">thecinderellaproject</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What replaying an agent’s history costs the host: Nebius and WEKA numbers, and a layer that…]]></title>
            <link>https://medium.com/thecinderellaproject/what-replaying-an-agents-history-costs-the-host-nebius-and-weka-numbers-and-a-layer-that-removes-b5767d6cc065?source=rss----78e703a1065b---4</link>
            <guid isPermaLink="false">https://medium.com/p/b5767d6cc065</guid>
            <category><![CDATA[large-language-models]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <dc:creator><![CDATA[Shalendra gaur]]></dc:creator>
            <pubDate>Wed, 25 Nov 2026 13:25:08 GMT</pubDate>
            <atom:updated>2026-11-26T08:46:27.447Z</atom:updated>
            <content:encoded><![CDATA[<h3>What replaying an agent’s history costs the host (Nebius and WEKA numbers), and how AXI removes the replay</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*t6RrZsZ3cIOj1dO4.png" /></figure><p>Every turn of an agent loop is a new request, and its prompt carries the whole session so far. Two public sources from this autumn put numbers on what that costs the company that runs the model.</p><h3>What the host pays for the replay</h3><p><strong>Nebius and WEKA, 24 September 2026.</strong> One eight-GPU NVIDIA HGX B300 node serving DeepSeek-V4-Pro with vLLM, replaying real agentic coding traffic (a pool of 512 active sessions drawn from more than 5,000 captured sessions) for eight hours per configuration. With GPU memory only: a 40% cache hit rate, 33,900 uncached prefill tokens per request, 44% of requests with a first token under 5 seconds, and 46,000 output tokens per GPU-hour. With WEKA’s shared cache tier added: 93%, 4,400, 97%, and 169,000 (3.7 times). WEKA’s write-up of 16 November 2026 adds that 60% of prefill work was recomputed on the memory-only node and 6.8% with the tier.</p><p><strong>SemiAnalysis AgentX.</strong> The AgentX v1.0 dataset holds 393 real Claude Code sessions. The median request carries 142,016 input tokens and produces 444 output tokens, and 44% of the sessions contain subagents.</p><p>That is how the bill is built: the input side follows the length of the replayed history, and a faster cache tier lowers the price of each replay.</p><h3>The other lever: do not replay</h3><p>AXI is a layer on the host side, between the model and the state it edits. The host holds the exact state. The model proposes one change per step in a small strict language, a deterministic check admits or refuses it, and the next prompt is rebuilt, short and of fixed size, from the held state. The prompt follows the size of the state, not the number of steps. The model is unchanged.</p><p>It is for the company that runs the model, not for end users, and it fits any LLM application that holds state: agents, chat, workflows, short jobs and long, from the first step. The architecture is by Rajnish Choubey. The tests and measurements are mine, run with an AI assistant as a tool.</p><p>What was measured, each figure in its own setup:</p><ul><li><strong>Qwen2.5-14B-Instruct-AWQ, vLLM 0.31.0, one L4, prefix caching on, three 600-step jobs:</strong> 413.7 prompt tokens a step with the exact state held by the host; 8,228.8 with the whole chat kept (all three kept chats reached the 16,000-token limit between steps 367 and 418); 2,334.2 with a running summary.</li><li><strong>Gemini 3.8 Flash, 400 turns:</strong> 99,809 prompt tokens a turn with the chat kept against 1,177 with the layer (85 times fewer). Median first token past 150,000 prompt tokens: 5.57 s against 2.41 s.</li><li><strong>Gemini 3.8 Flash, 1,500 steps:</strong> with the layer the state was exact on 1,500 of 1,500 steps, at about 2,824 prompt tokens a step. With the chat kept, the mean prompt was 476,835 tokens over the 457 turns it ran, and a company applying the replies as they came lost the state for good at turn 287. Median first token: 9.13 s (kept chat, prompts of 500,000 tokens and more) against 2.27 s (all steps with the layer).</li><li><strong>A 7B model on one L4:</strong> the prompt never went above 660 tokens over 80,000 steps, and all 80,000 states were exact.</li><li><strong>Memory on a Google TPU v6e-1 chip</strong> (33.5 GB, cache-shaped arrays, no model run): a kept chat at the mean length of the 1,500-step job takes the memory of about 169 AXI-sized sessions.</li></ul><h3>Reading the two sets of numbers together</h3><p>They come from different workloads. Nebius and WEKA replayed captured coding sessions. Ours are generated jobs in which every step is compared with an exact answer. They are not a head-to-head; they show one shape from two sides. Where the history is replayed, cost and first-token time follow the number of steps. Where the host holds the state and rebuilds the prompt, they follow the size of the state.</p><h3>What is checkable</h3><p>The repository holds the tests, the saved results and a small sidecar that shows how the layer sits in front of a vLLM or SGLang server. The headline numbers can be re-checked in a few seconds, with no key, no model and no GPU: <a href="https://github.com/gaurshalendra2412/axi-runtime">github.com/gaurshalendra2412/axi-runtime</a>. The test pages behind the figures above: <a href="https://github.com/gaurshalendra2412/axi-runtime/blob/main/docs/MEMORY_ARMS_TEST.md">memory arms</a>, <a href="https://github.com/gaurshalendra2412/axi-runtime/blob/main/docs/GEMINI_LONG_TEST.md">1,500-step Gemini job</a>, <a href="https://github.com/gaurshalendra2412/axi-runtime/blob/main/docs/TPU_SESSIONS_TEST.md">TPU sessions</a>, <a href="https://github.com/gaurshalendra2412/axi-runtime/blob/main/docs/ENDURANCE_7B_TEST.md">80,000-step 7B run</a>, <a href="https://github.com/gaurshalendra2412/axi-runtime/blob/main/docs/AXI_TECHNICAL_REFERENCE.md">technical reference</a>.</p><h3>Sources</h3><ul><li>Nebius, <a href="https://nebius.com/blog/posts/nebius-weka-shared-kv-cache-benchmark-hgx-b300">“Nebius and WEKA benchmark distributed KV cache for agentic inference on NVIDIA HGX B300”</a> (24 September 2026).</li><li>WEKA, <a href="https://hpcwire.com/off-the-wire/weka-new-research-challenges-gpu-utilization-as-measure-of-inference-infrastructure">“New Research Challenges GPU Utilization as Measure of Inference Infrastructure”</a> (16 November 2026).</li><li>SemiAnalysis, <a href="https://inferencex.semianalysis.com/blog/agentic-benchmark-agent-benchmark-guide">“Agentic Benchmark for LLM Inference: Metrics and Methodology”</a>.</li></ul><p>Architecture: Rajnish Choubey. Tests and measurements: Shalendra Gaur, with an AI assistant as a tool. Not affiliated with Nebius, WEKA, SemiAnalysis, Google or the vLLM project.</p><p><em>Originally published at </em><a href="https://dev.to/shalendra_gaur_ecd0567a49/what-replaying-an-agents-history-costs-the-host-nebius-and-weka-numbers-and-a-layer-that-removes-9f0"><em>https://dev.to</em></a><em> on November 25, 2026.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b5767d6cc065" width="1" height="1" alt=""><hr><p><a href="https://medium.com/thecinderellaproject/what-replaying-an-agents-history-costs-the-host-nebius-and-weka-numbers-and-a-layer-that-removes-b5767d6cc065">What replaying an agent’s history costs the host: Nebius and WEKA numbers, and a layer that…</a> was originally published in <a href="https://medium.com/thecinderellaproject">thecinderellaproject</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[LLM agent token cost and state drift: the fixes compared, with authors, papers and measured numbers]]></title>
            <link>https://medium.com/thecinderellaproject/llm-agent-token-cost-and-state-drift-the-fixes-compared-with-authors-papers-and-measured-numbers-e21daf29f407?source=rss----78e703a1065b---4</link>
            <guid isPermaLink="false">https://medium.com/p/e21daf29f407</guid>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[software-architecture]]></category>
            <category><![CDATA[large-language-models]]></category>
            <dc:creator><![CDATA[Shalendra gaur]]></dc:creator>
            <pubDate>Wed, 25 Nov 2026 13:24:57 GMT</pubDate>
            <atom:updated>2026-11-26T08:45:04.189Z</atom:updated>
            <content:encoded><![CDATA[<h3>LLM agent token cost and state drift: the fixes compared with authors and papers, and where AXI sits (measured)</h3><p><strong>Short answer.</strong> Agent cost climbs when the whole chat is resent every turn, and state drifts when the chat is the only record of what the agent did. Six families of fixes exist: external memory, typed state with checkpoints, structured output, prompt compression, context folding, and host-held state with a gate. They solve different problems and combine well. This page lists each with its authors and paper or project, says what it is best for, and gives the measured numbers for the host-held-state one, AXI.</p><p><em>Naming note: “AXI” here is the AXI host-side runtime for LLM agents, an architecture by Rajnish Choubey. It is not the ARM AMBA AXI chip-bus protocol.</em></p><h3>Why does an agent’s token cost grow with every step?</h3><p>The model is stateless, so each turn the host sends the instructions, every earlier call and every earlier tool result again. A tool result that is 4 KB costs 4 KB on the turn it arrives and again on every turn after. Over <em>n</em> turns the total sent grows with the square of <em>n</em>, and the time to the first token grows with the prompt. Prompt caching lowers the price of the repeated part; it does not shorten the prompt.</p><h3>Why does the state drift after hundreds of steps?</h3><p>If the chat is the record, the record is whatever the model last wrote about it. A reply that leaves one thing out (a missing edge, a dropped constraint) is applied as written, nothing checks it again, and the next prompt carries the mistake forward.</p><h3>The fixes compared</h3><ul><li><strong>External memory.</strong> What it changes: Facts live in a store the agent reads and writes by tool call. Projects, papers, authors: MemGPT, now Letta (<a href="https://arxiv.org/abs/2310.08560">Packer, Wooders, Lin, Fang, Patil, Stoica, Gonzalez, 2023</a>); Mem0; Zep and Graphiti. Best for: What the agent should remember about users and past work.</li><li><strong>Typed state and checkpoints.</strong> What it changes: The graph’s state is a typed object saved after each step. Projects, papers, authors: LangGraph (LangChain). Best for: Workflow control, recovery and human-in-the-loop steps.</li><li><strong>Structured output.</strong> What it changes: One reply is well formed. Projects, papers, authors: Instructor (validate and retry); Outlines by .txt (constrained decoding; Willard and Louf); BAML by BoundaryML (schema-aligned parsing); Pydantic AI (typed agents); DSPy (Khattab et al., programs of language-model modules). Best for: Getting parseable, typed answers.</li><li><strong>Prompt compression.</strong> What it changes: The prompt has fewer tokens. Projects, papers, authors: LLMLingua (Jiang, Wu, Lin, Yang, Qiu; Microsoft Research). Best for: Long documents and verbose tool output.</li><li><strong>Context folding.</strong> What it changes: Old turns are rendered shorter, the history is kept. Projects, papers, authors: <a href="https://arxiv.org/abs/2610.07863">ReFold</a> (Su, Tian, Zhang, Kundu): reports up to 2.5x fewer tokens on five coding benchmarks. Best for: Coding agents with long transcripts.</li><li><strong>Host-held state with a gate.</strong> What it changes: The host holds the exact state; the model proposes one change per step; the host checks, repairs and commits. Projects, papers, authors: <a href="https://arxiv.org/abs/2605.29313">PatchBoard</a> (Zhang, Shi, Zhang, Zhao, Wang; JSON Patch on shared state; 84.6% success on 630 ALFWorld episodes); <a href="https://arxiv.org/abs/2607.05483">PatchOptic</a> (Bai and Cai; projected views and verified updates); AXI (Rajnish Choubey). Best for: An edited state that must stay exactly right, with a prompt that does not grow.</li></ul><p>The first five rows are about what the model reads or how it answers. The last row is about who owns the state. AXI can sit beside or under the others: a typed-output library can make the model’s reply parse, and the AXI gate then decides whether that reply may change the state. Different papers use different tasks, so their numbers are not comparable with each other.</p><h3>How does AXI work?</h3><p>AXI is a layer on the host side, between a model and the state it edits. The model is unchanged. At every step the model sees a short prompt built from the held state and proposes one change in a small strict language. A reply the strict parser cannot read is refused and asked again, up to twice. A gate checks the proposal against the rules, a repair rule completes what the rules can complete (deleting a service also removes the edges attached to it), and the commit is all or nothing. The next prompt is built from the new state, so its size follows the size of the state and not the number of steps.</p><h3>What did AXI measure?</h3><p>On one job of 4,000 requests, Gemini 3.8 Flash’s own replies were exactly right 3,954 times (98.85 percent). The state the host held was exactly right on all 4,000 steps. The 46 replies that were not exactly right all left out the same thing, the attached edges of a deleted service, and a fixed rule completed them.</p><ul><li><strong>400-turn conversation job, prompt tokens per turn.</strong> Chat kept: 99,809 on average (10,600 in the first tenth, 188,806 in the last). AXI: 1,177, 85 times fewer.</li><li><strong>Same job, first token (median).</strong> Chat kept: 5.57 s once the prompt passed 150,000 tokens. AXI: 2.41 s over all 400 steps.</li><li><strong>1,500-step job, prompt tokens per step.</strong> Chat kept: 476,835 on average, 949,591 at most. AXI: 2,824 on average, flat, 169 times fewer.</li><li><strong>1,500-step job, state exactly right.</strong> Chat kept: through turn 286, wrong from turn 287. AXI: 1,500 of 1,500 steps.</li></ul><p>On an open 7B model (Qwen2.5–7B-Instruct-AWQ, vLLM, one NVIDIA L4) the held state was exactly right on 80,000 of 80,000 steps with a prompt of about 620 tokens, 660 at most. On the same card, 256 sessions at once gave 105,230 exact steps per GPU hour at 2.458 J per exact step. Through the gate, none of 1,401,041 injected hostile proposals committed. Each figure has a page and a run file in the repository.</p><h3>Which fix should I use?</h3><ul><li>You want the agent to remember facts across sessions: external memory (Letta, Mem0, Zep).</li><li>You want workflow control and recovery: LangGraph checkpoints.</li><li>You want well-formed replies: Instructor, Outlines, BAML, Pydantic AI.</li><li>You want a shorter prompt: LLMLingua or ReFold.</li><li>You want an edited state to stay exactly right while a model proposes changes, with the same prompt size at step 1 and at step 10,000: host-held state with a gate, which is what AXI measures and what PatchBoard and PatchOptic explore from their own side.</li></ul><h3>Check it yourself</h3><p>No key, no GPU, about 3 seconds. It replays the saved replies of the 4,000-step run and recomputes the held state with the repository’s own code.</p><pre>git clone https://github.com/gaurshalendra2412/axi-runtime<br>cd axi-runtime/python<br>python3 quickstart_replay.py</pre><p>It prints 4,000 of 4,000, 3,954 of 4,000, 85 of 400 and 4.5 times. Or open the <a href="https://colab.research.google.com/github/gaurshalendra2412/axi-runtime/blob/main/python/colab/axi_try_it.ipynb">one-click Colab notebook</a>. The one-page summary with every table is <a href="https://github.com/gaurshalendra2412/axi-runtime/blob/main/docs/AXI_ONE_PAGE.md">docs/AXI_ONE_PAGE.md</a>; the white paper is <a href="https://doi.org/10.5281/zenodo.23958737">doi.org/10.5281/zenodo.23958737</a> and the technical report is <a href="https://doi.org/10.5281/zenodo.24508592">doi.org/10.5281/zenodo.24508592</a>.</p><p><em>Architecture by Rajnish Choubey. Tests built and run by Shalendra Gaur, working with an AI coding assistant that is a tool, not an author. Not affiliated with the projects named above.</em></p><p><em>Originally published at </em><a href="https://dev.to/shalendra_gaur_ecd0567a49/llm-agent-token-cost-and-state-drift-the-fixes-compared-with-authors-papers-and-measured-numbers-2ae2"><em>https://dev.to</em></a><em> on November 25, 2026.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e21daf29f407" width="1" height="1" alt=""><hr><p><a href="https://medium.com/thecinderellaproject/llm-agent-token-cost-and-state-drift-the-fixes-compared-with-authors-papers-and-measured-numbers-e21daf29f407">LLM agent token cost and state drift: the fixes compared, with authors, papers and measured numbers</a> was originally published in <a href="https://medium.com/thecinderellaproject">thecinderellaproject</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[3,954 of 4,000 replies right, 4,000 of 4,000 states exact: a host-side layer on Gemini 3.8 Flash]]></title>
            <link>https://medium.com/thecinderellaproject/3-954-of-4-000-replies-right-4-000-of-4-000-states-exact-a-host-side-layer-on-gemini-3-8-flash-affda3f6019f?source=rss----78e703a1065b---4</link>
            <guid isPermaLink="false">https://medium.com/p/affda3f6019f</guid>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[ai]]></category>
            <dc:creator><![CDATA[Shalendra gaur]]></dc:creator>
            <pubDate>Tue, 24 Nov 2026 20:22:43 GMT</pubDate>
            <atom:updated>2026-11-26T08:43:33.606Z</atom:updated>
            <content:encoded><![CDATA[<h3>AXI on Gemini 3.8 Flash: 3,954 of 4,000 replies right, 4,000 of 4,000 states exact, checkable in seconds</h3><p>On one job of 4,000 requests, Gemini 3.8 Flash’s own replies were exactly right 3,954 times (98.85 percent). The state the host held was exactly right on all 4,000 steps. The model was not changed. The 46 replies that were not exactly right all left out the same thing, and a fixed rule on the host completed them. The 4,000-step figures can be recomputed from the saved replies in a few seconds, with no key; every other figure points to the page and run file that holds it.</p><p>AXI is a layer on the host side, between a model and the state it edits. The architecture is by <strong>Rajnish Choubey</strong>; the tests were built and run by <strong>Shalendra Gaur</strong>, working with an AI coding assistant that is a tool, not an author.</p><h3>What one incomplete reply does</h3><p>One kind of request trips the model: “Delete the service at (x,y), and also remove the edge from … to …”. The job had 129 of them. When the service had other edges attached to it (its dependants), the model deleted the service and the named edge and left some of the attached edges out in 46 of 97 replies. When the request only said “Delete the service”, it named every dependant every time: 472 of 472.</p><p>Applied as written, one such reply leaves edges pointing at a service that no longer exists, and nothing on the host checks it again, so the state stays wrong until a later request happens to overwrite it. In the live run that applied the replies as written, the first of these came at step 16, and the state was off the right one from step 16 to step 104: 89 steps. In all 46 cases the reply was the ideal reply with items left out: nothing added, nothing changed.</p><p>With the host holding the state, the same reply meets a fixed repair rule that adds the attached edges, the commit is all or nothing, and the next prompt is built from the exact state. The model needed no new instruction for this.</p><p>(<a href="https://github.com/gaurshalendra2412/axi-runtime/blob/main/docs/MILLION_TOKEN_TEST_HARD.md">MILLION_TOKEN_TEST_HARD.md</a>)</p><h3>The same replies, three ways of keeping the state</h3><p>Over all 4,000 steps the state the host held was exactly the right one on 4,000 and broken on none, and replaying the saved replies reproduces every saved flag of every step. The run sent 3,661,209 tokens and cost $4.95 at the prices below. The figures that follow take the first 400 requests of the same job.</p><ul><li><strong>Replies applied as written:</strong> 85 of 400 steps with exactly the right state; 223 steps with a broken state; $0.00524 a step with the right state (4.5 times AXI).</li><li><strong>Gate only (refuse a bad reply, otherwise change nothing):</strong> 84 of 400 steps with exactly the right state; 0 with a broken state; $0.00573 a step with the right state (4.9 times AXI).</li><li><strong>AXI (gate, repair, all-or-nothing commit):</strong> 400 of 400 steps with exactly the right state; 0 with a broken state; $0.00117 a step.</li></ul><p>The first two are separate live runs of the same 400 requests in which the model saw its own held state, so their replies differ from the AXI run’s after the first slip; the AXI figures are the first 400 steps of the 4,000-step run. Prices are $0.75 in and $3.75 out per million tokens, with thinking counted as output. A check that refuses a bad reply keeps the state well formed; it does not make it right.</p><h3>How one step works</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*LBZqHj_Cu9zTz107.png" /></figure><p>At every step the model sees a short prompt built from the held state and proposes one change in a small strict language. A reply the strict parser cannot read is refused and asked again, up to twice. The gate checks the proposal against the rules, the repair rule completes what the rules can complete (for example the edges attached to a service that is being deleted), and the commit is all or nothing: the state is the old one or the new one, never half of a change. The prompt for the next step is built from the new state, so its size follows the size of the state and not the number of steps.</p><h3>Cost and time as the job gets long</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*4x2EhE2Na7YcNjas.png" /></figure><p>On that conversation job the chat kept sent 99,809 prompt tokens a turn on average (85 times as many as AXI’s 1,177 a step); in all, 39.9 million tokens against 0.53 million for AXI, with its replies and thinking counted too (76 times fewer). With 97.0 percent of the kept chat’s prompt served from the cache, its first token took a median 5.57 s once the prompt passed 150,000 tokens, against 1.86 s in its first 50 turns, where it was the faster of the two. With AXI the first token took a median 2.41 s over all 400 steps. (<a href="https://github.com/gaurshalendra2412/axi-runtime/blob/main/docs/GEMINI_FUZZY_TEST.md">GEMINI_FUZZY_TEST.md</a>, Test 23)</p><p>The long job is heavier: a dense service graph, a block of 40 log lines with every request, and the chat kept until the next prompt would have passed 950,000 tokens. Results on that 1,500-step job, Gemini 3.8 Flash:</p><ul><li><strong>Prompt tokens a step.</strong> Chat kept: 476,835 on average, 949,591 at most (457 turns, stopped before the next prompt would pass 950,000 tokens). AXI: 2,824 on average, flat over all 1,500 steps (169 times fewer).</li><li><strong>First token, median.</strong> Chat kept: 9.13 s once the prompt passed 500,000 tokens. AXI: 2.27 s over all 1,500 steps.</li><li><strong>State exactly right when each reply is applied as it comes.</strong> Chat kept: through turn 286, wrong on every turn from 287. AXI: 1,500 of 1,500 steps.</li></ul><p>(<a href="https://github.com/gaurshalendra2412/axi-runtime/blob/main/docs/GEMINI_LONG_TEST.md">GEMINI_LONG_TEST.md</a>)</p><h3>Other models, more sessions, hostile input</h3><p>The same layer ran on an open 7B model, Qwen2.5–7B-Instruct-AWQ, served with vLLM on one NVIDIA L4. Each item below is one page in the repository, with its run file and the test that recomputes the figures.</p><ul><li><strong>Four jobs of 20,000 steps, one L4:</strong> 80,000 of 80,000 steps with exactly the right state; prompt about 620 tokens, 660 at most; 0.1605 s a step in the first 2,000 rounds, 0.1651 s in the last 2,000. (<a href="https://github.com/gaurshalendra2412/axi-runtime/blob/main/docs/ENDURANCE_7B_TEST.md">ENDURANCE_7B_TEST.md</a>, Test 43)</li><li><strong>256 sessions at once on the same card:</strong> 25,557 steps, all exact; 105,230 exact steps per GPU hour; 2.458 J per exact step. (<a href="https://github.com/gaurshalendra2412/axi-runtime/blob/main/docs/SESSIONS_PER_CHIP_TEST.md">SESSIONS_PER_CHIP_TEST.md</a>, Test 38)</li><li><strong>10,000,000 hostile proposals through the gate</strong> (Python reference model, on a CPU): none of the 1,401,041 injection proposals committed. (<a href="https://github.com/gaurshalendra2412/axi-runtime/blob/main/docs/GATE_STRESS_TEST.md">GATE_STRESS_TEST.md</a>)</li></ul><p>One card, one quantised model, one seed, synthetic service graphs; each page lists its own limits.</p><h3>Check it yourself</h3><p>Three checks, quickest first. The first needs no key and no account.</p><p><strong>First check: replay the 4,000 steps (about 3 seconds, no key).</strong> It replays the saved replies of the run and recomputes the held state with the repository’s own code.</p><pre>git clone https://github.com/gaurshalendra2412/axi-runtime<br>cd axi-runtime/python<br>python3 quickstart_replay.py</pre><p>Or open the <a href="https://colab.research.google.com/github/gaurshalendra2412/axi-runtime/blob/main/python/colab/axi_try_it.ipynb">one-click notebook in Colab</a>.</p><p><strong>Second check: run the same harness live, with your own Gemini key (a free one is enough).</strong></p><pre>export GEMINI_API_KEY=your-key<br>pip install google-genai numpy<br>python3 live_check.py</pre><p><strong>Third check: a longer live run, or another model.</strong></p><pre>python3 live_check.py --steps 100 --daily-limit 0 --min-interval 0.3<br>python3 live_check.py --model gemini-3.5-flash-lite</pre><p>Full instructions: <a href="https://github.com/gaurshalendra2412/axi-runtime/blob/main/docs/TRY_IT.md">TRY_IT.md</a>.</p><h3>What has been said in public, and what was measured</h3><p>The first part of each item paraphrases a public page; the second part is one result in the repository for the same kind of cost. They are different tasks, not the sources’ own benchmarks.</p><ul><li><strong>Said in public:</strong> Cost and time to first token rise with context; stale context hurts the model; a bigger window does not fix this. (<a href="https://developers.googleblog.com/architecting-efficient-context-aware-multi-agent-framework-for-production/">Google Developers Blog, “Architecting efficient context-aware multi-agent framework for production”, 4 Dec 2025</a>) <strong>Measured with AXI:</strong> 1,500-step job, Gemini 3.8 Flash: chat kept 476,835 prompt tokens a step on average, up to 949,591; AXI 2,824, flat (169 times fewer). First token, median 9.13 s past 500,000 tokens against 2.27 s.</li><li><strong>Said in public:</strong> Implicit caching passes on cost savings; the page gives no latency figure. (<a href="https://ai.google.dev/gemini-api/docs/caching">Gemini API documentation, “Context caching”</a>) <strong>Measured with AXI:</strong> with 97.0 percent of the kept chat’s prompt cached, first token median 5.57 s past 150,000 tokens (1.86 s in the first 50 turns); AXI 2.41 s.</li><li><strong>Said in public:</strong> A developer reports a session growing from about 2K to over 80K tokens in five turns. (<a href="https://discuss.google.dev/t/best-practices-for-handling-context-compaction-and-token-blowup-in-recursive-adk-agent-tool-loops/396215">Google developer forums, ADK thread, 10 Sep 2026</a>) <strong>Measured with AXI:</strong> the prompt is built from the held state, so its size follows the state, not the step count: 7B model, 80,000 steps, prompt near 620 tokens, never above 660.</li><li><strong>Said in public:</strong> About 100 to 1 input to output tokens in agent loops; the KV-cache hit rate is the key production metric. (<a href="https://manus.im/blog/Context-Engineering-for-AI-Agents-Lessons-from-Building-Manus">Manus, “Context Engineering for AI Agents: Lessons from Building Manus”</a>) <strong>Measured with AXI:</strong> conversation job: 39.9 million tokens with the chat kept, 0.53 million with AXI (76 times fewer). 4,000-request run: a step with the right state, replies applied as written, cost 4.5 times AXI’s.</li><li><strong>Said in public:</strong> Across six generation tasks, performance falls 39 percent on average from single-turn to multi-turn. (<a href="https://arxiv.org/abs/2505.06120">Laban, Hayashi, Zhou and Neville, arXiv 2505.06120</a>) <strong>Measured with AXI:</strong> a different task, a state edited step by step. Applied as it comes, the long job’s state was exact until turn 286 and wrong from 287. With AXI: 1,500 of 1,500 steps on that job, 4,000 of 4,000 on the 4,000-step run, 80,000 of 80,000 on the 7B model.</li><li><strong>Said in public:</strong> Context rot: recall from the window declines as it grows; compaction and structured notes are the usual answers. (<a href="https://www.anthropic.com/engineering/effective-context-engineering-for-ai-agents">Anthropic, “Effective context engineering for AI agents”, 29 Sep 2025</a>) <strong>Measured with AXI:</strong> AXI is a third route: nothing is kept in the chat; the host holds the exact state and rebuilds a short prompt every step. The head-to-head with compaction is written and locked before its run (<a href="https://github.com/gaurshalendra2412/axi-runtime/blob/main/docs/COMPACTION_TEST.md">COMPACTION_TEST.md</a>); its result is not in yet.</li></ul><p>No company named here has reviewed or endorsed this work.</p><h3>Who made it, and what this is</h3><p>The architecture is by <strong>Rajnish Choubey</strong>. The tests were built and run by <strong>Shalendra Gaur</strong>, working with an AI coding assistant that is a tool, not an author. This is not affiliated with any model provider, and it has nothing to do with ARM’s AMBA AXI bus.</p><p>AXI is a layer on the host side: the model is unchanged, and every claim on this page is about the state the host holds. Most runs here are one seed and one run per arm on synthetic service graphs; each linked page lists its own limits and what would count against AXI.</p><p>Other groups build commit boundaries around agent state too, with their own settings: Cordon (arXiv 2606.17573) and MemTX (arXiv 2607.23929). These systems have not been run against each other.</p><p><strong>Records and code.</strong></p><ul><li>Technical report: <a href="https://doi.org/10.5281/zenodo.24508592">10.5281/zenodo.24508592</a></li><li>White paper: <a href="https://doi.org/10.5281/zenodo.23958737">10.5281/zenodo.23958737</a></li><li>Repository: <a href="https://github.com/gaurshalendra2412/axi-runtime">github.com/gaurshalendra2412/axi-runtime</a></li></ul><p>Issues are welcome. If a number here does not recompute, please say so there.</p><p>This page is also in the repository as <a href="https://github.com/gaurshalendra2412/axi-runtime/blob/main/docs/AXI_ONE_PAGE.md">AXI_ONE_PAGE.md</a>.</p><p><em>Originally published at </em><a href="https://dev.to/shalendra_gaur_ecd0567a49/3954-of-4000-replies-right-4000-of-4000-states-exact-a-host-side-layer-on-gemini-38-flash-of7"><em>https://dev.to</em></a><em> on November 24, 2026.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=affda3f6019f" width="1" height="1" alt=""><hr><p><a href="https://medium.com/thecinderellaproject/3-954-of-4-000-replies-right-4-000-of-4-000-states-exact-a-host-side-layer-on-gemini-3-8-flash-affda3f6019f">3,954 of 4,000 replies right, 4,000 of 4,000 states exact: a host-side layer on Gemini 3.8 Flash</a> was originally published in <a href="https://medium.com/thecinderellaproject">thecinderellaproject</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>