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

Summarization: model.to(device)? #40

Open
ibarrien opened this issue May 10, 2021 · 1 comment
Open

Summarization: model.to(device)? #40

ibarrien opened this issue May 10, 2021 · 1 comment

Comments

@ibarrien
Copy link

ibarrien commented May 10, 2021

In the summarization notebook, where/when do we set the device? Are parallel gpus expected? Two things that could help: i) specify where we could set the device and call model.to(device) and ii) explicate where the model might expect data in parallel e.g. how setting batched=True in the pre-processing or how DataCollatorForSeq2Seq expects tensors.

@NielsRogge
Copy link
Contributor

Hi,

The Trainer automatically handles device placement for you. Read more in the documentation: https://huggingface.co/docs/transformers/main_classes/trainer#trainer

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

2 participants