Energy-Efficient LLM Serving via Disaggregated Attention--FFN and Flexible Frequency Scaling
This paper presents AFlex, a framework that reduces energy consumption in LLM serving by up to 49% through disaggregated Attention-FFN execution, joint resource and frequency optimization, and an interleaved pipeline that adapts to operator-level frequency sensitivities while meeting strict latency SLOs.
Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer
Imagine you are running a massive, super-smart robot brain in a giant data center. This brain, known as a Large Language Model (LLM), is the engine behind chatbots, coding assistants, and creative writers. But there's a catch: these brains are incredibly hungry. They eat up huge amounts of electricity, often running their processors at full speed, like a race car engine revving at maximum RPM even when the car is stuck in traffic. This is a problem because it costs a fortune in energy and creates a lot of heat.
To make these robots run faster, scientists have figured out how to split the work. Think of the robot's thinking process as having two main steps: first, it reads and understands your question (the "prefill" phase), and second, it writes out the answer word by word (the "decode" phase). Recently, engineers realized it's better to put these two steps in different rooms with different teams of workers, rather than having one team do both. This is called "disaggregation." It helps the robot answer faster, but it doesn't necessarily make it use less electricity. In fact, if you just turn down the speed of the workers to save power, the robot might get too slow and miss its deadlines. The big question is: how do we slow things down to save energy without making the robot stutter or fail?
This paper introduces a clever new system called AFlex that solves this puzzle by treating the robot's brain like a team of specialists with different energy needs. The researchers discovered that the two main parts of the robot's brain—the part that pays attention to your words (Attention) and the part that processes the logic (Feed-Forward Network, or FFN)—are not the same. They are like two different athletes: one is a sprinter who needs a high-speed boost to run fast, while the other is a marathon runner who gets tired if you push them too hard but can maintain a steady, slower pace efficiently.
Previously, systems treated the whole brain as one unit, forcing both the sprinter and the marathon runner to run at the exact same speed. If you sped them up to help the sprinter, the marathon runner wasted energy. If you slowed them down to save the marathon runner, the sprinter got too slow. The authors of this paper found that these two parts actually prefer different speeds depending on what the robot is doing, how long the question is, and how many people are asking questions at once.
To fix this, AFlex acts like a smart manager who can give the sprinter and the marathon runner their own separate tracks and their own personal speed settings. It uses a "Global Scheduler" to plan the big picture, deciding how many workers to assign to each task, and a "Local Controller" to tweak their speeds in real-time, second by second. The system also uses a special pipeline technique where the workers pass notes to each other while they are still working, so no one sits around waiting. This "interleaved" approach keeps the assembly line moving smoothly without any gaps.
The researchers tested AFlex on powerful computer chips (NVIDIA A800 GPUs) using real-world data from coding and conversation tasks. They found that by letting the Attention and FFN parts run at their own unique, energy-saving speeds, the system could cut the energy used per word generated by up to 49% compared to the best existing methods that split the work, and by 48% compared to systems that just tried to slow down the whole chip. Crucially, the robot still answered just as fast as before, meeting all its speed promises. The paper suggests that this approach of giving different parts of the AI brain different speeds is a major step toward making artificial intelligence much more energy-efficient without sacrificing performance.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.