-
Notifications
You must be signed in to change notification settings - Fork 31.9k
Fix slow tests for important models to be compatible with A10 runners #29905
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
Conversation
d8348e6 to
54c6918
Compare
| @require_flash_attn | ||
| @require_torch_gpu | ||
| @pytest.mark.flash_attn_test | ||
| @is_flaky |
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.
For the comment here, my response is
I will open an issue but leave @younesbelkada to fill more details on the issue page.
| # 8 is for A100 / A10 and 7 for T4 | ||
| cls.cuda_compute_capability_major_version = torch.cuda.get_device_capability()[0] | ||
|
|
||
| @require_read_token |
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.
This should be a better name, cc @younesbelkada
See #29805 (comment)
|
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
left a comment
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.
Thanks both 🚀
| "mistralai/Mistral-7B-v0.1", | ||
| device_map="auto", | ||
| attn_implementation="sdpa", | ||
| "mistralai/Mistral-7B-v0.1", device_map="auto", attn_implementation="sdpa", torch_dtype=torch.float16 |
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.
no torch_device here?
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.
I think it is because we set "auto" and in this case, no need to set torch_device.
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.
torch_device for the recent updates done by a contributor to support multiple devices when testing!
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.
ArthurZucker
left a comment
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.
Looks alright but let's make sure CIs are green please
c684692 to
effc252
Compare
|
The only failing test is
which is irrelevant to this PR, and #30018 is on it. |
|
@younesbelkada There are still some test failures |
ArthurZucker
left a comment
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.
Good for me as long as we fix the remaining tests
Co-authored-by: Arthur <[email protected]>
19a6a07 to
71debdb
Compare
|
Thank you @younesbelkada again! |
| def test_compile_static_cache(self): | ||
| NUM_TOKENS_TO_GENERATE = 40 | ||
| EXPECTED_TEXT_COMPLETION = [ | ||
| "Simply put, the theory of relativity states that 1) the speed of light is constant, 2) the speed of light is the same for all observers, and 3) the laws of physics are the same for all observers.", | ||
| "My favorite all time favorite condiment is ketchup. I love it on everything. I love it on my eggs, my fries, my chicken, my burgers, my hot dogs, my sandwiches, my salads, my p", | ||
| ] | ||
| EXPECTED_TEXT_COMPLETION = { | ||
| 7: [ | ||
| "Simply put, the theory of relativity states that 1) the speed of light is constant, 2) the speed of light is the same for all observers, and 3) the laws of physics are the same for all observers.", |
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.
This fails on A100
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.
on the A10 runners with the transformers-all-latest-gpu docker image it passed, might be an env issue?
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.
yes the ref is probably good for A10G, but not A100
What does this PR do?
This PR is the same as #29805 with some final changes. #29805 is closed, and we will merge this one without waiting @younesbelkada being back to the office.
I rebased the PR on a more recent
main.No need to go over again I think. Just check this comment (if you think necessary)