Tsinghua College and CUHK researchers open-sourced AKV, a serving system for KV cache engineering in LLM brokers. As a substitute of summarizing previous historical past, brokers drop chosen KV cache entries and maintain reusing the remaining. Throughout 3 fashions and 4 agent benchmarks, average cost falls 27.7%. Common activity rating rises 1.7 factors. The code is Apache-2.0 licensed and builds on SGLang.
TL;DR
- What it’s: Serving system plus coverage library, no weights. Examined on GPT-OSS-120B (5.1B energetic), MiniMax-M2.7 (230B whole, 10B energetic) and MiroThinker-1.7-Mini (30B whole, 3B energetic).
- Runs on: NVIDIA GPUs by way of SGLang. Paper used 8 A800-80GB GPUs in BF16. Fast begin serves GPT-OSS-120B on 2 GPUs (tensor parallel 2).
- Efficiency: 27.7% decrease common value and +1.7 factors common rating versus threshold summarization.
- Finest: GPT-OSS-120B on SWE-bench Verified: value per activity 20.0 to 9.7 cents, rating 40.0 to 43.2.
- Worst: MiniMax-M2.7 on BrowseComp-Plus scores 58.9, 3.4 factors beneath Textual content Engineering’s 62.3.
What’s cache engineering, and the way is it totally different from context engineering?
AKV is a Tsinghua serving system that lets LLM brokers drop and reposition their very own KV cache.
Context engineering trims or summarizes the textual content historical past. Enhancing that prefix invalidates each later KV state. The retained suffix should then be re-prefilled. Harnesses subsequently summarize late and aggressively, which may lose particulars from center rounds.
Cache engineering leaves the textual content trajectory untouched. It solely adjustments which KV entries keep seen to consideration. Retained entries are reused with out recomputation. They’ll nonetheless carry data from dropped messages. Within the analysis paper’s value evaluation, KV cache reads made up 82.4% of whole API value.
How does AKV work?
AKV defines 3 cache operations. Append is the usual replace for brand new tokens. Drop removes chosen entries from future consideration with out altering positions. Repos rewrites retained keys to positions 0 by means of r-1 utilizing a RoPE rotation. Values keep unchanged, so no hidden states are recomputed. In ablations, including Repos raised GPT-OSS-120B’s BrowseComp-Plus cross price from 55% to 62%.
The onerous half is serving. Equivalent tokens can produce totally different cache states underneath totally different operation histories. Plain prefix matching might reuse the incorrect states. AKV extends SGLang’s radix tree with drop and reposition nodes. It frees dropped KV solely when no energetic request nonetheless wants it. Phase-batch consideration restores evicted states in 1 prefill cross.
What does the AKV API appear like?
The interface is stateless and OpenAI-compatible. Purchasers ship the complete message historical past and two non-compulsory fields. drop_message maps a set off message index to the messages to drop. reposition lists the indices after which positions get compacted.
A CachePolicy builds these fields from a set off, a selector and a reposition rule. Constructed-in insurance policies are turn-based, token-based or model-based. A CacheTool lets the mannequin name drop_context itself.
How does AKV carry out on agent benchmarks?
The principle coverage is a tool-response rolling drop that retains the most recent 12 device responses. The Normal baseline summarizes at 96K tokens (192K for MiroThinker). Textual content Engineering summarizes at 48K. Benchmarks are BrowseComp-Plus, GAIA-Text, SWE-bench Verified and xbench-DeepSearch-2510.
| Mannequin | Normal rating / value | Textual content Eng. rating / value | AKV rating / value |
|---|---|---|---|
| MiniMax-M2.7 | 52.4 / 5.0 | 52.8 / 5.7 | 53.7 / 4.4 |
| GPT-OSS-120B | 51.0 / 11.2 | 48.3 / 10.2 | 53.1 / 7.3 |
| MiroThinker-1.7-Mini | 44.1 / 20.4 | 37.1 / 18.1 | 45.8 / 14.8 |
Common cross price (%) and price (US cents per activity) throughout 4 benchmarks. Supply: Table 1 of the paper.
AKV additionally cuts value 21.9% versus Textual content Engineering. The accuracy hole opens on lengthy runs. On BrowseComp-Plus at 96K tokens and above, GPT-OSS-120B scores 37% with AKV. Normal scores 24% and Textual content Engineering 32%, per the project page.
Prices are API-equivalent estimates from printed charges. Repositioned tokens are charged on the cache-hit price, a intentionally conservative selection.
<model>
#mtp-akv{–bg:#160a1b;–card:#21102a;–card2:#2b1636;–line:#3f2450;–ink:#f3eaf6;–mute:#b9a4c4;–pur:#660874;–pur2:#a64bbd;–pur3:#d59be6;–grn:#76B900;–warn:#ffb347;
max-width:880px!essential;margin:0 auto!essential;background:var(–bg)!essential;coloration:var(–ink)!essential;border:1px stable var(–line)!essential;border-radius:16px!essential;
font-family:Inter,system-ui,-apple-system,Segoe UI,Roboto,sans-serif!essential;padding:22px 22px 14px!essential;box-sizing:border-box!essential;line-height:1.5!essential;overflow:hidden}
#mtp-akv *{box-sizing:border-box}
#mtp-akv hr,#mtp-akv p:empty,#mtp-akv del,#mtp-akv s{show:none!essential}
#mtp-akv .hd{show:flex;justify-content:space-between;align-items:flex-start;hole:12px;flex-wrap:wrap}
#mtp-akv .tag{font-size:11px;letter-spacing:.12em;text-transform:uppercase;coloration:var(–pur3)!essential;font-weight:700}
#mtp-akv h3{margin:4px 0 2px!essential;font-size:22px!essential;line-height:1.25!essential;coloration:var(–ink)!essential;font-weight:800!essential;border:0!essential;padding:0!essential;background:none!essential}
#mtp-akv .sub{coloration:var(–mute)!essential;font-size:13.5px;margin:0}
#mtp-akv .capsule{background:var(–card2)!essential;border:1px stable var(–line)!essential;border-radius:999px;padding:6px 12px;font-size:12px;coloration:var(–pur3)!essential;white-space:nowrap}
#mtp-akv .tabs{show:flex;hole:6px;margin:16px 0 14px;flex-wrap:wrap}
#mtp-akv .tab{background:var(–card)!essential;coloration:var(–mute)!essential;border:1px stable var(–line)!essential;border-radius:10px;padding:8px 13px;font-size:13px;font-weight:600;cursor:pointer;transition:all .2s}
#mtp-akv .tab:hover{coloration:var(–ink)!essential;border-color:var(–pur2)!essential}
#mtp-akv .tab.on{background:var(–pur)!essential;coloration:#fff!essential;border-color:var(–pur2)!essential;box-shadow:0 0 0 3px rgba(166,75,189,.25)}
#mtp-akv .panel{show:none;background:var(–card)!essential;border:1px stable var(–line)!essential;border-radius:14px;padding:18px;animation:mtpakvIn .35s ease}
#mtp-akv .panel.on{show:block}
@keyframes mtpakvIn{from{opacity:0;rework:translateY(6px)}to{opacity:1;rework:none}}
#mtp-akv .row{show:flex;hole:10px;flex-wrap:wrap;align-items:middle}
#mtp-akv .btn{background:var(–card2)!essential;coloration:var(–ink)!essential;border:1px stable var(–line)!essential;border-radius:9px;padding:7px 12px;font-size:12.5px;font-weight:600;cursor:pointer;transition:all .2s}
#mtp-akv .btn:hover{border-color:var(–pur2)!essential}
#mtp-akv .btn.on{background:var(–pur2)!essential;coloration:#fff!essential;border-color:var(–pur3)!essential}
#mtp-akv .lbl{font-size:12px;coloration:var(–mute)!essential;text-transform:uppercase;letter-spacing:.08em;font-weight:700;margin:14px 0 6px}
#mtp-akv .word{font-size:13px;coloration:var(–mute)!essential;margin:12px 0 0;min-height:40px}
#mtp-akv .word b{coloration:var(–ink)!essential}
/* kv lanes */
#mtp-akv .lane{show:flex;hole:6px;align-items:flex-end;min-height:64px;padding:10px;border-radius:10px;background:var(–bg)!essential;border:1px dashed var(–line)!essential;flex-wrap:wrap}
#mtp-akv .blk{width:60px;top:46px;border-radius:8px;show:flex;flex-direction:column;align-items:middle;justify-content:middle;font-weight:800;font-size:15px;place:relative;transition:all .45s cubic-bezier(.2,.8,.2,1);coloration:#fff!essential}
#mtp-akv .blk small{font-size:9.5px;font-weight:600;opacity:.85}
#mtp-akv .k-u{background:#5a3a6a!essential}#mtp-akv .k-a{background:#7d2f93!essential}#mtp-akv .k-t{background:#a64bbd!essential}#mtp-akv .k-n{background:var(–grn)!essential;coloration:#0d1400!essential}
#mtp-akv .blk.drop{opacity:.18;rework:scale(.86);filter:grayscale(1);define:2px dashed #b9a4c4}
#mtp-akv .blk.re{animation:mtpakvRe .9s ease infinite}
@keyframes mtpakvRe{0%,100%{box-shadow:0 0 0 0 rgba(255,179,71,.0)}50%{box-shadow:0 0 0 4px rgba(255,179,71,.85)}}
#mtp-akv .blk.new{animation:mtpakvPop .5s ease}
@keyframes mtpakvPop{from{rework:scale(.3);opacity:0}to{rework:scale(1);opacity:1}}
#mtp-akv .blk.mv{define:2px stable var(–pur3)}
#mtp-akv .cmp{show:grid;grid-template-columns:1fr 1fr;hole:14px}
#mtp-akv .field{background:var(–card2)!essential;border:1px stable var(–line)!essential;border-radius:12px;padding:12px}
#mtp-akv .field h4{margin:0 0 8px!essential;font-size:14px!essential;coloration:var(–ink)!essential;border:0!essential;padding:0!essential}
#mtp-akv .meter{top:8px;border-radius:6px;background:var(–bg)!essential;overflow:hidden;margin-top:8px}
#mtp-akv .meter i{show:block;top:100%;background:var(–warn)!essential;transition:width .8s ease}
#mtp-akv .mtxt{font-size:11.5px;coloration:var(–mute)!essential;margin-top:4px}
/* bars */
#mtp-akv .bars{show:flex;flex-direction:column;hole:9px}
#mtp-akv .bar{show:grid;grid-template-columns:120px 1fr 70px;hole:10px;align-items:middle;font-size:13px}
#mtp-akv .bar .nm{coloration:var(–mute)!essential}
#mtp-akv .bar .tr{top:22px;border-radius:6px;background:var(–bg)!essential;overflow:hidden}
#mtp-akv .bar .fl{top:100%;width:0;border-radius:6px;transition:width .9s cubic-bezier(.2,.8,.2,1)}
#mtp-akv .bar .v{font-weight:800;text-align:proper;coloration:var(–ink)!essential;font-variant-numeric:tabular-nums}
#mtp-akv .c-s{background:#6b5a73!essential}#mtp-akv .c-t{background:#9c7aa8!essential}#mtp-akv .c-a{background:linear-gradient(90deg,#7d2f93,#d59be6)!essential}
#mtp-akv .grid2{show:grid;grid-template-columns:1fr 1fr;hole:16px}
#mtp-akv enter[type=range]{width:100%;accent-color:#a64bbd}
#mtp-akv .large{font-size:28px;font-weight:800;coloration:var(–pur3)!essential;line-height:1.1}
#mtp-akv .stats{show:grid;grid-template-columns:repeat(4,1fr);hole:10px;margin-top:4px}
#mtp-akv .stat{background:var(–card2)!essential;border:1px stable var(–line)!essential;border-radius:10px;padding:10px}
#mtp-akv .stat span{show:block;font-size:11.5px;coloration:var(–mute)!essential;margin-top:2px}
#mtp-akv ul.lim{margin:0!essential;padding:0!essential;list-style:none!essential}
#mtp-akv ul.lim li{background:var(–card2)!essential;border:1px stable var(–line)!essential;border-left:3px stable var(–warn)!essential;border-radius:8px;padding:9px 12px;margin:0 0 8px!essential;font-size:13.5px;coloration:var(–ink)!essential;cursor:pointer}
#mtp-akv ul.lim li em{show:none;font-style:regular;coloration:var(–mute)!essential;font-size:12.5px;margin-top:4px}
#mtp-akv ul.lim li.open em{show:block}
#mtp-akv pre,#mtp-akv code{background:var(–bg)!essential;coloration:var(–pur3)!essential;border:1px stable var(–line)!essential;border-radius:8px;font-family:ui-monospace,Menlo,Consolas,monospace!essential;font-size:12px!essential}
#mtp-akv pre{padding:10px!essential;margin:10px 0 0!essential;white-space:pre-wrap!essential;overflow:auto}
#mtp-akv code{padding:1px 5px}
#mtp-akv .ft{show:flex;justify-content:space-between;hole:10px;flex-wrap:wrap;font-size:11.5px;coloration:var(–mute)!essential;margin-top:12px}
#mtp-akv .ft a{coloration:var(–pur3)!essential;text-decoration:none}
#mtp-akv .ft .mtp{coloration:#76B900!essential;font-weight:700}
#mtp-akv .lg{show:flex;hole:12px;flex-wrap:wrap;font-size:11.5px;coloration:var(–mute)!essential;margin-top:8px}
#mtp-akv .lg i{show:inline-block;width:10px;top:10px;border-radius:3px;margin-right:5px;vertical-align:-1px}
@media (max-width:640px){
#mtp-akv{padding:16px 14px 12px!essential}
#mtp-akv h3{font-size:18px!essential}
#mtp-akv .cmp,#mtp-akv .grid2{grid-template-columns:1fr}
#mtp-akv .stats{grid-template-columns:repeat(2,1fr)}
#mtp-akv .blk{width:46px;top:40px;font-size:13px}
#mtp-akv .bar{grid-template-columns:86px 1fr 58px;font-size:12px}
#mtp-akv .tab{padding:7px 10px;font-size:12px}
}
</model>
<div class="hd">
<div>
<div class="tag">Tsinghua College · arXiv 2610.28577</div>
<h3>AKV: KV Cache Engineering for LLM Brokers</h3>
<p class="sub">Brokers drop and reposition KV cache as an alternative of rewriting their textual content historical past.</p>
</div>
<div class="capsule">−27.7% avg value · +1.7 pts avg rating</div>
</div>
<div class="tabs" position="tablist">
<button class="tab on" data-t="p1">1 · The thought</button>
<button class="tab" data-t="p2">2 · Cache operations</button>
<button class="tab" data-t="p3">3 · Benchmarks</button>
<button class="tab" data-t="p4">4 · Serving pace</button>
<button class="tab" data-t="p5">5 · Limits</button>
</div>
<!– P1 –>
<div class="panel on" id="mtp-akv-p1">
<div class="row"><button class="btn on" id="mtp-akv-play"> Trim previous device outcome A</button><button class="btn" id="mtp-akv-reset">Reset</button></div>
<div class="cmp" model="margin-top:12px">
<div class="field"><h4>Context engineering (summarize textual content)</h4>
<div class="lane" id="mtp-akv-ce"></div>
<div class="meter"><i id="mtp-akv-cem" model="width:0%"></i></div>
<div class="mtxt" id="mtp-akv-cet">Re-prefill work: 0 blocks</div>
</div>
<div class="field"><h4>Cache engineering (AKV drop)</h4>
<div class="lane" id="mtp-akv-ae"></div>
<div class="meter"><i id="mtp-akv-aem" model="width:0%"></i></div>
<div class="mtxt" id="mtp-akv-aet">Re-prefill work: 0 blocks</div>
</div>
</div>
<p class="word" id="mtp-akv-n1">Each brokers maintain a consumer immediate, assistant turns and power outcomes. Press the button to take away previous device outcome <b>A</b>.</p>
<div class="lg"><span><i model="background:#5a3a6a"></i>Person</span><span><i model="background:#7d2f93"></i>Assistant</span><span><i model="background:#a64bbd"></i>Instrument outcome</span><span><i model="background:#ffb347"></i>Recomputed</span><span><i model="background:#76B900"></i>New flip</span></div>
</div>
<!– P2 –>
<div class="panel" id="mtp-akv-p2">
<div class="row">
<button class="btn" data-op="append">1. Append D</button>
<button class="btn" data-op="drop">2. Drop B</button>
<button class="btn" data-op="repos">3. Repos</button>
<button class="btn" data-op="reset2">Reset</button>
</div>
<div class="lbl">Lively KV cache (quantity = place encoding index)</div>
<div class="lane" id="mtp-akv-ops"></div>
<p class="word" id="mtp-akv-n2">Begin state: tokens A, B, C sit at positions 0, 1, 2. Step by means of the three operations.</p>
<pre id="mtp-akv-req">{"messages": […], "drop_message": {}, "reposition": []}</pre>
</div>
<!– P3 –>
<div class="panel" id="mtp-akv-p3">
<div class="lbl" model="margin-top:0">Mannequin</div>
<div class="row" id="mtp-akv-models"></div>
<div class="lbl">Benchmark</div>
<div class="row" id="mtp-akv-bench"></div>
<div class="grid2" model="margin-top:14px">
<div><div class="lbl" model="margin-top:0">Go price (%) · greater is healthier</div><div class="bars" id="mtp-akv-sc"></div></div>
<div><div class="lbl" model="margin-top:0">Price (US cents per activity) · decrease is healthier</div><div class="bars" id="mtp-akv-co"></div></div>
</div>
<p class="word" id="mtp-akv-n3"></p>
</div>
<!– P4 –>
<div class="panel" id="mtp-akv-p4">
<div class="lbl" model="margin-top:0">Concurrency: <b id="mtp-akv-cv" model="coloration:#f3eaf6">14</b> · GPT-OSS-120B · 80 long-context SWE-bench Verified duties · 8 A800 GPUs</div>
<enter kind="vary" id="mtp-akv-c" min="0" max="4" step="1" worth="3">
<div class="grid2" model="margin-top:12px">
<div><div class="lbl" model="margin-top:0">P95 request latency (s) · decrease is healthier</div><div class="bars" id="mtp-akv-lat"></div></div>
<div><div class="lbl" model="margin-top:0">Output throughput (tokens/s) · greater is healthier</div><div class="bars" id="mtp-akv-out"></div></div>
</div>
<div class="stats" model="margin-top:14px">
<div class="stat"><div class="large">1.18x</div><span>Output throughput, peak vs peak</span></div>
<div class="stat"><div class="large">1.53x</div><span>Enter throughput, peak vs peak</span></div>
<div class="stat"><div class="large">1.51x</div><span>Quicker P95 latency, peak vs peak</span></div>
<div class="stat"><div class="large">2.849ms</div><span>Full consideration per decode step (was 7.082)</span></div>
</div>
<p class="word" id="mtp-akv-n4"></p>
</div>
<!– P5 –>
<div class="panel" id="mtp-akv-p5">
<ul class="lim" id="mtp-akv-lim">
<li>Few supported mannequin households<em>Drop and Repos are enabled for Qwen, GPT-OSS and MiniMax-M2 textual content architectures. Linear consideration fashions are future work.</em></li>
<li>Self-hosted solely<em>You run the AKV server your self. It extends SGLang with cache-operation assist.</em></li>
<li>Self-reported, single {hardware} setup<em>All outcomes come from the authors, on 8 A800-80GB GPUs in BF16.</em></li>
<li>Completely different measurement home windows<em>Excessive-concurrency AKV runs have been measured by means of the primary 30 activity completions. Normal used a 1-hour window.</em></li>
<li>Not each benchmark improves<em>MiniMax-M2.7 on BrowseComp-Plus scores 58.9 with AKV, beneath Textual content Engineering at 62.3.</em></li>
<li>Dropping reasoning cache hurts<em>On SWE-bench Verified, dropping reasoning cache fell to 36.5, and dropping each to 34.5, versus 41.0 for device drop.</em></li>
</ul>
<p class="word">Faucet a row to increase it.</p>
</div>
<div class="ft">
<span>Sources: <a href="https://arxiv.org/abs/2610.28577" goal="_blank" rel="noopener">Paper</a> · <a href="https://github.com/thu-nics/AKV" goal="_blank" rel="noopener">GitHub</a> · <a href="https://fuvty.github.io/thinking_yard_project_page/tasks/akv/" goal="_blank" rel="noopener">Challenge web page</a> · numbers self-reported</span>
<span class="mtp">© Marktechpost</span>
</div>
<script>
(perform(){
var R=doc.getElementById(‘mtp-akv’);
perform $(id){return doc.getElementById(‘mtp-akv-‘+id)}
perform submit(){strive{var h=R.offsetHeight+40;mother or father.postMessage({mtpAkvHeight:h},’*’)}catch(e){}}
R.querySelectorAll(‘.tab’).forEach(perform(b){b.addEventListener(‘click on’,perform(){
R.querySelectorAll(‘.tab’).forEach(perform(x){x.classList.take away(‘on’)});
R.querySelectorAll(‘.panel’).forEach(perform(x){x.classList.take away(‘on’)});
b.classList.add(‘on’);$(b.getAttribute(‘data-t’).change(‘p’,’p’)).classList.add(‘on’);
if(b.getAttribute(‘data-t’)===’p3′)drawBench();
if(b.getAttribute(‘data-t’)===’p4′)drawServe();
setTimeout(submit,60);setTimeout(submit,500);
})});
perform blk(t,cls,sub){var d=doc.createElement(‘div’);d.className=”blk “+cls;d.innerHTML=t+(sub!==undefined?'<small>’+sub+'</small>’:”);return d}
/* P1 */
var seq=[[‘U’,’k-u’],[‘A’,’k-t’],[‘B’,’k-a’],[‘C’,’k-t’],[‘D’,’k-a’]];
perform initP1(){var ce=$(‘ce’),ae=$(‘ae’);ce.innerHTML=”;ae.innerHTML=”;
seq.forEach(perform(s){ce.appendChild(blk(s[0],s[1]));ae.appendChild(blk(s[0],s[1]))});
$(‘cem’).model.width=”0%”;$(‘aem’).model.width=”0%”;$(‘cet’).textContent=”Re-prefill work: 0 blocks”;$(‘aet’).textContent=”Re-prefill work: 0 blocks”;
$(‘n1′).innerHTML=’Each brokers maintain a consumer immediate, assistant turns and power outcomes. Press the button to take away previous device outcome <b>A</b>.’;}
initP1();
var taking part in=false;
$(‘play’).addEventListener(‘click on’,perform(){if(taking part in)return;taking part in=true;initP1();
var ce=$(‘ce’).kids,ae=$(‘ae’).kids;
setTimeout(perform(){ce[1].classList.add(‘drop’);ae[1].classList.add(‘drop’);
$(‘n1′).innerHTML=’Step 1: A is eliminated. Left: the textual content is summarized, so the prefix adjustments.’;},300);
setTimeout(perform(){for(var i=2;i<5;i++)ce[i].classList.add(‘re’);$(‘cem’).model.width=”75%”;$(‘cet’).textContent=”Re-prefill work: 3 blocks (B, C, D recomputed)”;
$(‘n1′).innerHTML=’Step 2: <b>Context engineering</b> should re-prefill every little thing after the edit. <b>AKV</b> solely hides A from consideration.’;},1300);
setTimeout(perform(){for(var i=2;i<5;i++)ce[i].classList.take away(‘re’);
var n1=blk(‘E’,’k-n new’);var n2=blk(‘E’,’k-n new’);$(‘ce’).appendChild(n1);$(‘ae’).appendChild(n2);
$(‘aet’).textContent=”Re-prefill work: 0 blocks (B, C, D reused)”;
$(‘n1′).innerHTML=’Step 3: each append new flip E. AKV reused B, C and D as-is, they usually nonetheless carry what they realized from A.’;taking part in=false;submit();},3000);
});
$(‘reset’).addEventListener(‘click on’,perform(){taking part in=false;initP1()});
/* P2 */
var st;perform initP2(){st={toks:[[‘A’,0],[‘B’,1],[‘C’,2]],dropped:{},subsequent:3,stage:0,drop:{},rep:[]};renderP2();
$(‘n2′).innerHTML=’Begin state: tokens A, B, C sit at positions 0, 1, 2. Step by means of the three operations.’;$(‘req’).textContent=”{"messages": [m0:A, m1:B, m2:C], "drop_message": {}, "reposition": []}”;}
perform renderP2(mark){var L=$(‘ops’);L.innerHTML=”;st.toks.forEach(perform
var b=blk(t[0],c,’pos ‘+t[1]);if(st.dropped[t[0]])b.classList.add(‘drop’);if(mark&&mark.indexOf(t[0])>-1)b.classList.add(mark===’D’?’new’:’mv’);L.appendChild(b)});submit();}
initP2();
R.querySelectorAll(‘[data-op]’).forEach(perform(b){b.addEventListener(‘click on’,perform(){var op=b.getAttribute(‘data-op’);
R.querySelectorAll(‘[data-op]’).forEach(perform(x){x.classList.take away(‘on’)});b.classList.add(‘on’);
if(op===’reset2′){initP2();b.classList.take away(‘on’);return}
if(op===’append’){if(st.toks.some(perform
st.toks.push([‘D’,st.next]);st.subsequent++;renderP2(‘D’);
$(‘n2′).innerHTML='<b>Append</b>: D is computed towards the energetic cache and takes the subsequent place index.’;
$(‘req’).textContent=”{"messages": [m0:A, m1:B, m2:C, m3:D], "drop_message": {}, "reposition": []}”;}
if(op===’drop’){if(!st.toks.some(perform
$(‘n2′).innerHTML='<b>Drop</b>: B leaves future consideration. Positions don’t change, and the textual content historical past retains B.’;
$(‘req’).textContent=”{"messages": [m0..m3], "drop_message": {"3": [1]}, "reposition": []}”;}
if(op===’repos’){if(!st.dropped.B){$(‘n2′).innerHTML=’Drop B first, so there’s a hole to compact.’;return}
var p=0;st.toks.forEach(perform
st.toks=st.toks.filter(perform
$(‘n2’).innerHTML='<b>Repos</b>: retained keys are re-rotated (RoPE) to positions 0 to ‘+(p-1)+’. Values are untouched, so nothing is recomputed.’;
$(‘req’).textContent=”{"messages": [m0..m3], "drop_message": {"3": [1]}, "reposition": [3]}”;}
})});
/* P3 */
var M={‘MiniMax-M2.7’:{s:[[58.9,35.0,75.2,40.5,52.4],[62.3,36.9,72.0,40.0,52.8],[58.9,40.8,74.4,40.5,53.7]],c:[[5.2,2.4,7.0,5.5,5.0],[5.3,2.7,9.4,5.2,5.7],[4.8,2.6,5.5,4.7,4.4]]},
‘GPT-OSS-120B’:{s:[[57.5,68.0,40.0,38.5,51.0],[52.7,65.1,36.8,38.5,48.3],[61.9,69.9,43.2,37.5,53.1]],c:[[13.1,5.4,20.0,6.2,11.2],[12.6,6.8,15.8,5.4,10.2],[11.4,4.1,9.7,3.8,7.3]]},
‘MiroThinker-1.7-Mini’:{s:[[60.0,68.0,7.8,40.5,44.1],[45.7,66.0,4.2,32.5,37.1],[63.5,68.9,7.4,43.5,45.8]],c:[[25.2,9.2,33.6,13.5,20.4],[17.6,11.0,28.4,15.3,18.1],[15.3,9.5,26.3,8.1,14.8]]}};
var B=[‘BrowseComp-Plus’,’GAIA-Text’,’SWE-bench Verified’,’xbench-DS’,’Average’];var mSel=”GPT-OSS-120B”,bSel=4;
var NM=[‘Standard’,’Text Eng.’,’AKV’],CL=[‘c-s’,’c-t’,’c-a’];
Object.keys(M).forEach(perform(ok){var b=doc.createElement(‘button’);b.className=”btn”+(ok===mSel?’ on’:”);b.textContent=ok;b.onclick=perform(){mSel=ok;$(‘fashions’).querySelectorAll(‘.btn’).forEach(perform(x){x.classList.toggle(‘on’,x===b)});drawBench()};$(‘fashions’).appendChild(b)});
B.forEach(perform(ok,i){var b=doc.createElement(‘button’);b.className=”btn”+(i===bSel?’ on’:”);b.textContent=ok;b.onclick=perform(){bSel=i;$(‘bench’).querySelectorAll(‘.btn’).forEach(perform(x){x.classList.toggle(‘on’,x===b)});drawBench()};$(‘bench’).appendChild(b)});
perform bars(el,vals,max,fmt){el.innerHTML=”;vals.forEach(perform(v,i){var r=doc.createElement(‘div’);r.className=”bar”;
r.innerHTML='<div class="nm">’+NM[i]+'</div><div class="tr"><div class="fl ‘+CL[i]+’"></div></div><div class="v">’+fmt(v)+'</div>’;el.appendChild(r);
(perform(f,w){setTimeout(perform(){f.model.width=w+’%’},40)})(r.querySelector(‘.fl’),Math.max(2,v/max*100));});}
perform drawBench(){var d=M[mSel];var s=d.s.map(perform(r){return r[bSel]}),c=d.c.map(perform(r){return r[bSel]});
bars($(‘sc’),s,100,perform(v){return v.toFixed(1)});bars($(‘co’),c,Math.max.apply(null,c)*1.1,perform(v){return v.toFixed(1)+’¢’});
var ds=(s[2]-s[0]).toFixed(1),dc=((c[2]/c[0]-1)*100).toFixed(1);
$(‘n3′).innerHTML='<b>’+mSel+’ · ‘+B[bSel]+'</b>: AKV vs Normal is ‘+(ds>=0?’+’:”)+ds+’ factors and ‘+(dc>0?’+’:”)+dc+’% value. Supply: Desk 1, self-reported.’;submit();}
/* P4 */
var C=[8,10,12,14,16],LAT=[[43.57,45.03,43.16,108.86,229.90],[43.57,50.27,52.82,60.67,69.96],[25.93,27.11,27.18,28.49,30.63]],OUT=[[217,254,313,146,138],[228,246,264,267,267],[245,295,339,369,369]];
perform drawServe(){var i=+$(‘c’).worth;$(‘cv’).textContent=C[i];
bars($(‘lat’),LAT.map(perform(r){return r[i]}),235,perform(v){return v.toFixed(2)+’s’});
bars($(‘out’),OUT.map(perform(r){return r[i]}),380,perform(v){return v});
var x=(LAT[0][i]/LAT[2][i]).toFixed(2);
$(‘n4’).innerHTML=’At concurrency ‘+C[i]+’, AKV P95 latency is <b>’+x+’x</b> sooner than Normal. ‘+(i>=3?’Above 12, KV strain forces Normal into re-prefill, so its latency jumps.’:’Peak-vs-peak compares AKV at 14 with Normal at 12.’);submit();}
$(‘c’).addEventListener(‘enter’,drawServe);
/* P5 */
R.querySelectorAll(‘#mtp-akv-lim li’).forEach(perform(li){li.addEventListener(‘click on’,perform(){li.classList.toggle(‘open’);submit()})});
window.addEventListener(‘load’,submit);window.addEventListener(‘resize’,submit);setTimeout(submit,300);
})();
</script>
</div>
</physique></html>”>
(perform(){var f=doc.getElementById(“mtp-akv-frame”);window.addEventListener(“message”,perform(e){if(e.knowledge&&e.knowledge.mtpAkvHeight&&e.supply===f.contentWindow){f.model.top=e.knowledge.mtpAkvHeight+”px”;}});})();
How briskly is AKV in serving benchmarks?
Serving exams ran GPT-OSS-120B on 80 long-context SWE-bench Verified duties. At every technique’s peak setting, AKV delivers 1.18x output throughput and 1.53x enter throughput. P95 request latency is 1.51x sooner.
At concurrency 16, Normal’s P95 latency hits 229.90 seconds versus 30.63 for AKV. KV strain pushes Normal into repeated re-prefill. Per decode step, full-attention time falls from 7.082 to 2.849 ms.
On 100 SWE-bench Verified duties underneath a GPU price range, AKV reached about 47% cross price. Normal reached 40.7% and Textual content Engineering 32.3%.
Can brokers tune their very own cache coverage?
MiniMax-M2.7 refined insurance policies on 20 BrowseComp-Plus duties, then ran 100 held-out duties. The iteration-6 coverage reduce value 17.8% versus Normal at baseline accuracy. The summary experiences 7.1% financial savings past the expert-designed coverage.
Exposing cache management as a device additionally helped accuracy. GPT-OSS-120B rose from 52.1 to 61.0 on a 100-task subset. MiniMax-M2.7’s value rose, although, from 5.4 to five.9 cents.
AKV vs different KV cache approaches
| Metrics | AKV | Threshold summarization | SGLang RadixAttention | StreamingLLM | SnapKV |
|---|---|---|---|---|---|
| Works on | KV cache, agent-directed | Textual content historical past | KV cache, prefix reuse | KV cache, mounted window | Immediate KV cache |
| What will get dropped | Chosen by coverage or mannequin device name | Historical past older than a token threshold | Nothing, shared prefixes reused | Center tokens; retains sinks and up to date tokens | Low-attention immediate positions |
| Re-prefill after discount | No | Sure, retained suffix | Not relevant | No cache refresh wanted | Not relevant |
| Goal workload | Multi-turn tool-calling brokers | Agent harnesses | Common and agentic serving | Streaming dialogue | Lengthy prompts |
| Reported headline | -27.7% value, +1.7 pts | Baseline in AKV paper | As much as 6.4x throughput | As much as 22.2x vs sliding-window recompute | 3.6x sooner era at 16K |
| Fashions | Qwen, GPT-OSS, MiniMax-M2 | Any | Broad | Llama-2, MPT, Falcon, Pythia | Llama, Mistral, Mixtral |
| Effective-tuning wanted | No | No | No | No | No |
| License | Apache-2.0 | Harness-dependent | Apache-2.0 | MIT | Apache-2.0 |
The principle numbers come from every challenge’s personal paper and use totally different setups. They don’t seem to be instantly comparable.
Key Takeaways
- AKV lets brokers drop and reposition KV cache as an alternative of rewriting historical past.
- Common value falls 27.7% and rating rises 1.7 factors throughout 3 fashions.
- Repos lifts GPT-OSS-120B on BrowseComp-Plus from 55% to 62%.
- At concurrency 16, P95 latency drops from 229.90 to 30.63 seconds.
- Assist covers solely Qwen, GPT-OSS and MiniMax-M2 textual content fashions as we speak.
Take a look at the Paper, GitHub Repo and Project Page. Additionally, be happy to observe us on Twitter and don’t overlook to affix our 150k+ML SubReddit and Subscribe to our Newsletter. Wait! are you on telegram? now you can join us on telegram as well.
Have to accomplice with us for selling your GitHub Repo OR Hugging Face Web page OR Product Launch OR Webinar and so forth.? Connect with us
The submit Tsinghua AI Open-Sources AKV, a Cache Engineering Server for LLM Brokers on SGLang appeared first on MarkTechPost.

