FINE-TUNED BY HARMAN SANDHU
QA SFT · QLoRA FINE-TUNE

Gemma 2 2B · QA

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.

HuggingFace weights →
2.6B
Parameters
256K
Vocab
8,192
Context
4-bit
NF4 quantized
96.4%
Judged correct
97.6%
Groundedness
15,000
QA pairs
Model lineage
interactiveconnecting…

Ask a question

Connecting to the inference endpoint…
The model's answer will appear here.
grounded QA (QLoRA)

What this is

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%).

Architecture
ClassGemma2ForCausalLM
Layers26
Hidden size2,304
Attention8 heads / 4 KV · dim 256 · GQA
Feed-forwardGeGLU · inner 9,216
Attention windowsliding 4,096 (alternating) · logit soft-cap
NormRMSNorm
Context8,192 tokens
Vocabulary256,128
Embeddingstied input/output
Training
Init fromgemma-2-2b-it · 4-bit NF4
MethodQLoRA · rank-16
Trainable params20.8M LoRA (0.8%)
Training data15,000 QA pairs · 2 epochs
Training tokens6.8M (3.4M/epoch × 2)
Optimizer steps1,875
What this model cost to build

$11.32 total Modal usage

our cost begins at fine-tuning — the base is Google's, imported free.

StageDetailCost
QLoRA fine-tune4-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.