-
Notifications
You must be signed in to change notification settings - Fork 220
[doc] refactor: split technique guidance into docs, skills, and knowledge #2809
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
e397f32
5c31754
033eb68
5d8044c
75c9995
4f6cca7
f543ff5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -435,6 +435,53 @@ For example, with 32 GPUs total and the configuration above: | |||||||||||||||||
| - `context_parallel_size = 2` | ||||||||||||||||||
| - `data_parallel_size = 32 / (2 × 4 × 2) = 2` | ||||||||||||||||||
|
|
||||||||||||||||||
| ## Strategy Selection Guide | ||||||||||||||||||
|
|
||||||||||||||||||
| Choosing the right combination depends on model size, hardware topology, | ||||||||||||||||||
| and sequence length. | ||||||||||||||||||
|
|
||||||||||||||||||
| ### Dense Models by Size | ||||||||||||||||||
|
|
||||||||||||||||||
| | Model size | GPUs | Recommended starting point | | ||||||||||||||||||
| |---|---|---| | ||||||||||||||||||
| | < 1B | 1-8 | DP only | | ||||||||||||||||||
| | 1-10B | 8-16 | TP=2-4 + DP | | ||||||||||||||||||
| | 10-70B | 16-64 | TP=4-8 + PP=2-4 + DP | | ||||||||||||||||||
| | 70-175B | 64-256 | TP=8 + PP=4-8 + DP | | ||||||||||||||||||
| | 175-500B | 256-1024 | TP=8 + PP=8-16 + CP=2 + DP | | ||||||||||||||||||
|
|
||||||||||||||||||
| ### MoE Models | ||||||||||||||||||
|
|
||||||||||||||||||
| MoE models differ fundamentally from dense models: only a fraction of | ||||||||||||||||||
| parameters are active per token, so TP can often stay at 1 or 2. EP is | ||||||||||||||||||
| the primary scaling dimension. | ||||||||||||||||||
|
|
||||||||||||||||||
| | Total / active params | Typical layout | | ||||||||||||||||||
| |---|---| | ||||||||||||||||||
| | < 20B | EP only (TP=1, PP=1) | | ||||||||||||||||||
| | 20-100B | TP=1-2 + PP=2-4 + EP=8-16 | | ||||||||||||||||||
| | 100-500B | TP=2-4 + PP=8-16 + EP=8-32 | | ||||||||||||||||||
| | 500B+ | TP=2 + PP=16 + EP=32-64 | | ||||||||||||||||||
|
|
||||||||||||||||||
| ### By Hardware Topology | ||||||||||||||||||
|
|
||||||||||||||||||
| - **Single node with NVLink**: maximize TP within the node (up to TP=8). | ||||||||||||||||||
| - **Multiple nodes with InfiniBand**: keep TP within a node, use PP across nodes. | ||||||||||||||||||
| - **Limited network (Ethernet)**: minimize TP, prefer PP for cross-node scaling. | ||||||||||||||||||
|
|
||||||||||||||||||
| ### By Sequence Length | ||||||||||||||||||
|
|
||||||||||||||||||
| | Sequence length | Recommendation | | ||||||||||||||||||
| |---|---| | ||||||||||||||||||
| | < 2K | standard TP + PP + DP | | ||||||||||||||||||
| | 2K-8K | add SP (`sequence_parallel=True`) | | ||||||||||||||||||
| | 8K-32K | add CP=2 | | ||||||||||||||||||
| | 32K+ | add CP=4-8, consider hierarchical CP | | ||||||||||||||||||
|
|
||||||||||||||||||
| For operational details on configuring combined parallelism, troubleshooting | ||||||||||||||||||
| layouts, and memory estimation, see the | ||||||||||||||||||
| [parallelism strategies skill](../skills/perf-techniques/parallelism-strategies/SKILL.md). | ||||||||||||||||||
|
|
||||||||||||||||||
| ## Configuration Guidelines | ||||||||||||||||||
|
|
||||||||||||||||||
| ### Memory Optimization | ||||||||||||||||||
|
|
@@ -458,6 +505,11 @@ For example, with 32 GPUs total and the configuration above: | |||||||||||||||||
| - **Token dropping** requires `alltoall` or `alltoall_seq` token dispatcher | ||||||||||||||||||
| - All parallelism strategies can be combined, but total parallelism must divide evenly into the world size | ||||||||||||||||||
|
|
||||||||||||||||||
| ## Related Artifacts | ||||||||||||||||||
|
|
||||||||||||||||||
| - **Operational skill**: [skills/perf-techniques/parallelism-strategies/SKILL.md](../skills/perf-techniques/parallelism-strategies/SKILL.md) — enablement, pitfalls, memory estimation, verification | ||||||||||||||||||
| - **Knowledge card**: [skills/perf-techniques/parallelism-strategies/card.yaml](../skills/perf-techniques/parallelism-strategies/card.yaml) — structured metadata and validation status | ||||||||||||||||||
|
|
||||||||||||||||||
|
Comment on lines
+508
to
+512
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fix broken cross-reference to knowledge card. The pipeline failure indicates the path 🔧 Proposed fix ## Related Artifacts
- **Operational skill**: [skills/perf-techniques/parallelism-strategies.md](../skills/perf-techniques/parallelism-strategies.md) — enablement, pitfalls, memory estimation, verification
-- **Knowledge card**: [knowledge/techniques/parallelism_strategies.yaml](../knowledge/techniques/parallelism_strategies.yaml) — structured metadata and validation status
+- **Knowledge card**: [skills/perf-techniques/parallelism-strategies/card.yaml](../skills/perf-techniques/parallelism-strategies/card.yaml) — structured metadata and validation status📝 Committable suggestion
Suggested change
🧰 Tools🪛 GitHub Actions: Build docs[warning] 511-511: Sphinx: cross-reference target not found: '../knowledge/techniques/parallelism_strategies.yaml' [myst.xref_missing] 🤖 Prompt for AI Agents |
||||||||||||||||||
| ## Resources | ||||||||||||||||||
|
|
||||||||||||||||||
| - [Megatron Core Developer Guide](https://docs.nvidia.com/megatron-core/developer-guide/latest/) | ||||||||||||||||||
|
|
||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: This links to
../skills/perf-techniques/parallelism-strategies.md, but the actual file isskills/perf-techniques/parallelism-strategies/SKILL.md. The link will 404.