AIToday
Large Language ModelsAI Coding AssistantsAmazon AI BlogPublished: Oct 20, 2026, 04:00 JST

AWS cuts agent TTFT up to 3.3x with bi-directional KV transfer

AWS cuts agent TTFT up to 3.3x with bi-directional KV transfer

3 Key Points

  1. What happened

    AWS contributed bi-directional KV cache transfer to vLLM, letting decode nodes return cached context to prefill nodes; on P5en instances with EFA it cut TTFT by up to 1.6x for Qwen3-32B and 3.3x for GLM-5-FP8.

  2. Why it matters

    Multi-turn agents that resend growing conversation history can avoid recomputing earlier tokens, keeping latency flatter as prompts lengthen and reducing accelerator capacity spent on repeated prefill work.

WHO IT HITSTeams running self-hosted vLLM deployments for conversational assistants and agentic applications on disaggregated prefill-decode clusters are the main beneficiaries, since they can keep response latency lower as interaction histories grow.

Not sure about something? Ask the AI

Questions and answers are published on this page.

Summaries like this, in your inbox every morning.

Context & Analysis

The feature addresses a structural inefficiency in prefill-decode disaggregated serving. In the conventional one-directional flow, the decode node holds KV cache entries for both the prompt and the newly generated tokens, but the prefill node cannot retrieve them on the next turn. That forces the prefill node to recompute KV projections for previous response tokens, and it also increases the chance of cache eviction for active sessions on prefill nodes. When a full cache miss occurs, the prefill node must recompute the entire conversation history, including system instructions, prior user requests, tool results, and model-generated responses. AWS originally built and validated bi-directional KV transfer on Trainium instance clusters connected with EFA and contributed it to vLLM as an accelerator-agnostic capability. The benchmark results on an Amazon EC2 P5en GPU cluster with EFA indicate the benefits carry over to GPUs, according to the post.

Two controls shape when reuse actually helps. The decoder_kv_blocks_ttl setting keeps a conversation's KV blocks available for a fixed period, and the kv_recompute_threshold setting, defaulting to 64 tokens, decides whether prefill pulls remote KV or recomputes locally. The post notes that for a short reusable prefix, interconnect and coordination overhead can exceed the time needed to recompute the tokens. It also points to extending a heartbeat-renewed lease to the decode side as a natural next improvement, so blocks could be reclaimed as soon as a conversation goes idle rather than at the end of a fixed timer.

The benchmark deliberately disabled prefix caching on the prefill node to emulate cache eviction or a router selecting a different prefill node without the conversation's KV blocks. Under that condition, with the feature off, TTFT rose steeply as context grew: Qwen3-32B climbed from 158 ms at 2k to 778 ms at 24k, and GLM-5-FP8 from 500 ms at 2k to 2,334 ms at 20k. With it on, Qwen3-32B rose only from 122 ms to 460 ms, and GLM-5-FP8 from 358 ms to 702 ms. The post attributes the larger gap for GLM-5-FP8 to its higher per-token recompute time, which makes KV reuse pay off more as models and contexts scale.

FAQ
How much faster is time to first token with bi-directional KV transfer?
On a 1P1D deployment using Amazon EC2 P5en instances with EFA, TTFT dropped by up to 1.6x for Qwen3-32B and up to 3.3x for zai-org/GLM-5-FP8 at the longest prompt lengths tested.
What configuration is needed to use this in vLLM?
Use vLLM v0.21.0 or later with NixlConnector, enable bidirectional_kv_xfer on both prefill and decode servers, and use a KV-cache-aware router.
How long does a decode node keep KV blocks for reuse?
It holds them for a configurable lifetime called decoder_kv_blocks_ttl, defaulting to 480 seconds; requests arriving after expiry fall back to normal prefill.
Amazon AI BlogRead Original Article

AI news that matters for your work, delivered every morning.

Pick your industry and the AI tools you use, and get news related to your work every day.

Free · 30 seconds with Google · unsubscribe anytimeWhat is AIToday? →

Ask AI

Ask AI anything about this article. The AI reads this article, earlier AIToday articles, and Wikipedia, and cites its sources. Q&As are published on this page for other readers too.

Questions and answers are published on this page.

Related Articles

Next articleMotive launches Agents to automate fleet responses