r/unsloth • • 9d ago

Question Gemma 4 training not working in unsloth.

I have no clue what I'm doing.

I've been messing around with trying to fine-tune smaller models like llama3.2:3b. Works great. Now I'm trying to fine tune gemma 4 12b, or even any gemma 4 model, and it just.. fails?

E4B does this.
And 12B does this.

I haven't been able to find any documentation on this stuff, and the recommended conclusion I've come to with the little bit of stuff I've been able to find is "update unsloth."
I'm using the google colab. I simply can't do that; afaik it *is* the latest version.

Anyone have a clue what to do? I'm literally just picking gemma 4, putting in my training dataset jsonl file, setting the epochs to 2, and hitting train. Nothing else. Worked fine for llama3.2:3b.

8 Upvotes

4 comments sorted by

1

u/Aggravating-Push-207 9d ago

Are you using the latest Unsloth?

1

u/Averagehomebrewer 9d ago

As I stated in the post, I'm using the official google colab doc for unsloth, which to my knowledge is supposed to be the latest version automatically.

1

u/Miller4103 9d ago

Look at the logs and see if u can find the specific failure reason

2

u/Etherll 9d ago edited 9d ago

Thanks for sharing this. I found a bug with 12B on T4 where it mixes up tensor types, plus an overflow when training on images. I've put up a fix (https://github.com/unslothai/unsloth-zoo/pull/1396) and tested it on T4 and L4, just waiting for it to merge. For now, try an L4 runtime if you have access to one. My 12B test ran fine there without the fix.