DeepSpeed icon indicating copy to clipboard operation
DeepSpeed copied to clipboard

DeepSpeed - Q4 2026 Roadmap

Open PKUWZP opened this issue 2 months ago • 16 comments

This is the roadmap for DeepSpeed Q4 2026. Feedback is welcome — please leave comments on this issue or join the #2026q4-roadmap channel on the DeepSpeed Slack.

Some of the items are the extension of the Q3 roadmap: https://github.com/deepspeedai/DeepSpeed/issues/8104

Tagging all the PoCs (code maintainers) for each workstream, the PoCs can coordinate developer meetings, sort out implementation plan, and are responsible for updating the status.

New feature and enhancement

Mixture-of-Expert (MoE) Training Scaling and Kernel Development

Mixture-of-Expert (MoE) is the mainstream model architecture for frontier AI models. Scaling MoE training requires further improvement on the MoE backend of DeepSpeed, enabling better efficiency, scalability and performance.

  • [x] Pipelined Communication & Compute (More Efficient All-to-All Communications and Reduce HBM activation spikes) (PoC: @PKUWZP )
  • [ ] Block-Sparse Kernels for efficient token dropping (PoC: @PKUWZP )
  • [x] Hardware-Aware Memory Optimization & Model Sharding (PoC: @PKUWZP )
  • [ ] Expert Loading Balance & Hotspot Mitigations (PoC: @PKUWZP )
  • [ ] Resiliency & Silence Data Corruption Detection (PoC: @PKUWZP )
  • [ ] AutoEP Performance Optimization & Parallel Folding (AutoEP + AutoTP) (PoC: @tohtana @pengdurice )
  • [ ] MoE gradient norm and clipping (PoC @pengdurice )
  • [ ] FP8 GEMM for MoE (PoC @pengdurice )
  • [ ] Improvements of preset and configuration definitions for better coverage of MoE variants (PoC @pengdurice )

DeepCompile

  • [ ] Automatic optimization pass orchestration (@tohtana @sfc-gh-truwase @pengdurice )
  • [ ] Expert parallel support (@tohtana @pengdurice )
  • [ ] AutoSP with ZeRO (@tohtana )
  • [ ] Model coverage improvements including VL/VLA models (@tohtana @sfc-gh-truwase , optionally @PKUWZP )
  • [ ] Save/load optimized IR graphs (@tohtana )
  • [ ] Robustness improvements (@tohtana )

New Accelerators Support (Q4)

  • [ ] DeepSpeed TPU accelerators support and performance optimization (@PKUWZP @tohtana @sfc-gh-truwase )
  • [ ] Apple Silicon Accelerators support for DeepSpeed (@PKUWZP )
  • [ ] Performance Optimization on Emerging AI Accelerators (@PKUWZP @delock )

DeepSpeed HybridEngine Optimization (Q4)

  • [ ] Achieving on-par performance with small batch size compared to mainstream LLM Inference Engines (@delock @PKUWZP )
  • [ ] Continuous Batching Rollout support (@delock )
  • [ ] Kernel Injection for co-located rollout support (@delock )

Enable training of large scale models

  • [ ] Enable autoEP, autoTP, Ulysses under Z3 to unblock large scale model training ( POC @pengdurice @tohtana )
  • [ ] Test and verify support of SOTA models (model specific kernels, attention implementations can go to DeepSpeedExamples) ( POC @pengdurice )
  • [ ] Muon optimizer offload( POC @delock @pengdurice )
  • [ ] ReFlow Integration (POC @pengdurice @sfc-gh-truwase)

On-Policy Distillation (OPD) Trainer

  • [ ] Systems Optimization for Large model OPD across multi-accelerators. (@delock @minjiazhang @PKUWZP )
  • [ ] Coupled with HybridEngine Optimization for end-to-end benchmarking (@delock @minjiazhang @PKUWZP )
  • [ ] Documentation for OPD trainer onboarding (@delock @PKUWZP )

Code quality and health (Optional)

  • [ ] Continue deprecating legacy codes (PoC @sfc-gh-truwase )
  • [ ] Refactor the current code base, i.e. unified process group placement, unified optimizer initialization, reduce usages of globals, fix inconsistent code and doc descriptions. (PoC @sfc-gh-truwase @pengdurice )

