Energy-Efficient LLM Serving via Disaggregated Attention--FFN and Flexible Frequency Scaling
作者: Cunchen Hu, Liangliang Xu, Tian Liu, Min Lyu, Yongkun Li, Sa Wang, Shuo Quan, Yanan Yang, Wenda Tang, Yiduo Wang, Fu Yu, Jie Wu
分类: cs.DC, cs.AI
发布日期: 2026-08-03
💡 一句话要点
提出AFlex框架以解决大语言模型服务中的能效问题
🎯 匹配领域: 支柱九:具身大模型 (Embodied Foundation Models)
关键词: 大语言模型 能效优化 动态频率调整 GPU资源管理 注意力机制 前馈网络 流水线优化 深度学习
📋 核心要点
- 现有方法在GPU频率调整上仅在请求或推理阶段进行,未能有效利用注意力机制和FFN的频率敏感性差异,导致能耗增加。
- AFlex框架通过全局调度和局部DVFS控制,优化A/F资源分配与频率,采用动态微批深度和自适应请求批处理减少流水线气泡。
- 在NVIDIA A800 GPU上,AFlex在Qwen3-32B和Mixtral-8×7B的实验中,能耗降低高达49%,显著优于现有的分离服务和频率缩放系统。
📝 摘要(中文)
大语言模型(LLM)服务在多种应用中面临严格的服务水平目标(SLO),通常需要GPU以最大频率运行,从而增加能耗。现有的能量管理方法仅在请求或推理阶段调整GPU频率,忽视了注意力机制和前馈网络(FFN)在频率敏感性上的差异。本文提出AFlex框架,联合优化资源配置和GPU频率缩放,采用全局调度器和局部动态电压频率调整(DVFS)控制器,优化A/F资源分配和频率,同时引入交错的A/F流水线以减少流水线气泡。实验结果表明,AFlex在满足TTFT和TPOT SLO的同时,能将每个token的能耗降低多达49%。
🔬 方法详解
问题定义:本文旨在解决大语言模型服务中GPU频率调整不足的问题,现有方法未能考虑注意力机制和前馈网络在频率敏感性上的差异,导致能耗高且效率低下。
核心思路:AFlex框架通过引入全局调度器和局部DVFS控制器,联合优化资源配置和频率缩放,针对不同的推理阶段和工作负载动态调整A/F资源分配。
技术框架:AFlex的整体架构包括全局调度模块、局部DVFS控制器和交错的A/F流水线,后者通过动态微批深度和自适应请求批处理来优化处理效率。
关键创新:AFlex的主要创新在于实现了注意力机制和FFN的独立频率控制,显著减少了搜索空间和通信开销,提升了能效。
关键设计:AFlex在设计中采用了动态电压频率调整(DVFS)策略,设置了合适的微批深度和请求批处理策略,以减少流水线中的气泡现象,确保资源的高效利用。
🖼️ 关键图片
📊 实验亮点
AFlex在NVIDIA A800 GPU上进行的实验显示,其能耗每token降低高达49%,相比于最先进的分离服务和频率缩放系统,能效提升显著,同时满足TTFT和TPOT的服务水平目标。
🎯 应用场景
AFlex框架具有广泛的应用潜力,特别是在需要高效能和低能耗的大语言模型服务场景中,如对话系统、编程助手等。其优化策略可以帮助云服务提供商降低运营成本,并提高服务质量,未来可能在更多AI应用中得到推广。
📄 摘要(原文)
Large language model (LLM) serving spans diverse applications with stringent service-level objectives (SLOs), often requiring GPUs to run at maximum frequencies and increasing energy consumption. Existing energy-management approaches adapt GPU frequencies only at the request or inference-phase level, overlooking operator-level differences in frequency sensitivity between Attention and feed-forward networks (FFNs). We find that the energy-optimal frequencies of Attention and FFN (A/F) differ and vary with the inference phase, workload, and system configurations. However, runtime variability and independent A/F frequency control create a large search space and high communication overhead. To address these challenges, we present AFlex, a framework that jointly optimizes resource provisioning and GPU frequency scaling for disaggregated A/F serving. AFlex introduces a global scheduler and a local operator-level dynamic voltage and frequency scaling (DVFS) controller to determine A/F resource allocations and frequencies. It further introduces an interleaved A/F pipeline with dynamic microbatch depth and adaptive request batching to reduce pipeline bubbles. We implement AFlex in SGLang and evaluate it on NVIDIA A800 GPUs using Qwen3-32B and Mixtral-8$\times$7B under production Conversation and Coding traces. \AFlex reduces energy per token by up to 49\% over state-of-the-art disaggregated serving and 48\% over frequency-scaling systems while satisfying TTFT and TPOT SLOs.