Skip to content

Google

Fine-tune Gemma 3 on your data

Google's Gemma 3 models that read images and text, from ungated copies that need no access request. Supported by the training and serving software Tensorant runs. It hasn't run on Tensorant yet, so start with a trial.

Status
Supported
Input
Text and images
Kind
Dense
Trains with
LoRA, QLoRA
Suggested sizes
LoRA from1 GPU, about 14 GB

Sizes

Sizes and GPUs

Each size with the GPUs one machine needs to train and to serve it. The figures are the estimates Tensorant checks a model against; a trial measures the real use. See GPU memory.

Gemma 3 models and the GPUs each needs
ModelParametersTrain with LoRATrain with QLoRAServeStatus
unsloth/gemma-3-4b-itUngated copy of Google's model4B1 GPUabout 14 GB1 GPUabout 7 GB1, 2, 4 or 8 GPUsabout 12 GB in allSupported
unsloth/gemma-3-12b-itUngated copy of Google's model12B1 GPUabout 34 GB1 GPUabout 12 GB1, 2, 4 or 8 GPUsabout 32 GB in allSupported
unsloth/gemma-3-27b-itUngated copy of Google's model27B1 GPUabout 70 GB1 GPUabout 22 GB1, 2, 4 or 8 GPUsabout 68 GB in allSupported
  • Training needs the memory shown on each GPU: more GPUs on a machine train faster, but each holds the whole model.
  • On a vision model, QLoRA trains with DPO only; SFT trains with LoRA.
  • Serve: the numbers of GPUs of one machine the base model can be split across, and the memory it needs in all.

Training

How it trains

Train Gemma 3 with LoRA or QLoRA, by supervised fine-tuning (SFT) or DPO on preference pairs.

  • SFT trains with LoRA, on a version with images or of text alone. On text, the vision tower stays frozen and the served model still reads images.
  • DPO trains with LoRA or QLoRA, on one GPU.
  • RL trains text models only.
  • Google's own google/gemma-3- repositories are gated; these ungated copies need no access request.

Every training run, trials included, pays a training-token fee for the tokens it trains on, by the model's size. Images are on every organization.

Serving

How it serves

Publish a trained model under a name and call it through the OpenAI-compatible API, with the OpenAI SDK or any HTTP client. The name is what your application sends as model.

  • A LoRA adapter you train serves on top of its base model, on the GPUs in the Serve column.
  • The base model serves on its own too, in a test session or for a baseline. A deployment splits it across the GPUs of one machine: the Serve column lists the numbers each size allows.
  • A served vision model reads images and text in the same chat request.
  • It can't be served in float16: leave the weight precision at Auto, or choose bfloat16, in the advanced serving settings.

Steps

Fine-tune Gemma 3 on Tensorant

  1. Create a project

    Create a project with unsloth/gemma-3-4b-it as its base model, or pick another size from the list. The model check reads the model before anything starts.

  2. Import your data

    Upload files, paste text or import a Hugging Face dataset as sources.

  3. Review and freeze a version

    Review the examples and approve the ones to train on, then freeze them into a version with training, validation and test splits.

  4. Score the base model

    Evaluate the base model on the version's test split. This baseline is what a training run is compared with, and a full run needs one.

  5. Run a trial, then train

    A trial trains a small sample to check the settings, the GPU memory and the speed. Then start the full run. LoRA on unsloth/gemma-3-4b-it needs 1 GPU, about 14 GB.

  6. Compare and publish

    Evaluate the trained model on the same test split and compare it with the baseline. Then publish it and call it through the OpenAI-compatible API.

Related

See every model

Start with one dataset.

Create an account and import your data, or book a demo and we will show you the product.