r/LocalLLaMA • llama.cpp • 2d ago

Resources Google Released A Guide To Finetuning Gemma Models

https://gemma.ai/tuning/

Gemma 4 can reason, call tools, and understand images + audio.

But fine-tuning is how you make it yours: domain jargon, a new language, a new corpus, skills it didn’t have before.

Google’s guide maps the paths, continued pretraining → SFT → RL → multi-GPU.

Fine-tuning isn’t super intuitive. Start with the map, not trial-and-error.

Most people think fine-tuning = SFT. It isn’t.

Teach them domain terms, new corpora, new skills.

It gets overwhelming fast.

Use the map.

722 Upvotes

45 comments sorted by

•

u/WithoutReason1729 1d ago

Your post is getting popular and we just featured it on our Discord! Come check it out!

You've also been given a special flair for your contribution. We appreciate your post!

Stylome classified this post's text as human-written. View analysis Learn ^more

I am a bot and this action was performed automatically.

143

u/silenceimpaired 2d ago

Interesting that they head this direction instead of Gemma 5.

16

u/HolidayBit143 llama.cpp 2d ago

I was thinking the same tbh.

But maybe this is them warming people up for Gemma 5? They've been dropping models like crazy & they got still have to pay GEMMA team's salary, so I think they are working on GEMMA 5 now or are maybe soon going to drop it.

11

u/_killing_floor_ 2d ago

I think they will drop it for sure even if the timeline will be slow.

Google is more than just a AI provider cause they have their self serve cloud compute for AI too. It benefits them if they release a more powerful model cause enterprises can have their own custom fine tunes running on their GCP compute which is why I feel they have created this guide in first place.

67

u/Illustrious_Grade608 2d ago

By the way, i wonder if gemma 5 might actually get a 100-150b variant given that gemini now has actual frontier models and gemma won't be eating gemini lunch

37

u/Salt-Powered 2d ago

I hope so, I always found Gemma poor agentic work to be a little suspicious

10

u/russlixx 2d ago

on my own testing, gemma even failing tool calling that's not that complicated

4

u/Salty_Hedgehog_6931 1d ago

You’re not wrong. I fine-tuned it for that exact reason. Tool calling and websearch were messed up.

3

u/generic-d-engineer llama.cpp 1d ago

Did you publish your Gemma? (Or is there a similar one out there solving these gaps?)

5

u/Salty_Hedgehog_6931 1d ago edited 1d ago

I published i think four Gemma models. A2b, e2b, e4b, and 12b dense.

Edit:

gemma-4-E2B-it-iPhone-Agent-Weight-Space-Programming

gemma-4-E4B-it-weight-space-programming · Hugging Face

Gemma-4-12B-Weight-Space-Programming · Hugging Face

Gemma-4-26B-A4B-Weight-Space-Programming · Hugging Face

My original goal was to have a model for my iphone but it expanded when i found out that wasn't possible. Full comparisons to baseline.

2

u/Salty_Hedgehog_6931 1d ago edited 1d ago

i posted them if you're interested. I'd love any feedback. i'd say e2b worked well. e4b didn't show improvement. 12b showed improvement. a2b showed improvement.

2

u/generic-d-engineer llama.cpp 1d ago

Thanks will check it out

1

u/misterflyer 1d ago

same, just pulling the weather or sports scores was ROUGH 🤣

4

u/stoppableDissolution 1d ago

A QFN-ish size but distilled from neon? Yes please

47

u/Weak-Shelter-1698 llama.cpp 2d ago

Just wait, Gemma 5 will be here soon. 😄

16

u/Bagelsarenakeddonuts 1d ago

Yeah, It and Qwen 4. They are both gonna arrive... honest... soon...

6

u/citrusalex 1d ago

Qwen 4 Flash under the Christmas tree, courtesy of Santa

1

u/maxm11 1d ago

Tbf Qwen4 is out just not any of the checkpoints that are useful to this community 🥴

1

u/darwinanim8or 1d ago

Gemma has always released in March/April though, so a few months id guess

11

u/DeathinabottleX 2d ago

Gemma usually has around 1 year between releases

3

u/Fear_ltself 1d ago

Gemma 5 is probably like a March release after Gemini 5 releases in December or January. It usually takes a few months after the corresponding Gemini release for Gemma team to distill those massive updates I’d imagine, they don’t have Gemini budget of being able do a lot of .X updates

1

u/backyard_tractorbeam 2d ago

Current gemini is also the 4 version. I wonder how much they have in common (And Gemini 4 came much after Gemma 4)

1

u/Mountain_Dentist5074 2d ago

I believe they made an open-source model in the first place to use that same data for Gemma 5 training , or maybe even for frontier Gemini models, since no big company actually cares about humanity, and if something is free, you are the product

1

u/Budget-Juggernaut-68 2d ago

Getting information out there drives adoption. It makes sense when you zoom out.

43

u/fragment_me 2d ago

This is great but there are some very basic spelling errors in this article! I guess I kind of appreciate it because then I know it was written by a human, lol.

24

u/StringentCurry 1d ago

It's almost cute to see a lack of polish like that from an entity of Google's size. Kinda gives that feeling that the Gemma team are a real scrappy smaller lab tucked away inside the conglomerate. You could even imagine that this whole tuning guide could have been the work of just one researcher whose spelling isn't the strongest.

I'll take getting something with proofreading errors any day over another ladleful of polished engagement writing AI slop. If I can see that a human thought this was worth the time to write - even imperfectly - then I know it's probably worth the time to read.

58

u/No-Expert-8725 2d ago

Holy shit, they even tell you how to use QAT. Cool!

78

u/infearia 2d ago

Could it be a way for Google to signal that they believe small, local, specialized models are the future?

27

u/tiffanytrashcan 1d ago

The Edge Gallery android app features multiple 270M models fine-tuned for anything from playing a simple minigame to phone actions like calling the flashlight tool.
In short, yes, they signaled this long ago.
EmbeddingGemma2 should flat out replace search everywhere. Even their limited example built into the Edge app is incredible ("instant media search.") I've seen multiple implementations for Windows / other desktop OSs as well.
https://github.com/google-ai-edge/gallery

20

u/RunNo5070 1d ago

Of course, that way they can rent compute power and finetuning.

13

u/Z-Dante 1d ago

How long till the gooner tunes drop?

21

u/stoppableDissolution 1d ago

Few months... ago?

3

u/Z-Dante 1d ago

I meant the good ones not the meme tunes we have rn 🏃🏻‍➡️

6

u/semangeIof 1d ago

Not a fan of Spectre 37B or Artemis 31B?

1

u/bfmv_shinigami 21h ago

any MoE gemma 4 fine tunes? I can't run dense ones

2

u/semangeIof 20h ago

There's Orion 26B-A4B made by the same guy. Haven't tested myself but I think it'd be your best bet

3

u/Party_9001 1d ago

They all list a bunch of crap it's not first.

It's not just a rejection, it's an erasure of her being. Blah blah

12

u/jacek2023 llama.cpp 1d ago

5

u/infearia 1d ago edited 1d ago

No idea why you got downvoted...

5

u/Federal_Signature708 2d ago

Actually a solid sanity check before spinning up a run. Curious how much of the code in this guide translates cleanly to Unsloth/Axolotl vs. being heavily tied to Google's own stack.

2

u/ayx03 17h ago

Gemma is my new favorite

2

u/Double_Sherbert3326 1d ago

Thanks for this.

1

u/srona22 5h ago

a GPU budget

yeap, not for me.