TL;DR
Distributed training of large language models (LLMs) typically demands expensive, high-bandwidth network interconnects to constantly synchronize gradients. This paper introduces a novel method that restricts backpropagation during local training steps so each node updates only a fixed, node-specific subset of parameters while keeping the rest frozen. This simple constraint slashes peak memory usage by up to 47% and training FLOPs by 15% while matching the perplexity of full-parameter low-communication baselines.
What Problem Does This Paper Address?
To scale LLM training, researchers typically split data across multiple compute nodes using Distributed Data Parallelism (DDP). Standard DDP synchronizes gradients at every single optimization step, which requires ultra-fast networks (like InfiniBand or NVLink) to avoid severe communication bottlenecks.
In commodity network environments (like standard Ethernet or Wi-Fi), every-step synchronization is prohibitively slow. "Low-communication" methods like DiLoCo alleviate this by allowing nodes to perform multiple local training updates before infrequently synchronizing a global average. However, these methods still require every node to store and update the entire model locally. This makes local GPU memory (storing weights, gradients, and optimizer states) the primary bottleneck, preventing researchers without high-end clusters from training billion-parameter models.
Methods
The authors propose a distributed variant of block coordinate descent. Instead of updating all parameters during local training rounds, the model's parameters are partitioned into a node-specific set of trainable parameters and a set of frozen parameters.
The training process for a local step proceeds as follows:
- Full Forward Pass: A standard forward pass is executed across all parameters. Because every node retains a copy of the full model, no cross-node activation exchange is required.
- Partial Backward Pass: Backpropagation is modified to compute gradients only for the designated trainable subset of parameters on that node.
- Inner Optimization: The local optimizer updates only the active parameters. This means gradient buffers and optimizer states (like Adam's momentum vectors) are omitted for the frozen parameters, dramatically lowering the memory footprint.
- Outer Optimization: After $H$ local steps, the sparse parameter updates (deltas) are averaged across nodes via an All-Reduce operation and applied to the global model using an outer optimizer.
The paper evaluates two partitioning strategies controlled by a slicing hyperparameter $N$:
- MLP-Only Slicing: Only the massive Multi-Layer Perceptron (MLP) blocks are sliced vertically (row-wise for up-projections, column-wise for down-projections). All other layers (attention, embeddings) are trained normally across all nodes.
- Slicing MLPs and Attention Heads: Extends the MLP slicing strategy by also partitioning the multi-head attention (MHA) input projection matrices ($W_Q, W_K, W_V$) into disjoint head groups.
Datasets
The authors evaluated their approach by training a 1.3-billion parameter Transformer model (matching the GPT-3 XL architecture) from scratch using the RedPajama-V2 dataset.
Key Insights and Ideas
- The "Free" Forward Pass: Retaining a full forward pass over all parameters is the secret sauce. It completely eliminates the need for cross-node activation exchange, which typically cripples pipeline or tensor parallel approaches on slow networks.
- The Full Input Jacobian is Mandatory: While you can skip computing gradients for frozen weights to save FLOPs, you must still compute the full Jacobian with respect to the layer inputs. The authors discovered that fully detaching frozen slices from the gradient flow entirely disrupts backpropagation and causes gradient explosion mid-training.
- Vertical Slicing Mimics MoE: Slicing weight matrices vertically within a layer effectively treats each block as an independent feed-forward pathway, reminiscent of a Mixture-of-Experts (MoE) layer. Conversely, horizontal slicing (assigning different entire layers to different nodes) failed to converge.
Key Results
- Drastic Memory Reductions: The $\frac{1}{4}\text{ mlps} + \frac{1}{4}\text{ heads}$ configuration reduced peak memory usage by up to 47% compared to standard DDP. Crucially, this allows a 1.3B parameter model to fit comfortably within the <16GB memory constraints of consumer hardware like an RTX 3090 GPU.
- Improved Compute Efficiency: Across performance-matched comparisons, the proposed method required 15% fewer total training FLOPs than Streaming DiLoCo while achieving identical test perplexity.
- Faster Wall-Clock Convergence: When simulating training over restricted networks (such as Wi-Fi 5/6/7 or 10 Gbps Ethernet), the method achieved roughly 2× faster wall-clock convergence than standard DDP, despite requiring more training tokens overall to reach the same target loss.
Limitations and Future Work
- Fixed Parameter Assignments: In the current implementation, the subset of trainable parameters assigned to a node remains static throughout training. Dynamically or adaptively reassigning parameter ownership could improve convergence, but doing so without introducing heavy communication overhead or duplicating optimizer states remains an open challenge.
- Architectural Sensitivity: The method is sensitive to what gets sliced. For instance, extending the slicing strategy to the outer attention projection matrix ($W_O$) led to noticeable performance degradation, meaning practitioners must carefully choose which blocks to freeze.
Summary updated