-
-
Notifications
You must be signed in to change notification settings - Fork 724
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
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. |
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: