vLLM 推出推式 KV 传输,优化分离推理
vLLM 博客介绍了一种基于 NIXL 的推式(push-based)KV 传输连接器,用于预填充—解码分离推理。它让解码实例提前注册目标块,并由后台线程发起传输,从而把预填充后的协调与准备工作移出首 token 延迟(TTFT)的关键路径。作者在 Amazon EC2 P5en 实例、AWS EFA 网络、1P1D 部署上以 Qwen3-32B 测试,称推式模式相比默认拉式模式 TTFT 最高改善 3 倍、每输出 token 时间(TPOT)最高改善 30%;在 8 QPS、16k 输入下 TTFT 约为 540 毫秒,而拉式约为 1744 毫秒。该功能先在 AWS Trainium 集群上构建验证,后作为与加速器无关的特性贡献给 vLLM,性能结果取决于工作负载与配置。
KV 传输位于预填充—解码分离推理的关键路径上,把传输协调移出该路径可直接影响长上下文、高并发场景下的首 token 延迟和逐 token 延迟。
vLLM is an open-source inference and serving engine for large language models (LLMs). LLM inference has two distinct phases: prefill, which processes the input prompt and builds the key-value (KV) cache, and decode, which uses that cache to generate output one token at a time. These phases have different compute, memory, and scaling characteristics. Prefill-decode (P-D) disaggregation runs them on separate engine instances, allowing each phase to scale and be optimized independently. This can improve resource utilization, throughput, and latency under load. However, it also requires transferring the KV cache from the prefill instance to the decode instance before token generation can begin, making efficient KV transfer critical to time-to-first-token (TTFT).
One of the ways vLLM performs this transfer is through the NVIDIA Inference Xfer Library (NIXL) connector, which moves KV blocks over RDMA-capable interconnects such as AWS Elastic Fabric Adapter (AWS EFA, the low latency RDMA network used across servers in AWS). On supported instance types, AWS EFA supports GPUDirect RDMA and Neuron Direct RDMA, enabling NIXL to transfer KV blocks directly between GPU or Trainium device memory without staging through host memory. The default mode for NIXL connector is pull-based: After the prefill instance finishes computing the prompt KV cache, the router relays the source metadata, including the prefill block IDs, to the decode instance. The decode instance then allocates destination blocks, prepares the NIXL transfer, and initiates NIXL READ to pull the KV blocks from the prefill instance. Because these coordination and setup steps occur sequentially after prefill and before decoding can begin, they extend the TTFT critical path, as shown in the following timeline.
#vLLM#NVIDIA NIXL#AWS EFA#Amazon EC2 P5en#Qwen3-32B#AWS Trainium