AI Agent-driven Distributed Training Optimization (Optional)

  • [ ] DeepSpeed-native Agentic training optimization (TBD, tentatively @PKUWZP )

Agent Sandbox enablement for Agentic post-training capabilities (Optional)

  • [ ] Implement Agent Sandbox Environment for DeepSpeed to enable Agentic Post-training (@PKUWZP )

Universal Checkpointing (UCP) feature extension (Optional)

  • [ ] Affine mapping as Semantic free UCP info (Phase 1) (@delock )
  • [ ] UCP info support Yuan model TP sharding. (@delock )

PKUWZP avatar Sep 26 '26 07:09 PKUWZP

HybridEngineRollout we can add the following sub-items:

  1. Continous batching rollout support
  2. Qwen3.5 kernel injection for colocated rollout support

Also the new Universal Checkpoint feature:

  1. Affine mapping as semantic free UC info (Phase1)
  2. UC info support Yuan model TP sharding.

Muon update -- hardening

  1. Per head muon support
  2. CPU offload muon optimizer support

delock avatar Sep 29 '26 11:09 delock

HybridEngineRollout we can add the following sub-items:

  1. Continous batching rollout support
  2. Qwen3.5 kernel injection for colocated rollout support

Also the new Universal Checkpoint feature:

  1. Affine mapping as semantic free UC info (Phase1)
  2. UC info support Yuan model TP sharding.

Muon update -- hardening

  1. Per head muon support
  2. CPU offload muon optimizer support

@delock Thanks so much for the info. Added to the roadmap items.

PKUWZP avatar Sep 29 '26 15:09 PKUWZP

Hi @tohtana, I'd like to pick up the optimized IR save/load item. I'd start with reuse across process restarts for the same model and parallel topology, checking that the restored graphs produce the same loss and gradients as a fresh compile. Is this scope available, and is there a preferred serialization approach I should build on?

WEIXILIN0307 avatar Oct 02 '26 04:10 WEIXILIN0307

Tentative: Quarterly Milestones for large scale training and code quality / health:

  1. Large scale training by end of Q4: --> enable support of some SOTA models with autoEP, autoTP, Zero3, Muon offloading and model specific codes (if necessary) in place, achieve comparable results with other frameworks, e2e training with major results reported, e.g. loss curve, mfu, speed.
  2. Long context large model support: by end of Q1, 2027 --> enable long context training with the above as well as reconciled TP and SP.
  3. Code quality and health: by end of Q2, 2027 --> deprecate legacy functionalities, make sure doc and codes are consistent, unify process group placement, optimizer initialization, reduce usage of anti-pattern codes and designs.

pengdurice avatar Oct 02 '26 22:10 pengdurice

Hi @tohtana, I'd like to pick up the optimized IR save/load item. I'd start with reuse across process restarts for the same model and parallel topology, checking that the restored graphs produce the same loss and gradients as a fresh compile. Is this scope available, and is there a preferred serialization approach I should build on?

Hi @Pinoeer-kingxi, thank you for your interest in contributing! We're planning to hold developer meetings to coordinate our efforts, and we'll announce the schedule once it's finalized.

tohtana avatar Oct 03 '26 18:10 tohtana

Hi @PKUWZP — I noticed Resiliency & Silent Data Corruption Detection is explicitly listed in the Q4 roadmap.

We’re building an independent verification system for exactly this class of problem: reproducible execution, numerical/behavioral comparison, deterministic replay, divergence localization, and evidence-backed PASS / FAIL / UNPROVEN results.

Rather than propose a new feature or pitch a product, we’d like to validate the system on one real DeepSpeed workload from this workstream.

If you can point us to a workload, configuration, or failure scenario where silent corruption or correctness is difficult to verify, we’ll run the independent verification at no cost and return the reproducible evidence back to the project.

One real workload is enough for us to start

Kalex14566 avatar Oct 06 '26 11:10 Kalex14566

