本文已被:浏览 22次 下载 36次
Received:January 19, 2026 Revised:February 09, 2026
Received:January 19, 2026 Revised:February 09, 2026
中文摘要: 面向昇腾(Ascend) 910B平台的大模型在线推理, Prefill与Decode阶段在计算密度、访存带宽与通信敏感性上呈现显著的异构特征, 使主流的“Prefill-TP+Decode-DP”部署策略在长上下文与高并发场景下暴露出权重复制造成的显存冗余、算子访存瓶颈与序列长度负载不均衡等问题. 本文基于PD分离架构, 提出一种算子级混合并行优化框架. 在Decode阶段, 针对以访存为主导的词嵌入(Embedding)、注意力输出投影矩阵(o_proj)与语言模型头(LMHead), 设计Decode混合切分与通信优化策略, 在有效缓解KV Cache显存压力的同时, 显著降低逐token生成延迟; 在Prefill阶段, 提出分阶段混合并行方案(数据并行+张量并行+序列并行), 通过序列维度的均衡切分, 缓解变长请求带来的“木桶效应”, 并提出面向昇腾算子/格式约束的Shard Linear权重去冗余机制, 实现计算-通信重叠. 基于vLLM-Ascend在Ascend 910B集群上对DeepSeek-R1 671B (W8A8量化)部署评测, 实验结果表明在精度无损的前提下, Decode端单卡显存峰值降低8.68 GiB, 逐token延迟降低约2 ms; Prefill端在多输入长度下TTFT平均降低约20%, 高显存压力场景下Decode QPS提升约40.2%.
Abstract:For large-model online inference on the Ascend 910B platform, the Prefill and Decode stages exhibit significant heterogeneous characteristics in computational density, memory access bandwidth, and communication sensitivity. As a result, the mainstream “Prefill-TP+Decode-DP” deployment strategy suffers from issues such as memory redundancy due to weight replication, operator memory access bottlenecks, and sequence-length load imbalance in long-context, high-concurrency scenarios. Based on the PD-separation architecture, this study proposes an operator-level hybrid parallel optimization framework. In the Decode stage, a hybrid partitioning and communication optimization strategy is designed to target memory-bound token embedding (Embedding), the attention output projection matrix (o_proj), and the language model head (LMHead), effectively alleviating KV Cache memory pressure while significantly reducing per-token generation latency. In the Prefill stage, a staged hybrid parallel scheme combining data parallelism (DP), tensor parallelism (TP), and sequence parallelism (SP) is proposed. Sequence-dimension balanced partitioning mitigates the “bucket effect” caused by variable-length requests, and a Shard Linear weight de-redundancy mechanism oriented to Ascend operator/format constraints is further proposed to achieve computation-communication overlap. Based on the deployment and evaluation of DeepSeek-R1 671B (W8A8 quantization) on an Ascend 910B cluster using vLLM-Ascend, the results show that, without accuracy loss, peak memory per device in the Decode stage is reduced by 8.68 GiB and per-token latency by about 2 ms. In the Prefill stage, the average TTFT is reduced by about 20% across multiple input lengths, and Decode QPS improves by 40.2% under high memory pressure.
keywords: deep learning neural network LLM inference distributed parallel PD-separation memory optimization
文章编号: 中图分类号: 文献标志码:
基金项目:国家自然科学基金(U24B6012, U24A20248, 62472232); 北京市自然科学基金(L251082)
引用文本:
张子航,周剑,王卅.基于昇腾环境的大语言模型推理混合并行优化.计算机系统应用,,():1-15
ZHANG Zi-Hang,ZHOU Jian,WANG Sa.Hybrid Parallel Optimization for Large Language Model Inference on Ascend.COMPUTER SYSTEMS APPLICATIONS,,():1-15
张子航,周剑,王卅.基于昇腾环境的大语言模型推理混合并行优化.计算机系统应用,,():1-15
ZHANG Zi-Hang,ZHOU Jian,WANG Sa.Hybrid Parallel Optimization for Large Language Model Inference on Ascend.COMPUTER SYSTEMS APPLICATIONS,,():1-15

