[ALST/Ulysses] Added ALST/Ulysses documentation#4420
Merged
Conversation
- Simplify ALST/Ulysses section to match style of other docs sections - Condense from ~495 lines to ~164 lines while keeping essential info - Add practical example using trl/scripts/sft.py with 4 GPUs - Update requirements to recommend Flash Attention 2 over SDPA - Add concise 2D parallelism explanation with code snippet - Simplify best practices to 5 key points - Streamline troubleshooting section - Fix alst_ulysses_4gpu.yaml config (remove 'auto' values) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
|
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
- Simplify ALST/Ulysses section to match style of other docs sections - Condense from ~495 lines to ~164 lines while keeping essential info - Add practical example using trl/scripts/sft.py with 4 GPUs - Update requirements to recommend Flash Attention 2 over SDPA - Add concise 2D parallelism explanation with code snippet - Simplify best practices to 5 key points - Streamline troubleshooting section - Fix alst_ulysses_4gpu.yaml config (remove 'auto' values) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
|
|
||
| ### 2D Parallelism | ||
|
|
||
| The 4 GPU configuration above automatically enables 2D parallelism by combining Data Parallelism (DP) with Context Parallelism (CP). The `dp_shard_size` is automatically calculated to distribute across available GPUs: |
Member
There was a problem hiding this comment.
We should add experiments here as the fsdp example
| cp_size = 2 | ||
| dp_shard_size = num_gpus // cp_size # Automatically calculated | ||
|
|
||
| parallelism_config = ParallelismConfig( |
Member
There was a problem hiding this comment.
Do it via .yaml as in the other example to follow the same style?
| Here's how to run ALST/Ulysses training using the built-in [`sft.py`](https://github.com/huggingface/trl/blob/main/trl/scripts/sft.py) script with 4 GPUs: | ||
|
|
||
| ```bash | ||
| accelerate launch --config_file examples/accelerate_configs/alst_ulysses_4gpu.yaml \ |
6 tasks
Member
|
cc @stas00 |
stas00
reviewed
Nov 4, 2025
NouamaneTazi
approved these changes
Nov 11, 2025
Co-authored-by: Sergio Paniego Blanco <sergiopaniegoblanco@gmail.com>
Member
|
should we merge @kashif ? |
Collaborator
Author
|
sure let me do 1 final check @SunMarc |
songhappy
pushed a commit
to songhappy/trl
that referenced
this pull request
Apr 20, 2026
Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: Sergio Paniego Blanco <sergiopaniegoblanco@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Added an ALST/Ulysses section to the distributed training doc with yaml config.
Needs:
Fixes # (issue)
Before submitting
Pull Request section?
to it if that's the case.
Who can review?
Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.