Skip to content

Educational Implementation · Python

parallelism-from-scratch

Readable DDP, ZeRO-1/2, tensor and pipeline parallelism for a tiny Llama, with float64 parity tests (atol 1e-12) on CPU and DCP resharding

What it is

This repository provides a readable reference implementation of distributed training strategies for LLMs, including data parallelism, tensor parallelism, pipeline parallelism, and ZeRO stages, with thorough verification against a single-process reference.

  • data-parallelism
  • distributed-checkpoint
  • distributed-training
  • llm
  • pipeline-parallelism
  • pretraining
  • pytorch
  • tensor-parallelism
  • zero
Scored at2b27a9f21 Nov 2026Changes since

Merit describes the code at this commit. Later pushes count once the owner rescans. How merit is scored

Tests, level by level

From the files read · changes no score

  1. Tests exist: yes.8 test files in the repository.
  2. Can run as committed: yes.No missing imports in the test files read.
  3. CI runs them: yes.The whole suite: .venv/bin/python -m pytest -v --durations=10
  4. They pass: not checked.Not checked: AI-Atlas reads code and never runs it.

Distribution based on AI work

1 / 2
Machine Learning: 42.9%NLP & LLMs: 42.9%MLOps: 14.3%
  • Machine Learning43%
  • NLP & LLMs43%
  • MLOps14%

Each field's share of the project's AI work, as scoring counts it. It ranks in the field it is most about.

What the judge found

Read from the project's code at its scored commit.

Strengths4

  • Clear and educational implementation of multiple distributed training strategies.
  • Thorough verification against a single-process reference with high precision (atol=1e-12).
  • Extensive documentation in the README and code, including design notes and references to papers.
  • Modular structure covering data parallelism, tensor parallelism, pipeline parallelism, and ZeRO stages.

Limitations

The owner keeps this project's limitations private.

Around it on the Machine Learning board

Whole board
  1. 3celiumsnnArchitecture Modification / Research · Python72.1/100AdvancedMario Gutierrez
  2. 04DarwinScaffoldStudio.jlML Application · Julia71.4/100AdvancedDemetrios Chiuratto Agourakis
  3. 05parallelism-from-scratchEducational Implementation · Python71.1/100AdvancedGonzalo Fuentes
  4. 06datarustLibrary / Framework · Rust71.0/100AdvancedMurat Genç
  5. 07darwin-workspaceML Application · Python70.0/100AdvancedDemetrios Chiuratto Agourakis

More from Gonzalo Fuentes