Gemma Fine-Tuning UI
Sign in with your Hugging Face account to use the Nebius API for inference and model access.
Navigation
Welcome to Gemma Fine-Tuning UI
This application allows you to fine-tune Google's Gemma models on your own datasets with a user-friendly interface.
Features:
- Upload and preprocess your datasets in various formats (CSV, JSONL, TXT)
- Configure model hyperparameters for optimal performance
- Visualize training progress in real-time
- Export your fine-tuned model in different formats
Getting Started:
- Navigate to the Dataset Upload tab to prepare your data
- Configure your model and hyperparameters in the Model Configuration tab
- Start and monitor training in the Training tab
- Export your fine-tuned model in the Export Model tab
For more details, check the Documentation tab.
Upload and prepare your dataset for fine-tuning
Data Preview
1 | 2 | 3 |
---|---|---|
Select a model and configure hyperparameters
Select Base Model
0.000001 0.001
1 32
1 10
128 2048
1 16
0 500
0 0.1
1 64
1 64
0 0.5
Train your model and monitor progress
Not started
0 100
Sample Model Outputs
Prompt | Generated Text | Reference |
---|---|---|
Prompt | Generated Text | Reference |
---|
Auto-refreshing status every 2 seconds
Export your fine-tuned model
Quantization (GGUF only)
Gemma Fine-Tuning Documentation
Supported Models
This application supports fine-tuning the following Gemma models:
- google/gemma-2-2b-it
- google/gemma-2-9b-it
- google/gemma-2-27b-it
Dataset Format
Your dataset should follow one of these formats:
CSV
prompt,completion
"What is the capital of France?","The capital of France is Paris."
"How does photosynthesis work?","Photosynthesis is the process..."
JSONL
{"prompt": "What is the capital of France?", "completion": "The capital of France is Paris."}
{"prompt": "How does photosynthesis work?", "completion": "Photosynthesis is the process..."}
Plain Text
What is the capital of France?
###
The capital of France is Paris.
###
How does photosynthesis work?
###
Photosynthesis is the process...
Fine-Tuning Parameters
Basic Parameters
- Learning Rate: Controls how quickly the model adapts to the training data. Typical values range from 1e-5 to 5e-5.
- Batch Size: Number of samples processed before model weights are updated. Higher values require more memory.
- Number of Epochs: Number of complete passes through the training dataset. More epochs can lead to better results but may cause overfitting.
- Max Sequence Length: Maximum length of input sequences. Longer sequences require more memory.
Advanced Parameters
- Gradient Accumulation Steps: Accumulate gradients over multiple batches to simulate larger batch size.
- Warmup Steps: Number of steps for learning rate warmup. Helps stabilize training in the early phases.
- Weight Decay: L2 regularization factor to prevent overfitting.
- LoRA Parameters: Controls the behavior of LoRA (Low-Rank Adaptation), a parameter-efficient fine-tuning technique.
Export Formats
- PyTorch: Standard PyTorch model format (.pt or .bin files with model architecture).
- GGUF: Compact format optimized for efficient inference (especially with llama.cpp).
- Safetensors: Safe format for storing tensors, preventing arbitrary code execution.
Quantization
Quantization reduces model size and increases inference speed at the cost of some accuracy:
- None: No quantization, full precision (usually FP16 or BF16).
- int8: 8-bit integer quantization, good balance of speed and accuracy.
- int4: 4-bit integer quantization, fastest but may reduce accuracy more significantly.