Fix multi gpu process example
NONE
Okay nevermind looks like to works both ways for models. but my doubt still remains, isnt this changing the device of the model every batch?
2025-03-06T17:07:28Z
https://github.com/huggingface/datasets/pull/7439#issuecomment-2704439327
https://api.github.com/repos/huggingface/datasets/issues/7439
IC_kwDODunzps6hMngf
https://api.github.com/repos/huggingface/datasets/issues/comments/2704439327/reactions
2025-03-06T17:07:28Z
https://api.github.com/repos/huggingface/datasets/issues/comments/2704439327
https://avatars.githubusercontent.com/u/46050679?v=4
https://api.github.com/users/SwayStar123/events{/privacy}
https://api.github.com/users/SwayStar123/followers
https://api.github.com/users/SwayStar123/following{/other_user}
https://api.github.com/users/SwayStar123/gists{/gist_id}
https://github.com/SwayStar123
SwayStar123
MDQ6VXNlcjQ2MDUwNjc5
https://api.github.com/users/SwayStar123/orgs
https://api.github.com/users/SwayStar123/received_events
https://api.github.com/users/SwayStar123/repos
https://api.github.com/users/SwayStar123/starred{/owner}{/repo}
https://api.github.com/users/SwayStar123/subscriptions
User
https://api.github.com/users/SwayStar123
public
to is not an inplace function.

But i am not sure about this code anyway, i think this is modifying the global variable `model` everytime the function is called? Which is on every batch? So it is juggling the same model on every gpu right? Isnt that very inefficient? 