Model Parallelism With Subnetwork Data Parallelism
Vaibhav Singh, Zafir Khalid, Edouard Oyallon, Eugene Belilovsky
TL;DR
This work tackles the memory bottlenecks of pretraining large neural networks by introducing Subnetwork Data Parallelism (SDP), which partitions a model into structurally complete subnetworks trained across workers without exchanging activations. SDP supports two masking regimes—forward masking and backward masking—and two subnetwork constructions—Neuron-Level SDP and Block-Level SDP—providing theoretical guarantees (backward masking convergence under $L$-smoothness and a spectral-gap deviation bound) and concrete memory/communication cost reductions. Empirically, SDP achieves 30%-75% per-device memory savings while maintaining or even improving accuracy across CNNs, vision transformers, and LLM pre-training, with forward masking sometimes outperforming the dense data-parallel baseline in FLOP-matched settings. The results demonstrate SDP as a practical approach to scaling model capacity under fixed hardware constraints, enabling training of larger models with reduced communication and memory overhead.
Abstract
Pre-training large neural networks at scale imposes heavy memory demands on accelerators and often requires costly communication. We introduce Subnetwork Data Parallelism (SDP), a distributed training framework that partitions a model into structured subnetworks trained across workers without exchanging activations. We study two complementary masking regimes: backward masking, which applies sparsity only in the backward step to retain unbiased gradients, and forward masking, which also removes parameters in the forward pass to deliver stronger efficiency gains while providing additional regularization. We further explore two subnetwork construction strategies: neuron level and block level, applied across both CNNs and transformers. In experiments spanning CNNs and transformers on CIFAR and ImageNet, as well as LLM pre-training on FineWeb, SDP reduces per-device memory usage by 30%-75% while maintaining or improving performance. Notably, in FLOP-matched settings, forward masking can sometimes achieve better performance.