I’d like to take on multi-node correctness and stress testing for the AutoEP + AutoTP + ZeRO work in this roadmap, starting from the implementation in #8670. I can run tests on 16 H100 GPUs, with an 8-GPU baseline before extending coverage across nodes.

My first milestone would be active gradient clipping with AutoEP + AutoTP + ZeRO-3, alongside ZeRO-2 comparisons. I’ll use a small model and an independent reference to check the full logical gradients, global gradient norm, and resulting optimizer update.

From there, I’d extend coverage to:

  • Node-local and cross-node EP groups.
  • Skewed routing and idle experts.
  • Gradient accumulation.
  • Checkpoint/resume with the same topology, checking optimizer-state and update continuity.

I’ll share pinned revisions, reproducible configurations, topology details, and per-rank logs. For any failures, I’ll work toward minimized reproducers and focused regression tests and fixes, coordinating with @pengdurice and the existing PR authors. For configurations that pass correctness checks, I’ll also record step time, tokens/s, and peak GPU memory.

@pengdurice, please let me know if there’s a preferred revision or configuration to prioritize. I’ll start with the clipping/update checks and report the first validation results back here.

0z5a avatar Oct 09 '26 16:10 0z5a

Tentative: Quarterly Milestones for large scale training and code quality / health:

  1. Large scale training by end of Q4: --> enable support of some SOTA models with autoEP, autoTP, Zero3, Muon offloading and model specific codes (if necessary) in place, achieve comparable results with other frameworks, e2e training with major results reported, e.g. loss curve, mfu, speed.
  2. Long context large model support: by end of Q1, 2027 --> enable long context training with the above as well as reconciled TP and SP.
  3. Code quality and health: by end of Q2, 2027 --> deprecate legacy functionalities, make sure doc and codes are consistent, unify process group placement, optimizer initialization, reduce usage of anti-pattern codes and designs.

Thanks @pengdurice for putting TP×SP on the roadmap as a key direction and sketching an initial blueprint for it.

I ran into this problem while working on the AutoTP vocab-parallel work in #8173. In #8309, handling TP×SP at the loss level came up quickly, but we didn't have enough design groundwork or automatic mesh infrastructure to support it properly. So I scoped the PR down. I kept only the loss API that takes explicit, orthogonal tp_group/sp_group (checked against a manually built 4-GPU TP×SP mesh), withdrew the rest of the TP×SP integration, and listed the TP×SP mesh as follow-up work.

Reconciling TP and SP still needs design work, mainly on automatic mesh construction, loss aggregation under Ulysses, and how it composes with ZeRO-3 / AutoEP, and I'd would contribute it.

jinyouzhi avatar Oct 10 '26 15:10 jinyouzhi

  1. Completing Vocab-Parallel Support for Large-Vocabulary Training

    • Vocab-parallel Fused Linear Cross-Entropy (FLCE)
    • Explore wiring FLCE into the vocab_parallel_lm_head config path for HF models
    • Vocab-parallel Support for RL & OPSD
    • DeepCompile AutoTP pass support for VocabParallelEmbedding and vocab-parallel head/loss
    • End-to-end validation with ZeRO (1/2/3) and SP on large-vocabulary models
  2. DeepCompile

    • AutoSP beyond SDPA

jinyouzhi avatar Oct 10 '26 16:10 jinyouzhi

Qwen3-30B-A3B end-to-end: DeepSpeed (AutoEP + ZeRO-3) vs Megatron-Core, 16x H100

First end-to-end results for the Q4 large-scale training milestone. Same hardware, same weights, same token stream, same hyperparameters on both sides.

