← all repositories
deepspeedai/DeepSpeed

The kitchen sink for training models that don't fit on one GPU

DeepSpeed is the optimization library that let the BLOOM and MT-530B teams train models too large to fit in any single GPU.

42.8k stars Python ML FrameworksInference · Serving
DeepSpeed
Velocity · 7d
+7.9
★ / day
Trend
accelerating
star history

What it does

DeepSpeed is a PyTorch-centric optimization library for distributed training and inference when your model outgrows a single GPU. It bundles memory-efficiency tricks (ZeRO, ZeRO-Infinity), multiple parallelism modes (data, tensor, pipeline, and Ulysses sequence parallelism), plus Mixture-of-Experts routing and recent tools like DeepNVMe for I/O scaling. The library essentially acts as a drop-in performance layer between your model code and the underlying hardware.

The interesting bit

The project treats GPU memory as a tiered storage problem rather than a flat pool. ZeRO partitions optimizer states, gradients, and parameters across data-parallel ranks, while ZeRO-Infinity spills to CPU and NVMe when necessary. Recent additions like ZenFlow and SuperOffload focus on making those offloading pipelines stall-free—because at this scale, the boring plumbing is the bottleneck.

Key highlights

  • Proven track record: has been used to train MT-530B, BLOOM, Jurassic-1, GLM-130B, GPT-NeoX, and others
  • Broad framework integration: Hugging Face Transformers, Accelerate, PyTorch Lightning, MosaicML, Determined, MMEngine
  • Multi-vendor hardware support: NVIDIA, AMD MI200, Intel Gaudi/XPU, Huawei Ascend NPU, plus CPU fallback
  • Active research-to-code pipeline: recent work includes Muon optimizer support, SDMA collectives for AMD GPUs, DeepCompile, and Ulysses-Offload for long-context training
  • Apache 2.0 licensed with public monthly office hours

Caveats

  • The README is heavy on news and adoption logos but light on architectural overviews; expect to read separate blog posts to understand trade-offs between ZeRO stages
  • C++/CUDA extensions build just-in-time by default, so your first run may pause for compilation

Verdict

Reach for DeepSpeed when your model spans multiple GPUs or nodes and PyTorch’s built-in distributed tools start gasping for air. If your workloads fit comfortably on a single GPU, the added complexity is likely overkill.

Frequently asked

What is deepspeedai/DeepSpeed?
DeepSpeed is the optimization library that let the BLOOM and MT-530B teams train models too large to fit in any single GPU.
Is DeepSpeed open source?
Yes — deepspeedai/DeepSpeed is open source, released under the Apache-2.0 license.
What language is DeepSpeed written in?
deepspeedai/DeepSpeed is primarily written in Python.
How popular is DeepSpeed?
deepspeedai/DeepSpeed has 42.8k stars on GitHub and is currently accelerating.
Where can I find DeepSpeed?
deepspeedai/DeepSpeed is on GitHub at https://github.com/deepspeedai/DeepSpeed.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.