Create

Sign in to ReadmeX

or

How we handle your data: Privacy Policy

ReadmeX

Your AI reading companion

What would you like to catch up on?

Pick a briefing, or ask your own question.

Your community and people briefings stay personal to you.

Story

vLLM adds bi-directional KV transfer to cut TTFT in multi-turn agents

AI summary

vLLM and the AWS Machine Learning Blog describe bi-directional KV cache transfer in vLLM: in prefill-decode disaggregated serving, a decode node can return previously computed KV blocks to the prefill node on later turns, avoiding recomputation of the conversation history. On a 1P1D deployment using Amazon EC2 P5en instances with AWS EFA, the authors report TTFT reductions of up to 1.6x for Qwen3-32B and up to 3.3x for zai-org/GLM-5-FP8, noting that results vary with workload and configuration. Using it requires vLLM v0.21.0 or later with NixlConnector, enabling bidirectional_kv_xfer on both prefill and decode servers, and a KV-cache-aware router, with decode-side block retention governed by decoder_kv_blocks_ttl (default 480 seconds).

In-depth insight

The posts argue that as an agent's conversation history grows, repeated prefill recomputation raises latency and accelerator usage; letting the prefill node reuse KV blocks retained by the decode node keeps TTFT flatter at long context lengths.

Multi-turn agentic workloads build on accumulated context as an agent reasons, invokes tools, and incorporates earlier results. With each new turn, the client resends the conversation history, including system instructions, prior prompts, tool results, and model responses, causing the growing context to be processed repeatedly. In Prefill-decode (P-D) disaggregation, each request is split across specialized nodes: the prefill node processes the prompt and builds its KV cache, then the decode node retrieves those KV blocks and generates the response.

Conventional disaggregated serving, however, only transfers KV cache in one direction: from prefill to decode node. This one-directional flow creates two inefficiencies for multi-turn workloads. First, after generating a response, the decode node holds KV cache entries for both the prompt and the newly generated tokens. When processing the next turn, the prefill node cannot retrieve those entries, so it must recompute the KV projections for the previous response tokens. Second, the decode node maintains the session state while the prefill nodes do not, increasing the probability of cache eviction for active sessions on the prefill nodes. On a full cache miss, the prefill node must recompute KV projections for the entire conversation history, including system instructions, prior user requests, tool results, and model-generated responses. As the conversation grows, this redundant work consumes more accelerator capacity and increases time to first token (TTFT).

#vLLM#AWS#Amazon EC2 P5en#AWS EFA#Qwen3-32B#GLM-5-FP8#NixlConnector#AWS Trainium

Original · 13 min readRead the original
Group chat

No comments yet. Start the conversation.