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 (llm): fix device issue for eval when not using default device #949

Merged
merged 2 commits into from
May 31, 2024

Conversation

fabianandresgrob
Copy link
Contributor

This PR fixes a problem when setting a different device than the default. E.g. when cuda:0 is free, the call to cuda() would place the data on that device. However, when we specified the model to be on cuda:1, we run into the problem of having the data on a different device than the model. Simply moving the data to model.device solves this. For the creation of a validation_dataloader, I've added an argument to solve this issue.

@Giuseppe5
Copy link
Collaborator

Tests are failing. Is this because of the PR?

@Giuseppe5
Copy link
Collaborator

Is this still relevant/needed?

@fabianandresgrob
Copy link
Contributor Author

Is this still relevant/needed?

yes, still needed. We applied it manually on the separate branch

@Giuseppe5 Giuseppe5 requested review from Giuseppe5 and removed request for Giuseppe5 May 27, 2024 11:16
@Giuseppe5 Giuseppe5 self-requested a review May 31, 2024 11:44
@Giuseppe5 Giuseppe5 merged commit 8c71e08 into Xilinx:dev May 31, 2024
334 of 337 checks passed
@fabianandresgrob fabianandresgrob deleted the fix/device_llm_quant branch May 31, 2024 13:28
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.

2 participants