-
Notifications
You must be signed in to change notification settings - Fork 33
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
Got RuntimeError when run on Google Colab #8
Comments
Hi @kietbg0079 Sorry for not getting back to you sooner, to overcome this error, you should assign the model to GPU as well. For example: We will update the example code more accurately. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I ran the Readme.md samples on Google Colab with GPU and got this Error "RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cpu and cuda:0! (when checking argument for argument index in method wrapper__index_select)".
Error code:
outputs = model.generate(tokenizer(inputs, return_tensors="pt", padding=True).input_ids.to('cuda'), max_length=512)
The text was updated successfully, but these errors were encountered: