Volume 3,Issue 7
混合专家架构下大语言模型推理性能优化
针对大语言模型推理服务面临的高并发、低延迟与内存开销激增等挑战,本文探究了专家并行(Expert Parallelism,EP)策略在推理集群中的适配机制。剖析混合专家(Mixture of Experts, MoE)稀疏架构、KV Cache 缓存优化及预填充- 解码分离(Prefill-Decode Separation, PD Separation)三大关键技术的性能增益原理,构建" 架构- 机制-部署" 三位一体的优化体系。基于DeepSeek R1模型的W8A8量化版本,在昇腾910B2集群环境下设计多维度对比实验,验证不同节点规模、序列长度及并发场景下的性能表现。最终提出面向低时延与高吞吐两类核心场景的集群资源配置方案与动态调度策略,为大规模大模型推理服务的工程化落地提供理论支撑与实践指导。
[1] Lepikhin D, et al. GShard: Scaling Giant Models with Conditional Computation
and Automatic Sharding[J]. arXiv preprint arXiv:2006.16668, 2020.
[2] Fedus W, et al. Switch Transformers: Scaling to Trillion Parameter Models with
Simple and Efficient Sparsity[J]. arXiv preprint arXiv:2101.03961, 2022.
[3] DeepSeek AI. DeepSeekMoE: Towards Ultimate Expert Specialization in
Mixture-of-Experts Language Models[J]. arXiv preprint arXiv:2401.06066, 2024.
[4] 王某某, 等. 大模型时代的混合专家系统优化综述[J]. 计算机研究与发展,2024.
[5] Yu G, et al. DistServe: Disaggregating Prefill and Decoding for Goodputoptimized
Large Language Model Serving[J]. arXiv preprint arXiv:2405.20070, 2024.