-
Notifications
You must be signed in to change notification settings - Fork 2.1k
[CI] Fix slow grpo CI #3693
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
[CI] Fix slow grpo CI #3693
Conversation
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. |
@ArthurZucker the paged attention CI was failing since it didnt find flash_attn, so i replaced the check with |
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.
Pull Request Overview
This PR enhances CI for the GRPO trainer by preferring FlashAttention v2 when available, updates a comment for consistency in the vLLM serve script, and fixes a markdown warning in the SFT trainer docs.
- Import and use
is_flash_attn_2_available
instead of solely relying ontorch.cuda.is_available
- Update a misaligned example comment in
vllm_serve.py
to match actual dtype usage - Wrap the
{% generation %}
tag in a raw block in the SFT trainer docs warning
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
File | Description |
---|---|
trl/trainer/grpo_trainer.py | Added import of is_flash_attn_2_available and replaced the CUDA check for attention |
trl/scripts/vllm_serve.py | Corrected comment to show "torch.float32" as a string in collective_rpc example |
docs/source/sft_trainer.md | Changed warning block to use a raw tag around {% generation %} |
Yes completely! Sorry |
What does this PR do?
We now check if flash_attn is installed and if not use the
sdpa_paged
in the transformers paged attention slow testBefore 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.