探究芯片内存与频率如何影响大模型推理能耗,发现小缓存高频率更省电。
Prefill vs. Decode Bottlenecks: SRAM-Frequency Tradeoffs and the Memory-Bandwidth Ceiling
- 用仿真分析预填充和解码阶段的能效,区分计算与内存瓶颈。
- 32KB~64KB小缓存配1200MHz~1400MHz高频,能效比最优。
- 内存带宽是性能天花板,超频无益于内存密集型任务。
能耗决定大语言模型部署的成本与环境影响。本文研究片上SRAM大小与工作频率对LLM推理能效与性能的影响,聚焦计算密集型预填充与内存密集型解码阶段的差异行为。仿真结合OpenRAM能效建模、LLMCompass延迟模拟与ScaleSIM流水线操作强度分析。结果表明,总能耗主要由SRAM大小决定,更大缓存显著增加静态能耗(泄漏),且无法通过延迟降低抵消。定量揭示内存带宽瓶颈:高频虽降低预填充延迟,但对内存密集型解码延迟改善受外部内存带宽限制。反直觉的是,高计算频率可通过缩短执行时间,使静态能耗下降超过动态功耗上升,从而降低总能耗。在模拟工作负载下,最优配置为1200MHz~1400MHz高频与32KB~64KB小本地缓存,实现最佳能效-延迟积。进一步证明内存带宽构成性能上限,提升计算频率仅在未达内存瓶颈时有效。该分析为数据中心高效能加速器设计提供具体架构洞见。
原文摘要 · Abstract (English)
Energy consumption dictates the cost and environmental impact of deploying Large Language Models. This paper investigates the impact of on-chip SRAM size and operating frequency on the energy efficiency and performance of LLM inference, focusing on the distinct behaviors of the compute-bound prefill and memory-bound decode phases. Our simulation methodology combines OpenRAM for energy modeling, LLMCompass for latency simulation, and ScaleSIM for systolic array operational intensity. Our findings show that total energy use is predominantly determined by SRAM size in both phases, with larger buffers significantly increasing static energy due to leakage, which is not offset by corresponding latency benefits. We quantitatively explore the memory-bandwidth bottleneck, demonstrating that while high operating frequencies reduce prefill latency, their positive impact on memory-bound decode latency is capped by the external memory bandwidth. Counter-intuitively, high compute frequency can reduce total energy by reducing execution time and consequently decreasing static energy consumption more than the resulting dynamic power increase. We identify an optimal hardware configuration for the simulated workload: high operating frequencies (1200MHz-1400MHz) and a small local buffer size of 32KB to 64KB. This combination achieves the best energy-delay product, balancing low latency with high energy efficiency. Furthermore, we demonstrate how memory bandwidth acts as a performance ceiling, and that increasing compute frequency only yields performance gains up to the point where the workload becomes memory-bound. This analysis provides concrete architectural insights for designing energy-efficient LLM accelerators, especially for datacenters aiming to minimize their energy overhead.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。