← Back to Leaderboard
Ddeepspeedai

deepspeedai/DeepSpeed

PyTorch runtime for distributed training and inference under GPU memory constraints

Engineering Health (Methodology)
A+ · 98/100
Maintenance Activity
● Updated today
Latest Release
v0.20.2
Commercial License Check
Apache-2.0 · Commercial Friendly

Automated SPDX check for reference only — not legal advice. Disclaimer

Maintenance35/35
Fork Adoption23/25
Release Cadence20/20
License Clarity20/20
GPU
Total Stars
★ 43,383
24h Growth
+2
7d Growth
+33
Forks
5,104

GitHub Star History

Full-history star trajectory from GitHub official history. Switch ranges or hover any point for exact counts.

deepspeedai/DeepSpeed Star History (2020-02-06 - 2026-12-04) ALL-TIME STAR HISTORY (2020-02 – 2026-12) +43.4k in 2493d · avg +17/day 45.8k 22.9k 0 2020-02-06: ★ 12020-07-11: ★ 2,4662020-12-12: ★ 3,5372021-05-15: ★ 4,5822021-10-16: ★ 5,3472022-03-19: ★ 6,1042022-08-20: ★ 7,2352023-01-21: ★ 8,1782023-06-24: ★ 25,0462023-11-25: ★ 28,5382024-04-27: ★ 31,6082024-09-28: ★ 33,9252025-03-01: ★ 36,2892025-08-02: ★ 38,8852026-01-03: ★ 40,6152026-06-06: ★ 42,1782026-12-04: ★ 43,383 ★ 43.4k 2020-02 2023-07 2026-12

Evidence-Backed Technical Brief

AI Deep Review

Architecture & Core Mechanics

DeepSpeed is a self-hosted optimization library embedded in a PyTorch application, rather than a standalone inference endpoint. The Python package lives in deepspeed/; csrc/, op_builder/, and accelerator/ separate native sources, operator build tooling, and accelerator support. DeepSpeed's JSON configuration and its integrations with Transformers, Accelerate, and Lightning give teams a way to configure the runtime within an existing workflow.

For execution paths that need native operators, PyTorch's C++ extension loader uses Ninja to compile and dynamically link them at runtime by default. Operators can also be prebuilt. That boundary matters in deployment: a successful Python package install is not the same as having a working native operator for the target stack. Check compatibility with ds_report, then exercise the actual execution path before rollout.

Key Capabilities & Differentiators

DeepSpeed addresses both distributed training and inference. Its clearest training differentiator is ZeRO: partitioning training state reduces duplication across data-parallel ranks, while ZeRO-Offload and ZeRO-Infinity extend the memory strategy beyond GPU VRAM. Tensor-parallel execution and work on mixture-of-experts models broaden the scope, but a feature in one execution path does not imply the same coverage in another.

The project identifies NVIDIA Pascal, Volta, Ampere, and Hopper and AMD MI100 and MI200 as tested GPU families. The accelerator table distinguishes upstream validation for Intel Gaudi 2 and Intel Data Center GPU Max from contributor-only validation for Huawei Ascend NPU, Tecorigin SDAA, and KUNLUNXIN XPU. Neither hardware validation nor a historical training example establishes that a particular model, precision, and operator combination will work for inference. Use the separate inference and communication benchmark suites as starting points, not as performance guarantees.

Trade-offs & Limitations

Start with plain PyTorch as a control when the workload fits on one GPU or ordinary distributed execution meets the requirement. DeepSpeed is most compelling when duplicated training state prevents a run from fitting or when offload is necessary to use available hardware. Sharding can save VRAM while adding communication; offload can shift the bottleneck to host memory, storage, or transfers. Compare peak VRAM, throughput, and step time under the same model and batch settings before committing.

For an inference-only product, compare with a serving-focused runtime using the same model, precision, sequence lengths, and concurrency. Measure time to first token, throughput, tail latency, and peak VRAM, and budget separately for the endpoint, request handling, and monitoring. DeepSpeed provides execution optimizations, not a managed service. Apache-2.0 permits commercial use and self-hosting, but model weights and third-party components still need their own license checks.

Hardware & Deployment Guide

Install PyTorch before running pip install deepspeed; PyTorch 2.0 or newer is recommended for full feature support. Native CUDA or ROCm builds need the appropriate compiler, such as nvcc or hipcc, and default JIT builds use Ninja. Pin and test the PyTorch, driver, and toolkit combination, run ds_report, and smoke-test the target model. Prebuilding can take compilation out of worker startup. Windows supports training and inference paths, but not AIO or GDS; build_win.bat is the documented wheel-build path with Visual C++ tools.

