nitin1pawar/gemma-2-2b-legal-raft
nitin1pawar/gemma-2-2b-legal-raft is a 2.6 billion parameter Gemma 2 model, fine-tuned by nitin1pawar using QLoRA for grounded legal and financial question answering. It specializes in refusing to answer when information is not present in provided passages, trained on a synthetic RAFT dataset from US case law and SEC filings. This model demonstrates high refusal recall and low false refusal rates, making it suitable for legal and financial information retrieval where accuracy and grounded responses are critical.
Loading preview...
Model Overview
nitin1pawar/gemma-2-2b-legal-raft is a 2.6 billion parameter model based on google/gemma-2-2b-it, fine-tuned by nitin1pawar. Its primary differentiation lies in its specialized training for grounded legal and financial question answering, utilizing a synthetic RAFT dataset derived from US case law and SEC filings.
Key Capabilities & Differentiators
- Grounded Question Answering: Specifically trained to provide answers only when the information is present in the provided passages.
- Refusal Mechanism: A quarter of its training examples involve questions where the answer is absent, teaching the model to explicitly state when it cannot provide an answer, rather than hallucinating.
- Performance Metrics: Achieves 99.2% refusal recall (correctly refusing when an answer is absent) and a low 0.7% false refusal rate (wrongly refusing when an answer is present), significantly outperforming a smaller 125M model on these metrics.
- Efficient Fine-tuning: Fine-tuned using QLoRA (4-bit NF4) with only 1.28% of parameters trainable, demonstrating efficient adaptation.
Use Cases & Limitations
This model is designed for applications requiring precise and grounded responses in legal and financial contexts, particularly where avoiding unsupported answers is crucial. It is important to note that the model was fine-tuned on synthetic answers generated by another language model, not by legal professionals. Its refusal behavior is learned and not a guarantee. The context window during training was capped at 1,024 tokens. It is not intended to provide legal or financial advice.
Prompt Format
It uses the standard Gemma 2 chat format, with system instructions placed at the beginning of the user turn, as Gemma 2 does not have a dedicated system role. Generation should stop on <end_of_turn>.