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

Issue with 'GemmaFixedRotaryEmbedding' object has no attribute 'cos_cached': #1527

Open
Bruce-Azar-Wayne opened this issue Jan 10, 2025 · 5 comments
Labels
currently fixing Am fixing now!

Comments

@Bruce-Azar-Wayne
Copy link

Im using unsloth to import gemma-2-9b and fine tune it. This exact code used to work less than 12 hours ago, but it's not working now. I need this for a project by the end of today, so would appreciate the help. The code is on Kaggle.

Screenshot 2025-01-10 at 10 05 02 AM Screenshot 2025-01-10 at 10 07 29 AM

AttributeError: 'GemmaFixedRotaryEmbedding' object has no attribute 'cos_cached'

@ShambaC
Copy link

ShambaC commented Jan 10, 2025

Its an issue caused by the latest version of transformers. Downgrade transformers package to 4.47.1 after installing unsloth to fix the issue.

! pip -q uninstall transformers -y
! pip -q install transformers==4.47.1

@danielhanchen
Copy link
Contributor

Working on a fix - sorry on the issue - but yes it's because transformers updated to the latest version

@thewebscraping
Copy link

Same error with latest version

Screenshot 2025-01-11 at 13 23 56

@thewebscraping
Copy link

Here my fix, thanks @ShambaC

!pip install -q torch torchvision torchaudio xformers --index-url https://download.pytorch.org/whl/cu121
!pip install -q 'unsloth==2025.1.1'
!pip uninstall -q transformers -y
!pip install -q 'transformers==4.47.1'

@danielhanchen
Copy link
Contributor

Working on a fix - yep downgrading is a good solution for now - apologies again!

@danielhanchen danielhanchen added the currently fixing Am fixing now! label Jan 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
currently fixing Am fixing now!
Projects
None yet
Development

No branches or pull requests

4 participants