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 Correctly set device of input data in bnb test #2227

Merged

Conversation

BenjaminBossan
Copy link
Member

@BenjaminBossan BenjaminBossan commented Nov 20, 2024

Fixes a failing CI bitsandbytes CI tests here and here.

The input data was on CPU but the model is on GPU, resulting in an error. Note that this mismatch was not an issue previously because accelerate added an AlignDevicesHook that took care of this. With the latest accelerate, this is no longer the case, whereas the hook is present for v1.1.1.

In any case, it's better that we set the device of the data explicitly, so I think this is a safe change. But it would be good to know what happened that caused this change.

Note: CI won't catch these errors, as the tests require GPU. However, I reproduced and confirmed locally.

Fixes a failing CI bitsandbytes CI test.

The input data was on CPU but the model is on GPU, resulting in an
error. Note that this mismatch was not an issue previously because
accelerate added an AlignDevicesHook that took care of this. With the
latest accelerate, this is no longer the case, whereas the hook is
present for v1.1.1.

In any case, it's better that we set the device of the data explicitly,
so I think this is a safe change. But it would be good to know what
happened that caused this change.
@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.

Copy link
Contributor

@Titus-von-Koeller Titus-von-Koeller left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks a lot @BenjaminBossan ❤️ 🤗

@BenjaminBossan BenjaminBossan merged commit d9aa089 into huggingface:main Nov 21, 2024
14 checks passed
@BenjaminBossan BenjaminBossan deleted the fix-bnb-test-input-device branch November 21, 2024 09:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants