Instructions to use True2456/gemma-4-12b-it-qat-4bit-frontierdistill with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use True2456/gemma-4-12b-it-qat-4bit-frontierdistill with MLX:
# Download the model from the Hub pip install huggingface_hub[hf_xet] huggingface-cli download --local-dir gemma-4-12b-it-qat-4bit-frontierdistill True2456/gemma-4-12b-it-qat-4bit-frontierdistill
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
Upload README.md with huggingface_hub
Browse files
README.md
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
base_model: mlx-community/gemma-4-12B-it-qat-4bit
|
| 3 |
+
license: gemma
|
| 4 |
+
library_name: mlx-vlm
|
| 5 |
+
tags:
|
| 6 |
+
- lora
|
| 7 |
+
- qlora
|
| 8 |
+
- gemma4
|
| 9 |
+
- agentic
|
| 10 |
+
- coding
|
| 11 |
+
- tool-use
|
| 12 |
+
- mlx
|
| 13 |
+
datasets:
|
| 14 |
+
- greghavens/fable-5-coding-and-debugging-traces
|
| 15 |
+
- greghavens/gpt-5.6-sol-coding-and-debugging-traces
|
| 16 |
+
- greghavens/kimi-k3-coding-and-debugging-traces
|
| 17 |
+
---
|
| 18 |
+
|
| 19 |
+
# gemma-4-12b-it-qat-4bit-frontierdistill
|
| 20 |
+
|
| 21 |
+
A rank-8 LoRA adapter for [mlx-community/gemma-4-12B-it-qat-4bit](https://huggingface.co/mlx-community/gemma-4-12B-it-qat-4bit), fine-tuned for agentic coding and tool use. Trained on Apple Silicon (MLX) via [mlx-vlm](https://github.com/Blaizzy/mlx-vlm).
|
| 22 |
+
|
| 23 |
+
## Training data
|
| 24 |
+
|
| 25 |
+
16,730 examples combined from three frontier-model distillation trace datasets (all CC-BY-4.0):
|
| 26 |
+
|
| 27 |
+
- [greghavens/fable-5-coding-and-debugging-traces](https://huggingface.co/datasets/greghavens/fable-5-coding-and-debugging-traces)
|
| 28 |
+
- [greghavens/gpt-5.6-sol-coding-and-debugging-traces](https://huggingface.co/datasets/greghavens/gpt-5.6-sol-coding-and-debugging-traces)
|
| 29 |
+
- [greghavens/kimi-k3-coding-and-debugging-traces](https://huggingface.co/datasets/greghavens/kimi-k3-coding-and-debugging-traces)
|
| 30 |
+
|
| 31 |
+
Split by trajectory (not row) so no trajectory leaks across train/valid/test.
|
| 32 |
+
|
| 33 |
+
## Training config
|
| 34 |
+
|
| 35 |
+
| | |
|
| 36 |
+
|---|---|
|
| 37 |
+
| Method | LoRA, all `language_model` linear layers |
|
| 38 |
+
| Rank / alpha | 8 / 16 |
|
| 39 |
+
| Iterations | 1000 (~1.1 epochs) |
|
| 40 |
+
| Effective batch | 16 (grad accumulation) |
|
| 41 |
+
| Learning rate | 2e-5, constant |
|
| 42 |
+
| Max sequence length | 8192 |
|
| 43 |
+
| Loss | response-only (prompt masked) |
|
| 44 |
+
|
| 45 |
+
## Evaluation
|
| 46 |
+
|
| 47 |
+
Held-out test split (never seen in training), base vs. this adapter:
|
| 48 |
+
|
| 49 |
+
| Metric | Base | +LoRA | Δ |
|
| 50 |
+
|---|---|---|---|
|
| 51 |
+
| Perplexity (held-out NLL) | 4.23 | 2.15 | −49% |
|
| 52 |
+
| HumanEval pass@1 (n=164) | 92.1% | 89.0% | −3.1pp |
|
| 53 |
+
| Tool-name accuracy (n=150) | 68.0% | 74.0% | +6.0pp |
|
| 54 |
+
| Tool-argument overlap (n=150) | 23.7% | 41.3% | +17.7pp |
|
| 55 |
+
|
| 56 |
+
The adapter meaningfully improves tool selection and argument correctness — the actual training objective — at a small cost to isolated, out-of-distribution coding-puzzle accuracy (HumanEval). Perplexity alone overstates the improvement; treat it alongside the functional numbers, not in place of them.
|
| 57 |
+
|
| 58 |
+
## Usage
|
| 59 |
+
|
| 60 |
+
```bash
|
| 61 |
+
pip install mlx-vlm
|
| 62 |
+
python -m mlx_vlm.generate \
|
| 63 |
+
--model mlx-community/gemma-4-12B-it-qat-4bit \
|
| 64 |
+
--adapter-path gemma-4-12b-it-qat-4bit-frontierdistill \
|
| 65 |
+
--prompt "Your prompt here"
|
| 66 |
+
```
|