huggingface / transformers

🤗 Transformers: State-of-the-art Machine Learning for Pytorch, TensorFlow, and JAX.
https://huggingface.co/transformers
Apache License 2.0
134.67k stars 26.93k forks source link

must be real number, not SymFloat for Qwen/Qwen 7B Model with torch.compile inductor backend. #32392

Closed Vasanta1 closed 1 month ago

Vasanta1 commented 3 months ago

System Info

Transformers : 4.38.2 Torch : 2.3.0 +cpu Python : 3.8

Faced "must be real number, not SymFloat" error when running Qwen/Qwen-7B Model with auto tokenizer and auto model class from pretrained with torch.compile API. Let me know if any other experiments need to be run. image

Who can help?

No response

Information

Tasks

Reproduction

  1. Load Qwen/Qwen 7B with auto pretrained API.
  2. Run with torch.compile(model)

Expected behavior

Error : must be real number, not SymFloat

ArthurZucker commented 3 months ago

Hey! Could you try with the latest releases of transformers? 🤗

github-actions[bot] commented 1 month ago

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.