In a report dated November 20, AWS described an Agent Toolkit skill that assesses shared key-value caching for self-hosted language models before making infrastructure changes.

The big change

  • AWS's KVTrace example uses synthetic traffic. Its recommended cache capacity is an estimate, rather than a measured result from a customer deployment.
  • Cached input work can shorten the wait before an answer begins. It does not remove the separate computation that generates each new answer.
  • On-demand cache nodes are billed from launch until termination. Extra memory therefore has an ongoing cost even during periods when it supplies little useful reuse.

What can be reused

KV means key-value. A model's attention layers calculate arrays of numbers from the input; keeping those intermediate results can avoid repeating that processing. They are working state, rather than the text of a saved answer. Keeping that state only in one server's GPU memory ties reuse to that server. Making it accessible to another host trades recomputation for the time needed to transfer the state.

vLLM describes prefix caching as reusing this state when a new request shares an existing request's beginning. Its documented software-manual example illustrates the point: several questions can start with the same long manual, allowing its initial processing to be reused.

The question-specific input and new answer still require work. vLLM distinguishes prefill, which processes input, from decoding, which produces output tokens. Its documentation says prefix caching saves the former, not the latter; long generated answers or requests without a matching prefix leave much less to gain.

What AWS's demonstration establishes

The skill is intended for coding agents supporting Agent Skills. AWS describes read-only fleet inspection followed by explicit approval before creating, changing or deleting resources.

KVTrace replays cache events offline against candidate capacities. In AWS's synthetic demonstration, it recommends the smallest size reaching 90% of a modeled savings ceiling. That 90% is a share of modeled potential savings, not 90% off a bill.

BIG CHANGE reviewed public documentation but did not run the skill, collect a customer trace or provision infrastructure.

Moving cached state still takes work

The separate CacheGen research, published at SIGCOMM 2024, explains why a cache hit is not free. Saved attention arrays can be large, and fetching them across a network adds delay. CacheGen compresses and streams that state, adapting compression to available bandwidth.

One Mistral-7B experiment, in the study's A40-server setup, held context at 16K tokens while varying bandwidth. Its time-to-first-token advantage over a baseline using lower-precision cached numbers became smaller above 20 Gbps. Time to first token measures the wait until output starts, rather than completion of the entire answer.

That earlier experiment does not validate AWS's sizing demonstration. It illustrates why the cost of moving cached state matters alongside the computation avoided.

A faster response and a lower bill

ElastiCache's on-demand pricing charges for nodes from launch until termination and rounds a partial node-hour up to a full hour. A node-hour is one allocated node for one hour. Leaving that capacity running therefore has a cost even when useful cache activity is low.

AWS notes that saved GPU time translates into economic gains by running fewer servers or serving more traffic with them. Those are changes in spending or useful output, not equivalent accounting results.

For an operator, a useful comparison holds the amount of completed work and required responsiveness constant, then includes the cache in the serving cost. Avoided computation, a shorter initial wait and a lower invoice are separate outcomes.