The recent release changes underline why the smoke test should cover the features you rely on. v0.20.0 fixes summation of GPTBigCode shared key/value gradients across tensor-parallel ranks and adds KUNLUNXIN XPU support. v0.20.1 adds a fused CPU Adam step. v0.20.2 releases the GIL during native CPU Adam updates and adds subchannel FP8/INT8 quantized training for nn.Linear and AutoEP experts. These are specific changes, not evidence of universal acceleration or FP8/INT8 inference coverage.

Training memory: ZeRO partitions redundant training state; ZeRO-Offload and ZeRO-Infinity provide offload paths.
Distributed execution: DeepSpeed covers training and inference, and v0.20.0 includes a GPTBigCode key/value gradient fix across tensor-parallel ranks.
Native operators: PyTorch's Ninja-backed C++ extension loader builds ops at runtime by default; prebuilding is also possible.
Framework integration: Transformers, Accelerate, and Lightning offer integration paths for existing PyTorch workflows.
Hardware validation: Gaudi 2 and Intel Data Center GPU Max have upstream validation; Ascend NPU and KUNLUNXIN XPU are listed as contributor-validated.
Release changes: v0.20.2 adds subchannel FP8/INT8 quantized training for nn.Linear and AutoEP experts and releases the GIL during native CPU Adam updates.
Best For

Teams scaling PyTorch training or fine-tuning past GPU memory limits with ZeRO or offload, and teams evaluating distributed inference that can validate model and operator compatibility on their own hardware.

Skip If

A single-GPU PyTorch baseline already meets your memory and performance goals, or you need a ready-to-run inference API rather than an execution library to integrate.

Reviewed on 2026-12-04 · Grounded in GitHub README, root file tree & releasesMethodology

Quick Start & Installation

GPU
pip install deepspeed

Comparison vs. Top LLMs & Inference Alternatives

Full comparison →
RepositoryStars7d TrendStackLicenseCore Positioning
DeepSpeed ★43.4k+33PythonApache-2.0PyTorch runtime for distributed training and inference under GPU memory constrai
ludwig11.8k+6PythonApache-2.0YAML-first framework for fine-tuning, training, and serving LLMs and multimodal
agent-lightning19k+30PythonMITProxy-based reinforcement learning for agents in their existing harnesses
pytorch105.9k+299Python—Python-first tensor SDK for GPU-accelerated training and inference

AI Context Briefing (for Claude / Cursor / Windsurf)

Standardized architecture summary & quickstart commands ready to paste into coding agents.

Raw .md ↗
curl -sL https://repoforai.com/repo/deepspeedai/DeepSpeed.md

Embed Star History Chart & Badges in README.md

Full-history Star History SVGs and velocity cards on GitHub Camo: drop-in replacement for OSSInsight and Star History widgets.

deepspeedai/DeepSpeed Star History on RepoForAI

Active README embeds unlock Hot-Tier 6h Telemetry Refresh automatically (zero pay-to-rank).

Frequently Asked Questions about DeepSpeed

How should I integrate DeepSpeed into an existing PyTorch stack?

For training and fine-tuning, start with the documented Transformers, Accelerate, or Lightning integration and manage the DeepSpeed JSON configuration with the job. For inference, verify the specific model, precision, and accelerator path separately; a training integration does not establish inference compatibility.

How much VRAM do I need, and how can I verify runtime compatibility?

There is no single VRAM requirement. For inference, size for weights at the chosen precision and measure peak VRAM at representative sequence lengths and concurrency. For training, measure with the intended batch size and ZeRO configuration; if you enable offload, also measure host memory and data-transfer overhead. Use ds_report to check operator compatibility, not to predict memory use.

Can we self-host DeepSpeed for commercial use?

Yes. Apache-2.0 permits commercial use and self-hosting without requiring you to publish private modifications. If you redistribute DeepSpeed, comply with the applicable license and notice obligations, including marking modified files where required. Check model weights and third-party dependencies separately.

When should I choose DeepSpeed over plain PyTorch or a dedicated inference server?

Use plain PyTorch as the baseline if the model already fits and the workload is straightforward. Evaluate DeepSpeed when training-state memory, offload, or distributed execution is the constraint. If you only need an online inference endpoint, compare against a serving-focused runtime at the same model, precision, and request mix, and account for the application-layer work on both sides.

Upstream README & Documentation

This profile focuses on independent engineering analysis and live telemetry. Read the full upstream README, changelog, and examples directly on GitHub.

Maintaining deepspeedai/DeepSpeed? Pin to Homepage + competitor /alternatives pages with a custom Cloud/Demo CTA.Feature deepspeedai/DeepSpeed on Homepage & Alternatives ($19)
WEEKLY BREAKOUT DIGEST

Top 10 Breakout Open-Source AI Repos, Every Thursday

Signal-only digest of fast-growing AI repos, SPDX license alerts, and architecture picks. Zero spam.

Zero spam · 1-click unsubscribe · Privacy Policy

Saved in your browser · Export Markdown RFC tables or jump into /vs compare