Repository navigation
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/132442
Note: Links to docs will display an error until the docs builds have been completed. ❌ 6 New Failures, 1 Unrelated FailureAs of commit ef2cf97 with merge base 758d787 ( NEW FAILURES - The following jobs have failed:
FLAKY - The following job failed but was likely due to flakiness present on trunk:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
This PR extends the current ring attention to support load-balancing shards -- the context is divided into 2 * world_size shards and each rank gets rank_th and (world_size * 2 - rank_th - 1) shards. cc XilunWu H-Huang awgu kwen2501 wanchaol fduwjj wz337 wconstab d4l3k c-p-i-o [ghstack-poisoned]
|
Add a TODO to track the propagation rule issue. |
| """ | ||
| This is a generalized ring attention implementation that can support multiple attention ops. | ||
|
|
||
| Algorithm: |
There was a problem hiding this comment.
better to use 'Note' format from other pytorch docs. then you can refer to this note by mentioning 'see note ... ' in some other code comments.
e.g.
aten/src/ATen/CPUGeneratorImpl.cpp: * See Note [Acquire lock when using random generators]
aten/src/ATen/core/Generator.h: * Note [Acquire lock when using random generators] <note content multiple lines>...
wconstab
left a comment
There was a problem hiding this comment.
the explanation is great. i appreciate the work! pls fix the paste issues and consider the 'Note' format
|
@pytrochbot merge -f "The failing tests are not related." |
|
@pytorchbot merge -f "The failing tests are not related." |
Merge startedYour change will be merged immediately since you used the force (-f) flag, bypassing any CI checks (ETA: 1-5 minutes). Please use Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
|
Hello, thanks for implementing this, I've been running the experimental ring attn implementation with the sequential sharding for long-context SFT the last few days and it works great! I wanted to confirm the preferred way to run completion-only fine-tuning with the following setup. I'm using Naively doing this results in a |
This PR extends the current ring attention to support load-balancing shards -- the context/sequence is divided into `2 * world_size` shards and each rank gets `rank` and `(world_size * 2 - rank - 1)` shards. The data re-shuffling is done in the `context_parallel` API. Pull Request resolved: pytorch#132442 Approved by: https://github.com/wconstab
Stack from ghstack (oldest at bottom):
This PR extends the current ring attention to support load-balancing shards -- the context/sequence is divided into
2 * world_sizeshards and each rank getsrankand(world_size * 2 - rank - 1)shards. The data re-shuffling is done in thecontext_parallelAPI.cc @XilunWu @H-Huang @awgu @kwen2501 @wanchaol @fduwjj @wz337 @wconstab @d4l3k @c-p-i-o