unslothai / unsloth

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

Gemma2 9B + Unsloth #757

Closed ahuguenard-logility closed 1 month ago

ahuguenard-logility commented 1 month ago

Hi @danielhanchen , I tried training a gemma2 9b model today, but I ran into an error within llama.cpp when the model was converting from bf16 to f16. The problem arose due to the changes made in the config.json file:

image

This is the error from llama.cpp and the relevant code: image

image

Is this a valid check for llama.cpp to be doing? And if so, which of the three values in this equation needs to be updated in the config.json?

Thanks!!

danielhanchen commented 1 month ago

So Google engineers found a mini bug which isn't public yet on this issue - see https://huggingface.co/google/gemma-2-9b/discussions/22

I added a PR into llama.cpp: https://github.com/ggerganov/llama.cpp/pull/8444

ahuguenard-logility commented 1 month ago

It works now! Thanks for the help.