Setup

  • 16x H100 64 GB (MareNostrum 5 ACC, 4 nodes x 4 GPUs, NVLink inside a node, 4x NDR200 InfiniBand per node with GPUDirect RDMA). torch 2.12.1+cu130, NCCL 2.29.7, transformers 5.15.1.
  • DeepSpeed upstream 1c862f7df (includes #8670), HF Qwen3-MoE + AutoEP (qwen3_moe preset), torch AdamW, SDPA attention.
  • Megatron-Core core_v0.19.2 + TransformerEngine 2.20.2, distributed optimizer, TE grouped GEMM, alltoall dispatcher. HF weights are loaded into each rank's shard before the optimizer is built. A 2-layer mapping check against an independent HF forward gives CE rel. diff ≤ 1.8e-4 and layer-0 cosine 0.99998.
  • Weights: Qwen/Qwen3-30B-A3B (the post-trained checkpoint, used as interim weights; the Base runs are still to do).
  • Data: FineWeb-Edu sample/10BT, pre-tokenized once with the Qwen3 tokenizer into one uint32 stream that both frameworks read in the same order. Megatron's per-rank sample indices were checked against the contract.
  • Shared settings: seq 4096, global batch 256 (1.05M tokens/step), AdamW β=(0.9, 0.95), wd 0.1 (no decay on 1-D params), clip 1.0, peak lr 3e-5, 100 warmup steps, cosine to 3e-6, per-layer full activation recompute, dropless top-8 routing. The aux loss is Megatron's per-layer switch loss (coef 1e-3) on both sides. Router gate GEMM is bf16 on both sides, because AutoEP's gate runs in bf16.

Step-0 alignment (first 5 steps, same batches)

DeepSpeed A (EP4) vs Megatron EP16 DeepSpeed A vs Megatron EP8
CE rel. diff 1.6e-4 to 2.6e-4 1.3e-4 to 2.6e-4
grad-norm diff 0.31% to 0.55% 0.38% to 0.54%

DeepSpeed itself is layout-consistent: EP4, EP8 and EP16 give step-0 CE 2.248076 and grad norm 5.457 ± 0.0002.

1B tokens (954 steps), one seed per framework

DeepSpeed (ZeRO-3, EP4) Megatron-Core (EP8)
final train CE (step 953) 2.01718 2.01714
held-out eval CE (50.3M unseen tokens) 2.033794 2.033750
50-step EMA CE, max rel. diff over 954 steps 2.2e-4
median step (steps 50-953) 34.58 s 27.90 s
tokens/s/GPU 1,895 2,349
MFU, 6·N_act + attention, 989 TFLOPS peak 4.4% 5.5%
MFU vs measured sustained BF16 GEMM (706 TFLOPS) 6.2% 7.7%
peak memory (alloc / reserved) 40.4 / 45.5 GiB 56.1 / 60.6 GiB

The held-out loss agrees to 2.2e-5 relative. Megatron-Core is ~24% faster at this point. The DeepSpeed side is untuned: non-fused AdamW, SDPA, default bucket and overlap settings. Megatron runs without gradient-accumulation fusion, because apex is not installed.

DeepSpeed layout scan (12-step smoke, same data)

config layout step tokens/s/GPU peak alloc
A ZeRO-3, EP4 (intra-node) 33.7 s 1,943 40.3 GiB
A8 ZeRO-3, EP8 (2 nodes) 44.5 s 1,472 40.4 GiB
B ZeRO-3, EP16 (4 nodes) 50.9 s 1,287 39.5 GiB
C ZeRO-3, EP4 + attention TP2 folded 70.3 s 933 40.9 GiB
D ZeRO-2, EP4 OOM at the first optimizer step (64 GB) 48.2 GiB at step 0

Notes:

  • Cross-node expert parallel costs a lot here. All-to-all bus bandwidth measured with the training NCCL is 289 GB/s within a node, 40 GB/s across 2 nodes, and 28 GB/s across 4 nodes, which is close to the 4x200 Gb/s NIC limit per node.
  • Max/mean expert load reaches ~11.5 in some layers.
  • Folding (C) costs ~2x step time at this size, and A already has ~18 GiB headroom.
  • Megatron cannot run the EP4 layout on 64 GB cards under its distributed optimizer (~75 GB/GPU estimated), so its matched layout is EP8.

Caveats

  • Interim post-trained weights, not Base.
  • One seed per framework, so there is no seed band yet.
  • 64 GB H100s, so layouts differ from the 80 GB plan.
  • Throughput numbers are untuned baselines. They are the starting point for the bottleneck list, not a verdict.

0z5a avatar Oct 15 '26 14:10 0z5a

Hi @pengdurice and @0z5a,

I'd like to contribute to the large-scale training workstream, particularly ZeRO-3 CPU offloading.

While reviewing #8841, I noticed that its fused gradient scaling/clipping and BF16 parameter writeback overlap with optimizations I've already implemented in ReFlow (#8719).

I also explored a few additional bottlenecks:

  • Gradient offloading: FP32 conversion in "partition_grads()" can delay PCIe transfers and potentially affect backward overlap.
  • Gradient accumulation: CPU–GPU round trips introduce additional data movement and potential synchronization stalls.
  • CPU memory: FP32 gradient buffers increase memory traffic and memory requirements.

To address these, I implemented an approach that retains BF16/FP16 gradients and promotes them to FP32 only inside CPU SIMD registers during optimizer computation. I also implemented intermediate gradient accumulation directly on the CPU. These optimizations improve CPU optimizer efficiency and reduce memory usage, potentially enabling larger models without NVMe offloading.

I'd be interested in contributing these optimizations to the roadmap and discussing their upstream integration.

The high-end multi-GPU systems(A100/B200) used for my original evaluation are no longer available to me, but I can help with implementation and smaller-scale validation.

I'd appreciate your thoughts!

st-bang97 avatar Oct 18 '26 17:10 st-bang97

Hi @pengdurice and @0z5a,

I'd like to contribute to the large-scale training workstream, particularly ZeRO-3 CPU offloading.

While reviewing #8841, I noticed that its fused gradient scaling/clipping and BF16 parameter writeback overlap with optimizations I've already implemented in ReFlow (#8719).

I also explored a few additional bottlenecks:

  • Gradient offloading: FP32 conversion in "partition_grads()" can delay PCIe transfers and potentially affect backward overlap.
  • Gradient accumulation: CPU–GPU round trips introduce additional data movement and potential synchronization stalls.
  • CPU memory: FP32 gradient buffers increase memory traffic and memory requirements.

To address these, I implemented an approach that retains BF16/FP16 gradients and promotes them to FP32 only inside CPU SIMD registers during optimizer computation. I also implemented intermediate gradient accumulation directly on the CPU. These optimizations improve CPU optimizer efficiency and reduce memory usage, potentially enabling larger models without NVMe offloading.

I'd be interested in contributing these optimizations to the roadmap and discussing their upstream integration.

The high-end multi-GPU systems(A100/B200) used for my original evaluation are no longer available to me, but I can help with implementation and smaller-scale validation.

I'd appreciate your thoughts!

Thank you so much for your review of my PR and contribution of https://github.com/deepspeedai/DeepSpeed/pull/8719. That PR is great work, however that's too large a change and we probably want to split into smaller (but not too many) PRs;-). With that, feel free to work on additional improvements you think are valuable and share your benchmarking results.

pengdurice avatar Oct 20 '26 19:10 pengdurice

Tentative: Quarterly Milestones for large scale training and code quality / health:

  1. Large scale training by end of Q4: --> enable support of some SOTA models with autoEP, autoTP, Zero3, Muon offloading and model specific codes (if necessary) in place, achieve comparable results with other frameworks, e2e training with major results reported, e.g. loss curve, mfu, speed.
  2. Long context large model support: by end of Q1, 2027 --> enable long context training with the above as well as reconciled TP and SP.
  3. Code quality and health: by end of Q2, 2027 --> deprecate legacy functionalities, make sure doc and codes are consistent, unify process group placement, optimizer initialization, reduce usage of anti-pattern codes and designs.

Thanks @pengdurice for putting TP×SP on the roadmap as a key direction and sketching an initial blueprint for it.

I ran into this problem while working on the AutoTP vocab-parallel work in #8173. In #8309, handling TP×SP at the loss level came up quickly, but we didn't have enough design groundwork or automatic mesh infrastructure to support it properly. So I scoped the PR down. I kept only the loss API that takes explicit, orthogonal tp_group/sp_group (checked against a manually built 4-GPU TP×SP mesh), withdrew the rest of the TP×SP integration, and listed the TP×SP mesh as follow-up work.

Reconciling TP and SP still needs design work, mainly on automatic mesh construction, loss aggregation under Ulysses, and how it composes with ZeRO-3 / AutoEP, and I'd would contribute it.

It is more imperative to unify and refactor how we create process groups and meshes. It is on our agenda and contribution is welcome;-)

