INQUIRING LINE

Is swapping an AI's saved memory to cheaper storage a trick for one engine, or does it work everywhere?

Can KV cache offloading generalize beyond vLLM and SGLang inference engines?

This explores whether the idea of moving a model's KV cache (its saved working memory from earlier text) out of GPU memory and into slower, cheaper storage is tied to the two popular open-source serving engines, vLLM and SGLang, or whether it is a general technique that works across serving stacks.


This explores whether KV cache offloading is a trick specific to vLLM and SGLang or a general pattern for serving models. The corpus has no paper that tests offloading engine by engine, so a direct comparison isn't available here. What it does show is that the idea underneath offloading doesn't depend on any one engine. That idea is to treat the KV cache as data that can be stored, moved and reloaded instead of rebuilt every time.

The clearest evidence comes from LMCache, a caching layer that sits beside the serving engine instead of inside it. One enterprise deployment loaded saved KV states from remote object storage and got 22–32% lower time-to-first-token than recomputing them from scratch Can remote storage beat recomputing cached model states?. The interesting part is the reason. Nothing about the engine changed. Storage got faster: services like S3 Express now deliver about 1 GBps, which breaks the old assumption that fetching from remote storage would always lose to recomputing. If the payoff comes from storage speed, it should apply to any engine that can hand off its cache, not only vLLM. Offloading also builds on vLLM's own key idea. PagedAttention borrowed virtual-memory paging from operating systems and split the KV cache into fixed-size blocks that don't have to sit next to each other in memory Can OS paging techniques reduce LLM serving memory waste?. Once the cache is a set of addressable blocks, moving those blocks to CPU memory, disk or remote storage is a natural next step. Any engine that adopts a block-based cache layout gets the same opening.

The commercial APIs suggest the same thing from another angle. OpenAI, Anthropic and Google all offer prompt caching on stacks that are neither vLLM nor SGLang, and in multi-turn agent tasks it cuts costs by 41–80% Does prompt caching actually reduce agentic LLM costs?. That same benchmark carries a warning that applies to offloading too: caching everything blindly can make latency worse, because content that is never reused still costs time to store. Generalizing offloading is partly a plumbing problem and partly a policy problem: deciding which parts of the cache are worth keeping.

Wider reading shows the KV cache becoming a shared resource that more than just the engine uses. Reasoning models given a single shared KV cache began coordinating with each other without any training Can multiple LLMs coordinate without explicit collaboration rules?. Another model prunes its own cache while it reasons, to work past its context limit Can recursive subtask trees overcome context window limits?. Agent harnesses stack memory in layers, from model weights down to disk Can external state caches let models solve harder problems?. These systems treat the cache as state to be shaped, shared and stored, which is what an offloading layer needs to be portable. There is also a caution: the cost of moving data depends on the hardware. On phones, recomputing a transformer block twice is cheaper than fetching separate weights for a second one Does recomputing weights cost less than moving them on mobile?. Whether offloading beats recomputing depends on the ratio of bandwidth to compute in a given setup, not on which engine is running.

The takeaway is that offloading's portability depends less on the engine than on two other questions: is the cache stored as movable blocks, and is fetching it faster than recomputing it on your hardware? Data-center storage now usually passes that second test. Phones and similar memory-limited devices may not. For engine-by-engine benchmarks, the corpus doesn't have that material yet.


Sources 7 notes

Can remote storage beat recomputing cached model states?

LMCache reports one enterprise customer achieved 22–32% lower time-to-first-token by loading cached states from remote storage instead of recomputing them. The shift stems from modern object store throughput (S3 Express: ~1 GBps) exceeding the historical assumption that remote loading was too slow.

Can OS paging techniques reduce LLM serving memory waste?

PagedAttention applies OS virtual memory paging to the KV cache, storing blocks non-contiguously and enabling sharing across requests. This eliminates ~30% of memory waste from fragmentation, lifting vLLM throughput 2-4× over FasterTransformer and Orca on the same latency.

Does prompt caching actually reduce agentic LLM costs?

A benchmark across OpenAI, Anthropic, and Google found caching reduces API costs 41–80% and improves time-to-first-token 13–31% in multi-turn agentic tasks. However, naive full-context caching can increase latency by caching dynamic content that will never be reused.

Can multiple LLMs coordinate without explicit collaboration rules?

Existing reasoning-capable models like QwQ and DeepSeek-R1 spontaneously formulate plans, detect redundancy, and adapt strategies when given shared access to a concurrent KV cache. This coordination emerges without fine-tuning, suggesting reasoning models already possess multi-agent collaboration capabilities.

Can recursive subtask trees overcome context window limits?

The Thread Inference Model demonstrates that reasoning structured as recursive subtask trees with rule-based KV cache pruning sustains accurate reasoning beyond context limits, even when manipulating 90% of the cache. This enables single models to replace multi-agent systems by handling full recursive reasoning internally.

Show all 7 sources
Can external state caches let models solve harder problems?

Prime Agent organizes persistent state in four levels (weights, context, persistent REPL plus subagents, disk-backed history) to let models read and write addressable state beyond their instruction stream. The approach isolates harness failures from model failures and reported gains on ARC-AGI-3, though specific components remain unablated.

Does recomputing weights cost less than moving them on mobile?

MobileLLM shows that on memory-bound mobile hardware, sharing weights between adjacent transformer blocks by recomputing one block twice uses less latency than fetching separate weights, gaining accuracy with no parameter increase.

Papers this line draws on 8

The research behind the notes this line reads — ranked by how closely each paper relates.