-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
AttributeError: 'LlamaRotaryEmbedding' object has no attribute 'cos_cached' #168
Comments
@Ronnie-Leon76 I'll check this out today!! Sorry on the issue! |
I'll really appreciate it |
Having the same issue with |
@Ronnie-Leon76 @hbernie Apologies could not look into it yesterday - was a bit inundated with stuff :(( Will 100% do it today! :) Sorry again! |
It's okay. Is it something I can help with? Could you give me a high level breakdown of what needs to be done to fix the issue? Should we refine the rotate_half() method? |
@Ronnie-Leon76 @hbernie I'm assuming you used the HF notebooks which we shared - for now I would comment out Also if you're on a local PC, I would downgrade transformers via I will for now edit my notebooks to remove the lines - hope the temporary fix solves it! |
@Ronnie-Leon76 @hbernie I think I fixed it!! Hope you all can try it out :) I also updated all the notebooks on our HuggingFace branch https://huggingface.co/datasets/unsloth/notebooks/tree/main and on our blog posts. No need to change your notebooks! Hope it works! |
@danielhanchen It works fine. Thanks a lot. |
AttributeError: 'MistralRotaryEmbedding' object has no attribute 'cos_cached' came back |
@spydaz Best to uninstall then reinstall Unsloth |
i am facing the same issue , Can some help. I tried uninstalling unsloth the install . still |
pip uninstall unsloth -y
pip install --upgrade --no-cache-dir "unsloth[colab-new] @ git+https://github.com/unslothai/unsloth.git" Does not work? :( |
I'm trying to fine-tune
unsloth/yi-6b-bnb-4bit
on a custom dataset but as soon I initiate the training using trainer.train wrapped in an learning_rate scheduler optimizer using CosineAnnealing learning rate scheduler I get the error shown in the image. The error "AttributeError: 'LlamaRotaryEmbedding' object has no attribute 'cos_cached'" seems to be related to the LLaMA model of the Transformers library. It appears that the issue is with the implementation of the rotary embedding, specifically in the rotate_half function, where the slicing should have been interleaved. I'll appreciate help solving the issue above.The text was updated successfully, but these errors were encountered: