IndiaLaw-14B (Llama-3.1-8B-Instruct fine-tune)
IndiaLaw-14B is a specialized language model fine-tuned entirely on Indian criminal law, explicitly focused on the new legislative framework that came into effect on 1 July 2024:
- Bharatiya Nyaya Sanhita (BNS) [Replaced IPC]
- Bharatiya Nagarik Suraksha Sanhita (BNSS) [Replaced CrPC]
- Bharatiya Sakshya Adhiniyam (BSA) [Replaced IEA]
Model Description
- Model type: Causal Language Model (Fine-tuned QLoRA adapter)
- Language(s): English, Hindi
- License: Llama 3.1 Community License
- Base model:
meta-llama/Llama-3.1-8B-Instruct - Training Method: QLoRA via TRL SFTTrainer
Intended Use
This model is intended to provide highly accurate, citation-faithful legal reasoning for the newly enacted Indian criminal laws. Standard LLMs often hallucinate section numbers or conflate the old IPC/CrPC/IEA with the new laws. IndiaLaw-14B has been strictly fine-tuned to avoid these regressions and answer legal queries with verifiable, cross-walked references.
Training Data
The model was fine-tuned on a heavily curated dataset comprising:
- Ground Truth legal texts (BNS, BNSS, BSA, IPC, CrPC, IEA, Special Laws, Constitution).
- MHA Comparison Tables, Corrigenda, and Parliamentary Debates.
- Verified IRAC (Issue, Rule, Application, Conclusion) training pairs generated synthetically and strictly filtered against a canonical legal section registry.
Evaluation
During training, rigorous quality gates were employed. A held-out benchmark set (5%) was used to verify that:
- Section mapping (e.g., IPC 302 -> BNS 103) is accurate.
- Answer matching and hallucination rates are superior to the base
meta-llama/Llama-3.1-8B-Instruct. - No catastrophic forgetting on general capabilities.
Usage
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
base_model_name = "meta-llama/Llama-3.1-8B-Instruct"
adapter_model = "your-hf-username/IndiaLaw-14B"
tokenizer = AutoTokenizer.from_pretrained(base_model_name)
model = AutoModelForCausalLM.from_pretrained(base_model_name)
model = PeftModel.from_pretrained(model, adapter_model)
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support
Model tree for bhriguverma/IndiaLaw-14B
Base model
meta-llama/Llama-3.1-8B Finetuned
meta-llama/Llama-3.1-8B-Instruct