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

Fix deepspeed with quantization #37324

Merged
merged 2 commits into from
Apr 7, 2025
Merged

Fix deepspeed with quantization #37324

merged 2 commits into from
Apr 7, 2025

Conversation

Cyrilvallez
Copy link
Member

@Cyrilvallez Cyrilvallez commented Apr 6, 2025

What does this PR do?

Alright, this should fix all deepspeed issues (finally). See here https://github.com/huggingface/transformers/pull/36963/files#diff-6b72b98c4c2dcfc6cc606843917733f5d858374fbc22a735ff483bbc0c1e63eaL4248-L4252, low_cpu_mem_usage was forbidden with deepspeed, but then still overriden here in the quantized case https://github.com/huggingface/transformers/pull/36963/files#diff-6b72b98c4c2dcfc6cc606843917733f5d858374fbc22a735ff483bbc0c1e63eaL4358-L4361

cc @stas00, @winglian

@stas00, next steps will be making sure tests are robust, and once this is done we'll try to see how we can truly harmonize the paths, so that everything is taking the same one! But this will be done after the tests, to avoid potential similar issues as what happened these past days 🙃

@github-actions github-actions bot marked this pull request as draft April 6, 2025 11:03
Copy link

github-actions bot commented Apr 6, 2025

Hi 👋, thank you for opening this pull request! The pull request is converted to draft by default. The CI will be paused while the PR is in draft mode. When it is ready for review, please click the Ready for review button (at the bottom of the PR page). This will assign reviewers and trigger CI.

@Cyrilvallez Cyrilvallez marked this pull request as ready for review April 6, 2025 11:03
@HuggingFaceDocBuilderDev

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.

@stas00
Copy link
Contributor

stas00 commented Apr 6, 2025

@Cyrilvallez, I validated that this PR still works for our use case.

Let's wait for @winglian to confirm that this PR unbreaks their use-case.

Also I'd insist on adding the missing test #37315 (comment) since clearly @winglian's use case isn't covered by deepspeed tests under tests/deepspeed

@Cyrilvallez Cyrilvallez added the for patch Tag issues / labels that should be included in the next patch label Apr 6, 2025
@winglian
Copy link
Contributor

winglian commented Apr 6, 2025

All good on my end ✅ , thanks! we'll put together a follow up PR to add a test for the other deepspeed test cases.

@winglian winglian mentioned this pull request Apr 6, 2025
5 tasks
@Cyrilvallez Cyrilvallez merged commit 9db31ea into main Apr 7, 2025
20 of 22 checks passed
@Cyrilvallez Cyrilvallez deleted the yet-another-deepspeed branch April 7, 2025 09:36
@ydshieh
Copy link
Collaborator

ydshieh commented Apr 7, 2025

FYI: if necessary, feel free to use the comment

run-slow: quantization

to trigger a CI running quantization test jobs.

vasqu pushed a commit to vasqu/transformers that referenced this pull request Apr 7, 2025
* Update modeling_utils.py

* Update modeling_utils.py
ArthurZucker pushed a commit that referenced this pull request Apr 7, 2025
* Update modeling_utils.py

* Update modeling_utils.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
for patch Tag issues / labels that should be included in the next patch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants