Downloads · 30 days
21
40% of all-time downloads
vishalkhot/gemma-4b-distilled
gemma-4b-distilled is a text generation model from vishalkhot. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as apache-2.0.
This repository contains a 4B-parameter distilled Gemma model, trained using knowledge distillation from a larger Gemma-2-9B-Instruct teacher. The objective was to create a smaller, faster model that preserves strong…
Downloads · 30 days
21
40% of all-time downloads
All-time downloads
52
Public
Parameters
4.3B
9.6 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors8.6 GB · 89%
From the Hugging Face model README
This repository contains a 4B-parameter distilled Gemma model, trained using knowledge distillation from a larger Gemma-2-9B-Instruct teacher.
The objective was to create a smaller, faster model that preserves strong instruction-following behavior while being practical for edge deployment and low-latency inference.
google/gemma-2-9b-itvishalkhot/gemma-4b-distilledThis model is ideal for:
Distillation was performed over a mixed instruction dataset, combining reasoning, multi-turn dialogue, tool-usage instructions, and diverse language tasks.
Training used a combination of:
python distill.py \
--teacher-model google/gemma-3-12b-it \
--student-model google/gemma-3-4b-it\
--train-file data/train.jsonl \
--val-file data/val.jsonl \
--output-dir gemma_4b_distilled \
--batch-size 8 \
--gradient-accumulation-steps 2 \
--num-epochs 1 \
--learning-rate 1e-5 \
--warmup-steps 300 \
--max-length 2048 \
--temperature 2.5 \
--alpha 0.5 \
--save-steps 1000 \
--eval-steps 200 \
--logging-steps 10 \
--bf16