unslothai / unsloth

Finetune Llama 3.2, Mistral, Phi & Gemma LLMs 2-5x faster with 80% less memory
https://unsloth.ai
Apache License 2.0
16.94k stars 1.16k forks source link

Size Mismatch Issue #790

Open vjagannath786 opened 2 months ago

vjagannath786 commented 2 months ago

I am trying to run text classification notebook given in Inference docs, The notebook worked fine or the models LLama3 to tiny llama till morning IST. But, now these are giving strange size mismatch issues at trainer.train() function call.

Error: The size of tensor a (128256) must match the size of tensor b (2) at non-singleton dimension 0.

image
cristobalmackenzie commented 2 months ago

Same issue here, running the same notebook on Colab.

danielhanchen commented 2 months ago

Much apologies on the delay - will try get this resolved asap - sorry on the delay :(

cristobalmackenzie commented 2 months ago

No worries ! I mentioned on discord I think its something to do with this commit:

https://github.com/unslothai/unsloth/commit/5f496efdb4db75371aa17d5b1b393f96cd55a2bd

It fails in those lines, and installing from the previous commit works.

danielhanchen commented 2 months ago

Will prioritise this - thanks for the exact location find!

Kaushalya commented 1 week ago

I'm still having this issue on unsloth==2024.9.post4. Is there any quick fix?