Fine-tuning Gemma Models

Transform Gemma models into specialized AI assistants tailored to your specific needs. Facet makes fine-tuning accessible with a no-code interface, powerful training algorithms, and optimized configurations.

What You Can Do

Multiple Model Sizes

Fine-tune Gemma 3 models from 270M to 27B parameters

Various Training Methods

Use SFT, DPO, ORPO, and GRPO for different objectives

Efficient Training

LoRA and QLoRA for memory-efficient fine-tuning

Vision Support

Fine-tune multimodal models with text and images

Supported Models

Facet supports the complete Gemma 3 family:
  • Gemma 3 270M: Fast, lightweight for simple tasks
  • Gemma 3 1B: Balanced performance and efficiency
  • Gemma 3 4B: High-quality responses, good for most tasks
  • Gemma 3 12B: Advanced reasoning and complex tasks
  • Gemma 3 27B: State-of-the-art performance

Training Methods

Choose the right training method for your objective:

Supervised Fine-Tuning (SFT)

Best for: General conversation, instruction following, domain adaptation
  • Uses your processed dataset with conversations
  • Learns from human demonstrations
  • Most common fine-tuning approach

Direct Preference Optimization (DPO)

Best for: Aligning models with human preferences
  • Uses paired examples (chosen vs rejected responses)
  • Learns to prefer better responses
  • Great for safety and helpfulness alignment

Odds Ratio Preference Optimization (ORPO)

Best for: Alternative preference learning approach
  • Similar to DPO but with different optimization
  • Can be more stable in some cases
  • Good alternative to DPO
Best for: Reasoning tasks, math problems, structured thinking
  • Uses reward functions to score responses
  • Learns to maximize rewards through reasoning
  • Perfect for complex problem-solving tasks

Training Efficiency Options

Full Fine-tuning

  • Updates all model parameters
  • Requires more memory and compute
  • Best for large datasets and major domain changes

LoRA (Low-Rank Adaptation)

  • Updates only a small subset of parameters
  • Much more memory efficient
  • Good for most fine-tuning tasks

QLoRA (Quantized LoRA)

  • Combines quantization with LoRA
  • Most memory efficient option
  • Recommended for most use cases
Start with QLoRA for most tasks. It provides excellent results while using minimal resources.

Getting Started

1

Prepare Your Dataset

Upload and process your data using the dataset preprocessing guide.
Make sure your dataset is processed and ready before starting training.
2

Choose Your Model

Select the Gemma model size that fits your needs and resources.
Larger models generally perform better but require more compute resources.
3

Configure Training

Set up your training parameters, method, and efficiency options.
Use the recommended settings for your first training run, then experiment with custom parameters.
4

Start Training

Launch your training job and monitor progress.
Training can take several hours depending on your dataset size and model choice.
5

Evaluate Results

Test your fine-tuned model and review performance metrics.
Use the evaluation tools to assess your model’s performance on test data.

Training Configuration

Essential Settings

  • Base Model: Choose from available Gemma models
  • Training Method: SFT, DPO, ORPO, or GRPO
  • Efficiency Method: Full, LoRA, or QLoRA
  • Dataset: Your processed dataset
  • Hyperparameters: Learning rate, batch size, epochs

Advanced Options

  • Evaluation: Set up validation and testing
  • Monitoring: Track training with Weights & Biases
  • Export: Configure model export formats
  • Reward Functions: Set up graders for GRPO training

Best Practices

Next Steps

Once your model is trained:
  1. Evaluate Performance: Use the evaluation tools to assess your model
  2. Export Your Model: Download in various formats (adapter, merged, GGUF)
  3. Deploy: Set up your model for production use
  4. Iterate: Use feedback to improve your model with additional training
Ready to start training? Head to the Training guide for detailed instructions on configuring and launching your training job.