Google's Gemma 2 2B, QLoRA fine-tuned on 15,000 grounded legal/financial question-answer pairs. It adapts the general base to answer from our legal context.
Google's instruction-tuned Gemma adapted to our legal QA with a QLoRA adapter (4-bit base, rank-16 LoRA), trained on the same 15,000-pair grounded QA dataset as the 500M model. Only the adapter is trained; the base stays frozen.
2 epochs (1,875 steps, ~3.4 h on an L4). On the blind-judge evaluation it scores 0.964 judged correctness [0.950–0.976] — the strongest QA model in the family and essentially level with the raw Gemma base, now grounded in our legal corpus (groundedness 0.976, fabrication 4%).
| Class | Gemma2ForCausalLM |
| Layers | 26 |
| Hidden size | 2,304 |
| Attention | 8 heads / 4 KV · dim 256 · GQA |
| Feed-forward | GeGLU · inner 9,216 |
| Attention window | sliding 4,096 (alternating) · logit soft-cap |
| Norm | RMSNorm |
| Context | 8,192 tokens |
| Vocabulary | 256,128 |
| Embeddings | tied input/output |
| Init from | gemma-2-2b-it · 4-bit NF4 |
| Method | QLoRA · rank-16 |
| Trainable params | 20.8M LoRA (0.8%) |
| Training data | 15,000 QA pairs · 2 epochs |
| Training tokens | 6.8M (3.4M/epoch × 2) |
| Optimizer steps | 1,875 |
our cost begins at fine-tuning — the base is Google's, imported free.
| Stage | Detail | Cost |
|---|---|---|
| QLoRA fine-tune | 4-bit + rank-16 LoRA, 1,875 steps on A100-40GB | $9.84 |
| Evaluation (shared) | 13 versions on 500 held-out questions, this model's share | $1.48 |
| Total | $11.32 |
Figures are Modal GPU usage (time × rate) across this model's lineage; shared datasets are charged at this model's share. Whether base pretraining is included is stated above — it is for the models pretrained here, and excluded for imported bases. Evaluation-derived metrics come from an independent blind-judge harness on a frozen, decontaminated held-out set. Serving is billed separately and scales to zero.