理解大语言模型的推理扩展:瓶颈、权衡与性能原则
Understanding Inference Scaling for LLMs: Bottlenecks, Trade-offs, and Performance Principles
AI总结:
本文研究了大语言模型推理扩展中的瓶颈、权衡和性能原则,通过在GPU集群上评估从8B到671B参数的模型,系统探讨了数据并行、张量并行和流水线并行之间的相互作用,揭示了推理工作负载中数据并行的容量陷阱以及张量并行和稀疏MoE模型的性能限制。
摘要:
从传统的生成式AI向以推理为中心的架构转变,例如能够处理大量链式思考(CoT)处理的模型,标志着系统需求的根本性变革。与传统工作负载主要受计算瓶颈限制不同,推理工作负载生成长链的推理令牌,将推理推入了以容量瓶颈为主的领域。本文提出了全面的系统特征分析,在GPU集群上评估了从8B到671B参数的模型。通过系统地探讨数据并行、张量并行和流水线并行之间的相互作用,我们识别出了一些关键瓶颈,这些瓶颈超出了标准扩展启发式方法的范围。我们的分析表明,数据并行在小型模型中具有吞吐量效率,但在推理工作负载中由于KV缓存碎片化导致早期限制,从而产生次优的计算利用率。张量并行解锁了滞后的内存并提供了接近32B交叉点的亚线性增益。在前沿规模下,密集模型(如Llama-405B)受到互连和内存带宽的限制,倾向于高阶TP,而稀疏混合专家(MoE)模型(如DeepSeek-R1)受限于路由和同步延迟,并受益于混合策略。这些见解为导航推理悬崖提供了严谨的决策框架,为下一代推理基础设施确立了新的架构需求。
英文摘要:
The transition from standard generative AI to \emph{reasoning-centric architectures}, exemplified by models capable of extensive Chain-of-Thought~(CoT) processing, marks a fundamental paradigm shift in system requirements. Unlike traditional workloads dominated by compute-bound prefill, reasoning workloads generate long chains of reasoning tokens that shift inference into a \emph{Capacity-Bound regime}. This paper presents a comprehensive system characterization, evaluating models ranging from 8B to 671B parameters on GPUs clusters. By systematically exploring the interplay between Data, Tensor, and Pipeline parallelism, we identify critical bottlenecks that defy standard scaling heuristics. Our analysis reveals that data parallelism is throughput efficient for small models but hits a capacity trap on reasoning workloads as KV-cache fragmentation forces early throttling resulting in sub-optimal compute utilization. Tensor parallelism unlocks stranded memory and delivers sublinear gains near the 32B crossover. At frontier scale, dense models (e.g., Llama-405B) are interconnect and memory-bandwidth bound and favor high-degree TP, while sparse Mixture-of-Experts (MoE) models (e.g., DeepSeek-R1) are limited by routing and synchronization latency and benefit from hybrid strategies. These insights provide a rigorous decision framework for navigating the reasoning cliff, establishing new architectural imperatives for the next generation of inference infrastructure.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。