pengdurice avatar Oct 20 '26 19:10 pengdurice

Hi @pengdurice,

Thanks for the feedback!

I understand your concern about the size of #8719. I'm thinking of contributing the optimizations to the default DeepSpeed CPUAdam path through three smaller PRs, while keeping ReFlow itself as a single PR.

  1. Fused CPUAdam kernel: Integrate gradient scaling/clipping and low-precision parameter generation directly into the CPUAdam kernel. Since these optimizations are already implemented in ReFlow and overlap with #8841, would it be okay if I prepared a new PR based on my existing implementation rather than extending #8841? I'd coordinate the overlapping changes to avoid duplication.

  2. Low-precision gradient offloading: Transfer BF16/FP16 gradients directly to the CPU and promote them to FP32 inside SIMD registers during the optimizer update. This avoids GPU-side FP32 promotion, reduces PCIe transfer volume and associated backward overhead, and eliminates the CPU memory traffic and footprint of separate FP32 gradient buffers. I'd enable this by default for compatible configurations on supported AVX-512 CPUs, with the existing path as a fallback.

  3. CPU-side BF16 gradient accumulation: Add optional CPU-side accumulation to avoid the blocking latency of fetching previously offloaded gradients from the CPU back to the GPU during intermediate accumulation steps. The final accumulation and gradient-norm computation would remain on the GPU, as in ReFlow. This would be a separate PR since it requires additional CPU workers.

