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

Add support for device_map use #264

Merged
merged 2 commits into from Apr 23, 2024
Merged

Add support for device_map use #264

merged 2 commits into from Apr 23, 2024

Conversation

gsarti
Copy link
Member

@gsarti gsarti commented Apr 22, 2024

Description

This PR adds support for using a custom device_map in the loaded HF model, avoiding to cast it to a device in AttributionModel.setup() if the device map is specified, and dispatching it using the accelerate.dispatch_model method instead.

@gsarti gsarti merged commit 343fc79 into main Apr 23, 2024
3 checks passed
@gsarti gsarti deleted the fix-device-map-multigpu branch April 23, 2024 21:05
LuukSuurmeijer pushed a commit to LuukSuurmeijer/inseq that referenced this pull request May 10, 2024
* Add device_map support

* Fix device setter in HF model
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.

None yet

1 participant