---
type: "post"
id: "fine-tune-gemma-4-models-d7e000"
slug: "fine-tune-gemma-4-models-d7e000"
title: "Fine-tune Gemma 4 models"
description: "Google’s Gemma documentation maps fine-tuning options for Gemma 4, from continued pre-training and supervised tuning to reinforcement learning and deployment."
retrieval_nugget: "Google’s Gemma documentation maps fine-tuning options for Gemma 4, from continued pre-training and supervised tuning to reinforcement learning and deployment. It pairs task-selection advice with estimated peak GPU memory for QLoRA and full fine-tuning across five model sizes, helping teams decide whether to train weights at all and what hardware a run may require."
published_at: "2026-11-27"
updated_at: "2026-11-27"
record_date: "2026-11-27"
date_kind: "published_at"
topics: ["google"]
entities: ["Google DeepMind","Gemma 4","Hugging Face TRL","Unsloth","Axolotl","Google Cloud Vertex AI"]
related_patterns: []
novelty_label: "new_fact"
what_changed: "Google’s Gemma 4 documentation now provides a fine-tuning overview covering training stages, RAG versus LoRA versus full fine-tuning, GPU memory, and framework choices."
prior_refs: []
source_url: "https://gemma.ai/tuning"
source_urls: ["https://gemma.ai/tuning"]
production: {"schema":"newruntime-production-v1","desk":"newsroom","first_seen_at":"2026-11-27T10:13:12.519Z","independent_sources":1,"notes_synthesized":null,"writer_model":null,"critic":null,"checks":["primary_source_verified","source_fresh","one_story","copy_contract"],"novelty":{"label":"new_fact","confidence":"medium"},"editorial_value":"medium","human_review":"selective"}
schema_version: "newruntime-agent-readable-v0.2"
stable_id: "post:fine-tune-gemma-4-models-d7e000"
status: "published"
visuals: []
editor: {"role":"editor","name":"Andrey Reshetnikov","profile":"https://newruntime.com/owner-profile.md","profile_json":"https://newruntime.com/owner-profile.json","same_as":["https://www.linkedin.com/in/reshetnikov1/","https://t.me/lapetuse"]}
routes: {"html":"https://newruntime.com/posts/fine-tune-gemma-4-models-d7e000/","markdown":"https://newruntime.com/posts/fine-tune-gemma-4-models-d7e000.md","json":"https://newruntime.com/posts/fine-tune-gemma-4-models-d7e000.json"}
markdown_url: "https://newruntime.com/posts/fine-tune-gemma-4-models-d7e000.md"
---

# Fine-tune Gemma 4 models

## Retrieval answer

Google’s Gemma documentation maps fine-tuning options for Gemma 4, from continued pre-training and supervised tuning to reinforcement learning and deployment. It pairs task-selection advice with estimated peak GPU memory for QLoRA and full fine-tuning across five model sizes, helping teams decide whether to train weights at all and what hardware a run may require.

## Summary
Google’s Gemma documentation maps fine-tuning options for Gemma 4, from continued pre-training and supervised tuning to reinforcement learning and deployment. It pairs task-selection advice with estimated peak GPU memory for QLoRA and full fine-tuning across five model sizes, helping teams decide whether to train weights at all and what hardware a run may require.

## What happened
Google’s Gemma 4 fine-tuning overview describes four training stages: pre-training, continued pre-training, supervised fine-tuning and reinforcement learning. Pre-training produces a checkpoint that continues documents but does not generally follow instructions. Continued pre-training uses raw domain text, such as medical literature, a new language or an internal codebase. Supervised fine-tuning pairs prompts with desired responses. Reinforcement learning uses scored outputs, either preferences between chosen and rejected answers or verifiable rewards that grade generated answers. Google says most teams rarely need all four stages and typically start from an instruction-tuned checkpoint for supervised fine-tuning or reinforcement learning.

The page distinguishes retrieval-augmented generation (RAG), low-rank adaptation (LoRA), quantized LoRA (QLoRA) and full fine-tuning. RAG leaves model weights unchanged and injects retrieved documents into the prompt. LoRA freezes the base model and trains low-rank matrices alongside each layer, updating about 1%–2% of parameters; QLoRA uses the same adapter approach while storing frozen base weights in 4-bit precision. Full fine-tuning updates 100% of model weights. Google recommends RAG for frequently changing facts, continued pre-training for a new language or large domain corpus, supervised fine-tuning for a new output format, persona, tool schema or task skill, and reinforcement learning for strict correctness requirements such as code, math or SQL. It also describes combining LoRA for domain behavior with RAG for newer information.

