arXiv:2504.17674cs.CLcs.LG2025-04ACL被引 90

分析大模型推理能耗,提出高效优化方案可降能73%。

Energy Considerations of Large Language Model Inference and Efficiency Optimizations

  • 通过输入输出令牌分布建模,模拟真实推理场景。
  • 不同工作负载下优化效果差异显著,最高节能73%。
  • 适合关注模型部署能效与绿色AI的开发者和研究者。

随着大语言模型规模扩大和应用普及,其计算与环境成本持续上升。以往基准测试多聚焦理想化环境下的延迟降低,忽视了影响实际能耗的多样化推理工作负载。本文系统分析了常见推理效率优化在多种自然语言处理与生成式AI任务中的能量影响,涵盖对话AI与代码生成等场景。提出基于输入输出令牌分布分箱策略的建模方法,以逼近真实推理流程。实验覆盖软件框架、解码策略、GPU架构、在线离线服务模式及模型并行配置。结果表明,推理优化效果高度依赖工作负载特性、软件栈与硬件加速器,基于FLOPs或理论显卡利用率的简单估算会严重低估实际能耗。恰当应用相关优化可使总能耗相比未优化基线降低高达73%。研究为可持续的大模型部署提供依据,并指导未来AI基础设施的能效设计。

原文摘要 · Abstract (English)

As large language models (LLMs) scale in size and adoption, their computational and environmental costs continue to rise. Prior benchmarking efforts have primarily focused on latency reduction in idealized settings, often overlooking the diverse real-world inference workloads that shape energy use. In this work, we systematically analyze the energy implications of common inference efficiency optimizations across diverse Natural Language Processing (NLP) and generative Artificial Intelligence (AI) workloads, including conversational AI and code generation. We introduce a modeling approach that approximates real-world LLM workflows through a binning strategy for input-output token distributions and batch size variations. Our empirical analysis spans software frameworks, decoding strategies, GPU architectures, online and offline serving settings, and model parallelism configurations. We show that the effectiveness of inference optimizations is highly sensitive to workload geometry, software stack, and hardware accelerators, demonstrating that naive energy estimates based on FLOPs or theoretical GPU utilization significantly underestimate real-world energy consumption. Our findings reveal that the proper application of relevant inference efficiency optimizations can reduce total energy use by up to 73% from unoptimized baselines. These insights provide a foundation for sustainable LLM deployment and inform energy-efficient design strategies for future AI infrastructure.

大模型推理能耗优化绿色AI

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。