For reference, I evaluated the optimizations corresponding to the first two PRs on B200 GPUs with gradient accumulation steps = 1. The original ReFlow ablation study reports the following per-GPU throughput (TFLOPS/GPU), in the order of ZeRO-Infinity → fused kernels → fused kernels + low-precision gradient handling:

  • 1 GPU: 166.41 → 297.59 → 354.01
  • 4 GPUs: 366.40 → 458.34 → 494.46
  • 8 GPUs: 420.36 → 504.09 → 531.91

These results are from the original ReFlow implementation, not separate benchmarks of the proposed upstream PRs. Since gradient accumulation was set to 1, PR 3 is not included.

Unfortunately, I no longer have access to the B200 systems and don't have separate measurements isolating the performance impact of CPU-side gradient accumulation.

@0z5a, thank you for independently validating my earlier CPUAdam fix (#7982) and for your detailed review of #8841. I appreciate your help! If either you or @pengdurice has suitable hardware available, would you be willing to help benchmark PR 3 once it's ready?

Regarding #8719, I kept ReFlow in separate modules, similar to ZenFlow, to minimize interference with the existing DeepSpeed path. Its asynchronous workers, gradient buffers, and update scheduling are closely coupled, making it difficult to split into independently functioning PRs.

I think keeping ReFlow together for now may be more practical. As the default-path improvements are integrated, I can also consolidate the shared code to avoid duplication.

The ReFlow manuscript is available on my [personal website](https://st-bang97.github.io/). I haven't attached the PDF here while I double-check ACM's manuscript-sharing policy.

Thanks again!

st-bang97 avatar Oct 21 '26 16:10 st-bang97

Hi @PKUWZP, I'd like to take on the part on Agentic Post-training. I have implemented multi-turn tool calling rollout and run retool example under @minjiazhang's supervision, and I would like to further develop it down the agentic RL direction according to this plan #8942

anyadontfly avatar Oct 29 '26 08:10 anyadontfly

Hi @tohtana, I’d like to contribute to the automatic optimization pass orchestration item. Is anyone already working on it?

For a first step, I’m thinking of building a small planner for the existing built-in schedules, reusing the current pass contracts to check dependencies and conflicts. I’d preserve the existing warmup and profiling order, and keep explicit user-defined schedules unchanged.

Would this be a useful scope to start with? I’d be happy to discuss the design before implementing it. Thank you!

WEIXILIN0307 avatar Nov 12 '26 05:11 WEIXILIN0307