Optimized Forward-Backward Rematerialization for Memory-Efficient Pipeline Parallel Training
Adrien Aguila-Multner, Olivier Beaumont, Lionel Eyraud-Dubois, Julia Gusak
NeurIPS page · Open on the map
Category: Efficient LLM Inference & Training › Async Pipeline Communication Optimization · Type: new method · Keywords: pipeline parallelism, rematerialization, memory-efficient training, integer linear programming, distributed deep learning
Areas: Memory › Model Memory Optimization › Activation Memory Reduction
Summary
Optimized Forward-Backward Rematerialization for Memory-Efficient Pipeline Parallel Training introduces per-microbatch rematerialization decisions solved via an ILP to reduce memory usage while training larger models.
Explained to a 5-year-old
Training big computers needs a lot of memory to remember what they learned. This new idea lets the computers forget some of that memory and recompute it later. It helps them work on smaller devices that can't hold as much memory. The method decides when to forget and when to recompute for each tiny piece of work. This makes it possible to train bigger models even on tight memory.
Explained to a 5-year-old, longer
Imagine a big computer that learns by trying to guess things, like a game. To learn, it writes down lots of notes about what it saw. These notes take up a lot of space, like a big backpack. When the backpack is too heavy, the computer can't carry it on a small device. This new idea says the computer can put some notes in a locker and later open the locker to remember them. It works on each tiny piece of learning separately, deciding which notes to lock away and which to keep. This way the computer can still learn a lot even when its memory is small. It also saves time by not having to redo everything from scratch. The method helps the computer choose the best spots to lock notes for each little task. By doing this smartly, the computer can train bigger models on devices with limited space. It also works well on different kinds of computer setups. This makes learning with computers more flexible and accessible for many situations. Overall, it lets small devices do big learning jobs.
For a technical reader
The paper addresses the high memory consumption of pipeline parallel training on GPUs. It extends rematerialization-recomputing activations-to also recompute gradient-related activations during the backward pass. A per-microbatch, per-GPU rematerialization decision is formulated as an integer linear program that respects given memory limits and optimizes schedule efficiency. The resulting optimizer can be applied to both single-wave and multi-wave pipeline schedules, automatically selecting the best recomputation strategy for a target memory budget. Experiments confirm that this approach enables training larger models on memory-constrained hardware while reducing recomputation overhead.
Problem
Training large deep models on limited memory hardware is challenging because pipeline parallelism requires storing activations and gradients. Existing rematerialization techniques only recompute forward activations, leaving backward pass memory usage high, which restricts scaling on resource-constrained devices.
Method
The approach extends rematerialization to the backward pass, allowing recomputation of gradients with respect to activations. It formulates per-microbatch, per-GPU rematerialization decisions as an Integer Linear Programming problem that respects given memory constraints and optimizes schedule efficiency. This unified optimization can be applied to both one-wave and multi-wave pipeline schedules.
Results
The experiments show that the approach enables training larger models under tight memory budgets, adapts optimally to varying memory capacities, and reduces recomputation overhead compared to existing recomputation solutions.
Contributions
The paper introduces backward pass rematerialization, proposes flexible per-microbatch rematerialization strategies, and provides a unified ILP optimization framework to determine optimal rematerialization decisions under memory constraints.
Practical relevance
This work allows practitioners to train larger deep models on memory-constrained hardware, expanding the feasible model sizes for edge and budget-limited deployments.
Research questions this paper is counted under
This page was written by language models from the title and abstract of each paper, and the answers were checked by two other models. It can be wrong: check the paper itself. Suggest a correction