Oases: Efficient Large-Scale Model Training on Commodity Servers via Overlapped and Automated Tensor Model Parallelism

Shengwei Li, Zhiquan Lai, Dongsheng Li, Yanqi Hao, Weijie Liu, Keshi Ge, Xiaoge Deng, Kai Lu

Abstract

Deep learning is experiencing a rise in large-scale models. Training large-scale models is costly, prompting researchers to train large-scale models on commodity servers that more researchers can access. The massive number of parameters necessitates the use of model parallelism training methods. Existing studies focus on training with pipeline model parallelism. However, the tensor model parallelism (TMP) is inevitable when the model size keeps increasing, where frequent data-dependent communication and computation operations significantly reduce the training efficiency. In this paper, we present Oases, an automated TMP method with overlapped communication to accelerate large-scale model training on commodity servers. Oases proposes a fine-grained training operation schedule to maximize overlapping communication and computation that have data dependence. Additionally, we design the Oases planner that searches for the best model parameter partition strategy of TMP to achieve further accelerations. Unlike existing methods, Oases planner is tailored to model the cost of overlapped communication-computation operations. We evaluate Oases on various model settings and two commodity clusters, and compare Oases to four state-of-the-art implementations. Experimental results show that Oases achieves speedups of 1.01–1.48x over the fastest baseline, and speedups of up to 1.95x over Megatron.

Introduction

As deep learning models grow to billions of parameters, they no longer fit within the memory of a single GPU. Researchers typically rely on model parallelism to distribute these workloads. While Pipeline Model Parallelism (PMP) splits layers across devices, Tensor Model Parallelism (TMP) is required for extremely large models to split individual mathematical operations.

However, TMP introduces a significant bottleneck: frequent, data-dependent communication (specifically AllReduce operations). On high-end datacenter GPUs with NVLink, this is manageable. But on commodity servers (e.g., RTX 3090 clusters), communication can consume up to 64% of training time. Oases addresses this by intelligently overlapping communication with computation and automating the model partitioning strategy.

The Oases System

Oases optimizes TMP training through two primary innovations: a fine-grained scheduling mechanism and an automated planner.

The Oases system architecture, featuring the Operation Scheduling and Oases Planner modules.

Fine-Grained Overlapping Training Schedule

  1. Batch Splitting: Oases divides data batches into sub-batches, allowing the system to pipeline execution. While one sub-batch computes, another communicates over the network, effectively hiding latency.
  2. Cross-Pass Scheduling: In memory-constrained environments, "recomputation" is often used to save memory. Oases breaks the traditional barrier between the recomputation and backward passes, scheduling them jointly to maximize overlapping opportunities.
  3. Redundant Communication Elimination: The system identifies that certain communications during recomputation are mathematically redundant. By eliminating these, Oases frees up bandwidth for the critical backward-pass gradients.

Automated Oases Planner

Because Oases changes how operations overlap, standard parallel strategy planners are insufficient. The Oases Planner utilizes a custom cost model to estimate the performance of overlapped operations and the overhead of "resharding" data between layers. Formulated as an Integer Linear Programming (ILP) problem, the planner automatically searches for the optimal TMP degree for each individual transformer layer, allowing for a heterogeneous strategy that maximizes efficiency on specific hardware.

Experimental Results

The authors evaluated Oases using standard model architectures (BERT, GPT, LLaMA, GPTNeoX) on commodity clusters, including those without high-speed NVLink interconnects.

Iteration time breakdown for BERT-1.3B and GPT-8.3B, comparing Oases to Megatron.
  • End-to-End Speedup: Oases achieved speedups of 1.01x to 1.48x over state-of-the-art baselines (such as Merak and Alpa) and up to 1.95x over the standard Megatron-LM framework.
  • Device Utilization: By effectively hiding communication, Oases significantly improves GPU utilization. For BERT-large on a non-NVLink cluster, utilization jumped from 56.2% in Megatron to 96.4% in Oases.
  • Scalability: When integrated with Pipeline Parallelism to train a 39.1B parameter GPT model, Oases still delivered a 1.35x speedup over the best baseline.

Conclusion

Oases demonstrates that efficient large-scale model training is possible on accessible, commodity hardware. By treating recomputation as a scheduling opportunity and utilizing a planner that understands overlapped costs, Oases significantly reduces the visible overhead of Tensor Model Parallelism. This system paves the way for more researchers to train massive models without requiring specialized datacenter infrastructure.

Summary updated

BibTeX
@article{li2023oases,
  author = {Shengwei Li and Zhiquan Lai and Dongsheng Li and Yanqi Hao and Weijie Liu and Keshi Ge and Xiaoge Deng and Kai Lu},
  title = {{Oases: Efficient Large-Scale Model Training on Commodity Servers via Overlapped and Automated Tensor Model Parallelism}},
  journal = {IEEE Trans. Parallel Distributed Syst.},
  year = {2023},
}
Figure