Base vs fine-tuned Gemma 4 E2B as a model router
Melvin Vivas · X post · 2026-09-20 · Open on X
Topics: Fine-tuning & Model Customization · Level: intermediate
Summary
Compares the base model with the fine-tuned one for the creator's Gemma 4 E2B model router. The router was QLoRA fine-tuned with Unsloth to send software tasks to Luna or Astra. The quoted post links the Colab notebook repo.
Key points
- Shows how the base model differs from the fine-tuned model on the routing task.
- The router is Gemma 4 E2B Instruct, QLoRA fine-tuned with Unsloth.
- It labels each software task as needing Luna (cheaper) or Astra (stronger).
- The notebook runs in Google Colab; the repo is donvito/notebooks.
Resources mentioned
- donvito/notebooks · repo · github.com · free
The creator's notebooks for fine-tuning and running local models, which you can run in Google Colab, including a GLiNER2.5-Decide intent classification example.
Also in: Run Local Models on a Free GPU with Google Colab (T4) (Melvin Vivas on X · notes), Free Colab Notebooks for Local Model Fine-Tuning and Inference (Melvin Vivas on X · notes), Intent classification for support using GLiNER2.5-Decide notebook (Melvin Vivas on X · notes), Getting started with GLiNER2.5-Decide in a Colab notebook (Melvin Vivas on X · notes) and 3 more - Unsloth · tool · unsloth.ai · free
Open-source library for fast, memory-efficient fine-tuning of open LLMs (LoRA/QLoRA) on a single GPU or in Colab.
Also in: Run Laya Decision models locally with Unsloth on 4GB RAM (Melvin Vivas on X · notes), Unsloth passes 500M model downloads on Hugging Face (Melvin Vivas on X · notes), Run Qwen-Image-2.1 locally on 12GB VRAM with Unsloth GGUFs (Melvin Vivas on X · notes), QLoRA fine-tune Gemma 4 E2B with Unsloth as a model router (Melvin Vivas on X · notes) and 29 more - Gemma 4 E2B Instruct · tool · huggingface.co · free
Small open-weight instruction-tuned Gemma model, used here as the base for a QLoRA fine-tune.
Also in: QLoRA fine-tune Gemma 4 E2B with Unsloth as a model router (Melvin Vivas on X · notes), Free Colab Notebooks: ModernBERT, Gemma QLoRA, GLiNER & Guardrails (Melvin Vivas on X · notes)
Try this
- Run the notebook and compare the base model's routing answers with the fine-tuned model's.
- Fine-tune a small model to act as a router that picks a cheap or a strong model for each task.
More in Fine-tuning & Model Customization
- Fine-tuning Liquid AI LFM2/LFM2.5 MoE models with the new Halo framework
- Hugging Face LLM Course: Chapter 7.3 for Training Your Own Model
- Model Routing: Fine-Tune Your Own Router on Your Prompts
- QLoRA fine-tune Gemma 4 E2B with Unsloth as a model router
- Free Colab Notebooks: ModernBERT, Gemma QLoRA, GLiNER & Guardrails
- Fine-tuning Gemma4-E2B on your own tweet style with Unsloth