Skip to content
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

sequence parallel optimization for latest transformer #312

Closed
Tracked by #354
eric-haibin-lin opened this issue Feb 19, 2025 · 1 comment · Fixed by #357
Closed
Tracked by #354

sequence parallel optimization for latest transformer #312

eric-haibin-lin opened this issue Feb 19, 2025 · 1 comment · Fixed by #357

Comments

@eric-haibin-lin
Copy link
Collaborator

verl does not yet support sequence parlallelism with the latest version of transformer > 0.48. The implementation is at verl/models/transformers/monkey_patch.py

@xffxff
Copy link
Contributor

xffxff commented Feb 24, 2025

I'm working on this

vermouth1992 pushed a commit that referenced this issue Feb 24, 2025
….48 (#357)

close #312 

Add support for ulysses sp for transformers >= 0.48

I've tested transformers 0.45.0, 0.46.0, 0.47.0, 0.48.0 and 0.49.0,
using sp=2 with the following script in my local env
```bash
#!/bin/bash

set -ex
VERSIONS=("4.45.0" "4.46.0" "4.47.0" "4.48.0" "4.49.0")

for version in "${VERSIONS[@]}"; do
    echo "Testing with Transformers version ${version}"
    echo "----------------------------------------"
    
    pip install "transformers==${version}"
    
    PYTHONPATH=./ torchrun --nproc_per_node=2 tests/model/test_transformers_ulysses.py
    
    echo "----------------------------------------"
    echo "Completed testing for version ${version}"
    echo ""
done
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants