Closed fahadh4ilyas closed 1 month ago
Hi @fahadh4ilyas 👋
Pytorch doesn't automatically move tensors across devices -- the model and all its inputs must be manually moved to the desired device. In your example, attention_mask
doesn't have the device
argument.
See the basic generation example here 🤗
This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.
Please note that issues that do not follow the contributing guidelines are likely to be ignored.
System Info
Transformer version: 4.42.4 Platform: Ubuntu Python version: 3.10.14
Who can help?
@ArthurZucker @gante
Information
Tasks
examples
folder (such as GLUE/SQuAD, ...)Reproduction
Here is an example code:
Expected behavior
Model generate without issue. I never have this issue when I'm using old transformers. But, now this error shows up