distributed-training

For training models across multiple GPUs or nodes, handling very large models that don't fit in single-machine memory, or improving training throughput. Covers distributed data parallel (DDP), model-parallel approaches (e.g. FSDP), DeepSpeed ZeRO, model/data parallelism strategies, and gradient checkpointing techniques.

Last repository push
GitHub Stars
237
Forks
32
Issues / PRs
2

Installation

Review the source and dependencies with a prompt. A package is available to download.

Install with an AI assistant

Copy the prompt so your assistant can review the pinned revision and dependencies first.

View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "distributed-training" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-fe25780435a06e3963132132d096cb9cfde02f485355952f698a33fd7e4645f0. Verify the upstream source and version against https://github.com/omer-metin/skills-for-antigravity before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.

Source and setup

github.com

Setup guidance pending

See the original source for supported tools, dependencies, and permissions.

Installation test pending

For training models across multiple GPUs or nodes, handling very large models that don't fit in single-machine memory, or improving training throughput. Covers distributed data parallel (DDP), model-parallel approaches (e.g. FSDP), DeepSpeed ZeRO, model/data parallelism strategies, and gradient checkpointing techniques.

0 Downloads

Introduction source: third_party · omer-metin · 0.0.1 Reference

SkillPi interpretation

Tasks
Distributed Training Optimization
Testing
Not tested

Browse files

Browse files at the source ↗

Original SKILL.md

Open original ↗
Frontmatter
name: distributed-training
description: Distributed Training Optimization

Distributed Deep Learning Mechanics

Ring All-Reduce

Synchronous data parallel training requires gradients from all GPUs to be averaged before the optimizer step. Instead of a parameter server bottleneck, Ring All-Reduce organizes N GPUs into a logical ring. The gradient tensors are split into N chunks. During the scatter-reduce phase, GPUs pass chunks around the ring, accumulating sums. After N-1 steps, each GPU holds one fully accumulated chunk. In the subsequent all-gather phase, these complete chunks are circulated. Total network transfer per GPU is 2(N-1)/N Size, making it bandwidth-optimal and highly scalable.

ZeRO Optimizer (Zero Redundancy Optimizer)

Standard Data Parallelism duplicates the entire model state across all GPUs, which is impossible for LLMs like GPT-3. ZeRO eliminates this memory redundancy by partitioning the state.

  • ZeRO Stage 1: Partitions Optimizer States (e.g., Adam momentum/variance). Cuts memory footprint by 4x.
  • ZeRO Stage 2: Partitions Gradients. Each GPU only holds gradients for its parameter partition, reducing memory by 8x.
  • ZeRO Stage 3: Partitions Parameters. Model weights are scattered. Forward/backward passes use dynamic collective communications (All-Gather) to fetch required parameters just-in-time for a layer's computation, and immediately discard them, allowing training of trillion-parameter models.
flowchart TD
%%{init: {"theme": "default", "flowchart": {"useMaxWidth": true}}}%%
    subgraph CommunicationRingAllReducePhase ["Ring All-Reduce Phase<br><br><br>"]
        GPU_0 -->|"send_chunk()"| GPU_1
        GPU_1 -->|"accumulate()"| GPU_2
        GPU_2 -->|"forward()"| GPU_0
    end
    subgraph ZeROStagesZeROPartitioning ["ZeRO Partitioning<br><br><br>"]
        Stage1 -->|"partition_adam()"| MemorySave
        Stage2 -->|"partition_grads()"| ReduceScatter
        Stage3 -->|"partition_weights()"| AllGather
    end

Current listing version

0.0.1

Verify the source revision ↗

Safety and assessment details

Quality assessment

Out of 100 · Assessment report from SkillPi LAB.

Scenario Value78/100

Highlights

  • 针对分布式训练这一深度学习领域的高频刚需场景
  • 涵盖DDP、FSDP、DeepSpeed ZeRO、模型/数据并行以及梯度检查点技术等主流方案
Trigger Precision92/100

Highlights

  • 触发词精准完整,覆盖多种变体
  • 边界清晰,不易误触或漏触
Structure and Standards85/100

Highlights

  • Phase/步骤清晰,有出口条件
  • 含端到端示例,frontmatter完整
Execution Reliability88/100

Highlights

  • 工具来源明确,参数正确
  • 覆盖主要异常,不可逆操作有确认机制
Evidence Verifiability (mean of the first four)86/100

The arithmetic mean of the first four original scores, rounded to a whole number.

Static text checks

100 / 100 · skillpi-20261123-no-r3-v1

No current rules matched the text.

This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.

Permissions and checks before use

Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.

These common operations were not identified in the main document. This does not mean no permissions or risks exist.

These notices grant no permissions. Your host tool must still confirm file changes, secrets, external transfers or costs as needed.

Security rating and access scope

safe · Static evidence review; not a runtime safety guarantee.

Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.