Google estimates peak VRAM at a sequence length of 2,048 tokens. For QLoRA versus full fine-tuning, its estimates are about 7 GB versus 32 GB for Gemma 4 E2B (2B effective parameters), 9 GB versus 42 GB for E4B (4B effective), 11 GB versus 80 GB for 12B, 21 GB versus 160 GB for 26B A4B, and 22 GB versus 200 GB for 31B. The overview explains that training memory includes weights, gradients, optimizer states and activations. It gives 2 bytes per parameter for bfloat16 weights and another 2 bytes for gradients; AdamW optimizer states are listed as 2 bytes with an 8-bit optimizer or 8 bytes in 32-bit precision.

Each Gemma 4 size has pre-trained and instruction-tuned (`-it`) checkpoints. Google recommends `-it` for most supervised fine-tuning, tool use, vision and audio tuning, DPO and GRPO. It recommends pre-trained checkpoints for continued pre-training or custom chat formats. The overview names Hugging Face TRL for SFT, DPO, GRPO and multi-GPU Python runs; Unsloth for single-GPU training and GGUF export; Axolotl for YAML-configured runs; Vertex AI for managed jobs; and Google Cloud GKE for multi-GPU Kubernetes fine-tuning. It also points to separate guides for best practices, dataset formatting, (Q)LoRA and MoE fine-tuning.

## What the archive adds
New Runtime’s earlier coverage includes [Gemma 4 E4B QAT Q4_0 GGUF](https://newruntime.com/posts/google-released-gemma-4-e4b-qat-q4-0-17e441/), dated 2026-10-19, which covered a quantized on-device model, and [a guide to fine-tuning 3D generation models](https://newruntime.com/posts/the-definitive-fine-tuning-guide-for-3d-generation-1cd99e/), dated 2026-11-12. This is a practical documentation resource on Gemma 4 fine-tuning, not a restatement of either earlier item.

## Trend signal
This does not yet fit a pattern New Runtime tracks. Google’s overview is useful training guidance, but it does not establish a broader shift in agent architecture, verification, or economics.

## Why now
The overview is specifically organized around Gemma 4 model sizes and capabilities, including tool use and multimodal tuning. Its memory estimates and framework list give teams evaluating these checkpoints a concrete starting point for planning experiments.

## Why it matters
Teams can waste compute by fine-tuning when retrieval would handle the problem, or by choosing full fine-tuning when an adapter would be sufficient. Google’s task-to-method map makes that decision more explicit: frequently changing facts point to RAG, behavior or format changes to supervised tuning, and correctness targets to reward-based training. The VRAM estimates also expose the hardware trade-off between QLoRA and updating every weight. They are planning figures, not a substitute for testing a representative run, but they help teams narrow model and method choices before allocating a GPU budget. The distinction between pre-trained and instruction-tuned checkpoints matters too: beginning from the wrong checkpoint can mean spending training effort to recover instruction-following behavior that the `-it` variant already has.

## Limits and uncertainty
The published VRAM figures are estimates for a 2,048-token sequence length; actual peak use can vary with implementation, batch size, activations, optimizer configuration and other settings. The overview does not present comparative benchmark results showing which method produces the best task quality or total cost for a particular dataset. Nor does its method map establish that a recommended approach will work without careful data preparation and evaluation. Framework compatibility and service offerings can also change; teams should validate current versions and hardware requirements before committing to a training run.

## Skill to build now
Take one task you are considering fine-tuning for and classify its failure mode: stale facts, missing domain behavior, an output-format or tool-use error, or a correctness requirement. Use Google’s map to test the least invasive option first: RAG for changing facts, an instruction-tuned checkpoint plus LoRA for behavior, and a reward-based method only when correctness can be scored. Then compare a small representative run against your current baseline before scaling.

## Reader takeaway
Fine-tuning is not one choice between training and not training. Google’s Gemma 4 guide separates changing knowledge from learned behavior, maps those needs to different methods, and supplies rough VRAM estimates. Start with the task and the least expensive viable method; treat the memory table as a planning estimate, not a promise.

Editor: [Andrey Reshetnikov](https://newruntime.com/owner-profile.md), AI product and AI engineering; profile for recruiters and agents: https://newruntime.com/owner-profile.json

## Continue in the graph

Next records for an agent, linked to their Markdown twins. Replace `.md` with `.json` for structured fields, including `next_reads`.

- topic hub: [Google](https://newruntime.com/topics/google.md): Explore the google topic hub.
- collection: [Field Notes](https://newruntime.com/posts.json): Open the latest editorial analysis.
- collection: [Sources](https://newruntime.com/sources/): See the original sources this archive cites.
- whole graph: [discovery graph](https://newruntime.com/discovery-graph.json) (typed nodes and edges) and [site index](https://newruntime.com/site-index.md)
