Run this model with HF Jobs
Run habibi26/gemma4-e2b-distill-sft on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/habibi26/gemma4-e2b-distill-sft. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/habibi26/gemma4-e2b-distill-sft on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Instructions to use habibi26/gemma4-e2b-distill-sft with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use habibi26/gemma4-e2b-distill-sft with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("google/gemma-4-E2B-it") model = PeftModel.from_pretrained(base_model, "habibi26/gemma4-e2b-distill-sft") - Notebooks
- Google Colab
- Kaggle
gemma4-e2b-distill-sft
LoRA adapter (r=16, Ξ±=32, dropout 0.05, all linear layers) for google/gemma-4-E2B-it, trained on r0b0tlab/qwen3.8-max-glm5.2-kimi-k3-distillation (canonical config).
Data
- Config
canonical, splittrain, shards*-of-00006(52,205 rows β note the dataset card's ~890K-row metadata is wrong; the two generations indata/canonical/overlap ~90% and the 6-part set supersedes the 5-part one). - Filtered to
verifier_passed=trueandn_tool_calls=0; stratified sample acrosstask_typeβ 27,351 prompt-completion examples (one per assistant turn). - Teacher chain-of-thought (from
reasoning_content) merged into the assistant content as a3507,2618525643435block; verified to survive the Gemma-4 chat template before training.
Training
TRL SFTTrainer 1.18.0, transformers 5.23.0, conversational prompt-completion with completion_only_loss; batch 2 Γ grad-accum 16, lr 1e-4 cosine, warmup 25 steps, 1 epoch = 812 optimizer steps; bf16, eager attention on the audio tower (no SDPA kernel in gemma4), max_length 2048. Run: job 6af8ebfd, 4h35m on an a10g-large.
Evaluation (held-out validation split, same filters)
| Model | loss | token accuracy | n |
|---|---|---|---|
| base gemma-4-E2B-it | 2.372 | 0.714 | 100 |
| pushed adapter (step 750/812) | 0.600 | 0.840 | 1,105 |
| end-of-training weights (in-run, step 812) | 0.477 | 0.856 | 1,000 |
The pushed commit (4a93deb) is the trainer's last checkpoint save (step 750), because the training job crashed after its final eval but before its own push β 62 steps into a fully decayed cosine tail. The step-750 vs step-812 gap (0.600 vs 0.477) is larger than the LR tail alone should explain and is reported as an open discrepancy in eval_report.json rather than reconciled. Generations from the adapter are coherent <think>-style solutions ending in \boxed{} answers.
Files
adapter_config.json,adapter_model.safetensorsβ the LoRA adapter (attach togoogle/gemma-4-E2B-itwithpeft.PeftModel.from_pretrained)eval_report.jsonβ final metrics, base-model baseline, discrepancy note, 6 greedy generations
Caveats
- The Trackio dashboard could not host metrics (Space creation returned 402 on this account), so per-step training metrics were not persisted remotely; eval-side numbers above come from the eval job and the training job's logs.
- Multilingual/tool-use traces with tool calls were excluded by the filter.
- Downloads last month
- 77