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

Question about Accelerator usage #17

Open
MohitLamba94 opened this issue Nov 28, 2024 · 0 comments
Open

Question about Accelerator usage #17

MohitLamba94 opened this issue Nov 28, 2024 · 0 comments

Comments

@MohitLamba94
Copy link

Since you are using

model, opt, loader = accelerator.prepare(model, opt, loader)

do we really need the following,

model = model.to(device)

x = x.to(device)

y = y.to(device)

According to official documentation
https://huggingface.co/docs/accelerate/en/basic_tutorials/migration#training-loop
these appear to be redundant.

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

No branches or pull requests

1 participant