Researchers at the University of Michigan College of Engineering (U-M) have developed software capable of cutting the energy consumption of AI training by roughly half - without sacrificing speed or quality. The team is now working with NVIDIA to implement its approach in Megatron-LM, NVIDIA's open platform for AI training.
Megatron-LM is used both directly and as a basis for building proprietary training platforms. NVIDIA's flagship Nemotron models, which users can download to their own hardware, are trained on this platform.
The savings come from optimally coordinating the work of hundreds and thousands of processors, as well as choosing which tasks to run and when. "AI is becoming energy-constrained as models grow and more people want to train models, but we can achieve the same speed and performance with less energy," the source quotes Ruofan Wu, a U-M doctoral student who worked on integrating the software into Megatron-LM this summer, as saying.
The system has two parts. The first, Perseus, slows down processors that are running faster than needed. According to a 2024 study, this reduces training energy consumption by up to 30%. The second, Kareus, whose development was led by Wu, cut the training energy of two leading open large language models by a further 10-30% in a study presented in July at the USENIX Symposium on Operating Systems Design and Implementation. The researchers believe the combined savings for large-scale models could approach 40-50%.
Both tools address inefficiencies in parallel processing - a method in which a model and data are divided among hundreds or thousands of graphics processing units (GPUs) running simultaneously. Each GPU breaks the task into smaller subtasks, including data processing and inter-chip communication. These subtasks are executed by cores - processors inside the GPU - sequentially or in parallel, launching kernel programs on a schedule optimized for maximum GPU speed.
Normally GPUs try to complete a task as fast as possible. This leads to energy losses: one GPU processes more data than the others, and they sit idle until the last one finishes. Perseus slows down the other cores so that all finish at the same time. They save energy by working "at a jog, not a sprint," and total training time does not increase.
However, changing speed can cause problems with memory and data bandwidth or create new opportunities to run cores simultaneously. Kareus corrects such imbalances by coordinating the cores within each GPU and building an optimal schedule. For example, it can change the number of cores allocated to communication tasks or their execution time.
"Processor speed changes what code should have been generated in the first place," explains Mosharaf Chowdhury, an associate professor at U-M. "It's like choosing a route based only on distance, without knowing the speed limits along the way. You'll get there, but you'll burn more fuel than needed." According to him, the principles of training are the same for Megatron and other frameworks, so the approach can also be applied to other platforms.