vLLM 分布式推理中的张量并行与流水线并行
vLLM 介绍了如何结合张量并行和流水线并行,在多 GPU 或多节点上部署超出单卡容量的大模型。张量并行可降低延迟但依赖高带宽互连,流水线并行通信开销较低且更适合跨节点部署。案例中从 TP=1 扩展到 TP=2 后,KV cache block 增加 13.9x,token 吞吐量提升 3.9x。

idth interconnects between each GPU, like NVLink or InfiniBand, to minimize overhead from the increased communication costs. Pipeline Parallelism For extremely large models (e.g., DeepSeek R1, Llama 3.1 405B), a single node may not suffice. Pipeline parallelism shards models across nodes, each handling specific contiguous model layers. How It Works Each GPU loads and processes a distinct set of layers; Send/Receive Operations: Intermediate activations are transmitted between GPUs as computation
匹配字段正文




