abhishekai/gemma-2-2b-legal-sft-v2
The abhishekai/gemma-2-2b-legal-sft-v2 is a 2.6 billion parameter Gemma-2 model fine-tuned with QLoRA (4-bit) for grounded question answering over legal and financial passages. This model significantly outperforms its base google/gemma-2-2b-it model and an earlier legal fine-tune, demonstrating improved instruction following by incorporating general-domain instruction data. It is specifically optimized for providing accurate answers based on supplied context in specialized legal and financial domains.
Loading preview...
Model Overview
The abhishekai/gemma-2-2b-legal-sft-v2 is a 2.6 billion parameter Gemma-2 model, fine-tuned using QLoRA (4-bit), specifically designed for grounded question answering within legal and financial contexts. This version demonstrates a notable improvement over its base model (google/gemma-2-2b-it) and previous legal fine-tunes, achieving a score of 8.98/10 in evaluations, compared to 8.40 for the base model.
Key Differentiators & Training
This model addresses the common issue of catastrophic forgetting in domain-specific fine-tuning by mixing 50% general-domain instruction data (allenai/tulu-3-sft-mixture) with legal data. This approach significantly enhances instruction following capabilities. The training involved QLoRA 4-bit with nf4 and double quantization, using LoRA r=16 / α=32 on all attention and MLP projections, resulting in 20.8M trainable parameters. The adapter is merged into bf16 weights for ease of use without PEFT dependency.
Evaluation & Limitations
Evaluation was conducted using Claude Sonnet as an independent judge, scoring across question answering, instruction following, grounding, and appropriate refusal. While it excels at answering from provided passages, it's important to note its limitations:
- Not for closed-book performance: Its strength lies in retrieval-style tasks with supplied context.
- Invents citations: It can convincingly generate citations that are not real.
- No arithmetic reliability.
- Gemma Terms of Use apply, inherited from the base model.