Skip to content

[doc] refactor: Restructure examples folder - move recipes to models, distillation, decentralized_pg#2131

Merged
yaoyu-33 merged 1 commit intomainfrom
restructure-examples-folder
Jan 30, 2026
Merged

[doc] refactor: Restructure examples folder - move recipes to models, distillation, decentralized_pg#2131
yaoyu-33 merged 1 commit intomainfrom
restructure-examples-folder

Conversation

@yaoyu-33
Copy link
Copy Markdown
Contributor

@yaoyu-33 yaoyu-33 commented Jan 29, 2026

Summary

Restructures the examples/ folder for better organization:

Changes

  • examples/decentralized_pg/ - Moved from examples/recipes/decentralized_pg/ (top-level for decentralized process groups examples)
  • examples/distillation/llama/ - NEW folder for distillation workflows
  • examples/models/ - Extended with model training recipes:
    • nemotron_3/ - LLM training (moved from recipes)
    • qwen3_next/ - LLM training (moved from recipes)
    • vlm/nemotron_vl/ - VLM training (moved from recipes)
    • vlm/qwen_vl/ - VLM training (moved from recipes)

Documentation Updates

Updated all paths in documentation files to reflect the new structure:

  • docs/training/distillation.md
  • docs/models/vlm/qwen3-vl.md
  • docs/models/vlm/qwen2.5-vl.md
  • docs/models/vlm/nemotron-nano-v2-vl.md
  • docs/models/vlm/ministral3.md
  • docs/models/llm/nemotron3.md
  • docs/models/llm/nemotronh.md
  • docs/recipe-usage.md
  • docs/megatron-lm-to-megatron-bridge.md
  • README.md

Summary by CodeRabbit

  • Documentation
    • Updated documentation and example files to reference reorganized script paths. Training examples are now located under dedicated model, distillation, and decentralized-training directories instead of legacy recipe locations.

✏️ Tip: You can customize this high-level summary in your review settings.

… distillation, decentralized_pg

Signed-off-by: yaoyu-33 <yaoyu.094@gmail.com>
@copy-pr-bot
Copy link
Copy Markdown

copy-pr-bot bot commented Jan 29, 2026

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@yaoyu-33 yaoyu-33 added the docs-only With great power comes great responsibility. label Jan 29, 2026
@yaoyu-33
Copy link
Copy Markdown
Contributor Author

/ok to test f723594

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Jan 29, 2026

📝 Walkthrough

Walkthrough

This PR updates script path references across documentation and example files from examples/recipes/ to new locations including examples/models/, examples/distillation/, and examples/decentralized_pg/. All changes are reference updates in docstrings and documentation—no functional logic or behavioral modifications are introduced.

Changes

Cohort / File(s) Summary
Documentation Root References
README.md, docs/recipe-usage.md
Updated links and path references from examples/recipes/llama/ to examples/models/llama/ for training example scripts.
Documentation — LLM Models
docs/megatron-lm-to-megatron-bridge.md, docs/models/llm/nemotron3.md, docs/models/llm/nemotronh.md
Updated pretraining and finetuning script paths from examples/recipes/ to examples/models/ directories for Nemotron and Llama examples.
Documentation — VLM Models
docs/models/vlm/ministral3.md, docs/models/vlm/nemotron-nano-v2-vl.md, docs/models/vlm/qwen2.5-vl.md, docs/models/vlm/qwen3-vl.md
Updated finetuning script and configuration file paths from examples/recipes/ to examples/models/vlm/ for Ministral, Nemotron VL, and Qwen VL examples.
Documentation — Training Distillation
docs/training/distillation.md
Updated distillation script path from examples/recipes/llama/ to examples/distillation/llama/ in command examples.
Examples — Decentralized Parameter Groups
examples/decentralized_pg/README.md, examples/decentralized_pg/pretrain_qwen3_simple.py, examples/decentralized_pg/pretrain_qwen3_vl_simple.py, examples/decentralized_pg/pretrain_qwen3_with_decentralized_pg.py
Updated command examples and docstrings to reference scripts under examples/decentralized_pg/ instead of examples/recipes/decentralized_pg/.
Examples — Distillation
examples/distillation/llama/distill_llama32_3b-1b.py
Updated comment to reflect new directory path from examples/recipes/llama/ to examples/distillation/llama/.
Examples — Model Scripts
examples/models/qwen3_next/finetune_qwen3_next_80b_a3b.py, examples/models/vlm/qwen_vl/data/convert_to_qwenvl_wds.py, examples/models/vlm/qwen_vl/finetune_qwen_vl.py
Updated example usage paths in docstrings from examples/recipes/ to examples/models/ with corresponding subdirectory changes.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

Suggested reviewers

  • cuichenx
  • ko3n1g
  • ananthsub
🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title accurately describes the main structural changes: moving example recipes from examples/recipes to examples/models, examples/distillation, and examples/decentralized_pg directories.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Test Results For Major Changes ✅ Passed PR contains minor documentation and path reference updates for examples folder reorganization with no functional impact.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
examples/models/vlm/qwen_vl/data/convert_to_qwenvl_wds.py (1)

18-24: Use uv run in the example command.
The updated path is correct, but the invocation should use uv run per repo guidance for example scripts.

🔧 Proposed change
-python examples/models/vlm/qwen_vl/data/convert_to_qwenvl_wds.py \\
+uv run python examples/models/vlm/qwen_vl/data/convert_to_qwenvl_wds.py \\

As per coding guidelines: Use 'uv run' to execute scripts instead of activating a virtual environment and calling 'python' directly.

🧹 Nitpick comments (1)
README.md (1)

124-124: Keep the Project Structure section consistent with the new examples layout.
Since this bullet now points to examples/models, consider updating the Project Structure block (later in the README) so it no longer lists examples/recipes and reflects distillation / decentralized_pg as well.

✍️ Suggested README adjustment (outside this hunk)
-├── examples/
-│   ├── models/                  # Bridge usage examples
-│   └── recipes/                 # Training examples
+├── examples/
+│   ├── models/                  # Model training examples
+│   ├── distillation/            # Distillation workflows
+│   └── decentralized_pg/        # Decentralized process group examples

Copy link
Copy Markdown
Contributor

@cuichenx cuichenx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM


```bash
torchrun --nproc-per-node=8 examples/recipes/ministral3/finetune_ministral3_vl.py \
torchrun --nproc-per-node=8 examples/models/vlm/ministral3/finetune_ministral3_vl.py \
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just realized there's no finetune_ministral3_vl.py in the repo

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's fix later

@yaoyu-33 yaoyu-33 merged commit 40b1cf8 into main Jan 30, 2026
21 checks passed
@yaoyu-33 yaoyu-33 deleted the restructure-examples-folder branch January 30, 2026 19:36
@coderabbitai coderabbitai bot mentioned this pull request Feb 10, 2026
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs-only With great power comes great responsibility.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants