Skip to content

Add a DeepSpeed full-training backend - #2

Open
kailash109 wants to merge 2 commits into
mainfrom
feat/deepspeed-backend
Open

Add a DeepSpeed full-training backend#2
kailash109 wants to merge 2 commits into
mainfrom
feat/deepspeed-backend

Conversation

@kailash109

@kailash109 kailash109 commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add a clean CommandBackend implementation for Hugging Face models trained with DeepSpeed ZeRO-2
  • add Qwen3-8B and Qwen3.5-9B-Base 8×H100 definitions for distributed full-parameter training
  • support Qwen3.5's multimodal model loader and nested text token configuration
  • move the full-model delta publisher out of Megatron runtime and feed it through backend-specific HF weight exporters
  • leave engine/ and control_plane/ unchanged; provider integration is limited to the image, definitions, and registry

Validation

  • uv run pytest -q — 270 passed, 1 skipped
  • changed-file Ruff and git diff --check
  • Qwen3-8B DeepSpeed checkpoint E2E — fresh-client restore error 0.0, next-update error 0.0, identical loss and grad norm
  • Qwen3-8B rollout-to-RL E2E — delta publication, SGLang sampling, importance-sampling backward, and optimizer update succeeded
  • Qwen3.5-9B-Base math RL — completed 20 steps at 32 trajectories/step and 1e-6 learning rate; five-step mean exact-answer rate rose from 61.25% to 96.88%, with 100% on the final step

Qwen3.5-9B-Base convergence

Qwen3.5-9B-Base DeepSpeed math RL convergence

Checkpoint report: scripts/results/deepspeed_qwen3_8b_checkpoint_e2e.20260904203306.json

RL report: scripts/results/deepspeed_qwen3_8b_e2e.20260904203909.json

Current scope

  • full-parameter, single-model engines
  • DeepSpeed ZeRO stages 1 and 2; the sample definitions use ZeRO-2 data parallelism
  • cross_entropy and importance_sampling losses
  • checkpoint capture writes an immutable local DeepSpeed checkpoint before asynchronous Volume persistence
  • ZeRO-3, TP/PP, multi-model adapters, and throughput optimization are intentionally deferred

Boundary result

  • no DeepSpeed imports or conditionals in engine or control-plane code
  • DistributedExecutor, EngineServer, control-plane placement, checkpoint orchestration, and sampling orchestration are reused unchanged

Made with Cursor

kailash109 and others added 2 commits September 4, 2026 21:02
Prove the CommandBackend boundary with Qwen3-8B ZeRO-2 training, exact checkpoint continuation, and shared full-model sampler publication without changing engine or control-plane code.

Co-authored-by: Cursor <cursoragent@cursor.com>
Load Qwen3.5 through its multimodal model class and add a tuned 20-step math RL deployment with convergence validation.

Co-authored-by: Cursor <cursoragent@cursor.com>
@kailash109
kailash109 marked this pull request as ready for review September 8, 2026 18:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant