🇮🇳 Indian Legal Instruction Fine-Tuning
Qwen 3 (1.7B) — Indian Legal Domain Adaptation (Experimental)
Overview
This project fine-tunes Qwen 3 (1.7B) on a custom-built Indian legal instruction dataset to improve legal explanation, structured responses, legal terminology usage, and long-form answer generation.
This release continues the work from earlier experiments and focuses on understanding the relationship between dataset quality, factual grounding, and legal reasoning behavior.
The model is provided in GGUF format for local inference and experimentation.
Project Goal
Build a compact legal-domain model capable of:
- Explaining Indian legal provisions
- Answering legal and statutory questions
- Producing structured legal summaries
- Improving legal terminology usage
- Generating readable long-form responses
This project is experimental and intended as a learning and research effort.
Training Dataset
Dataset:
kaushik-harsh-99/Indian-legal-data-v3
Dataset Characteristics
- Domain: Indian Law
- Format: Instruction → Response
- Language: English
- Long-form explanatory answers
- Structured legal-style responses
- Broad legal topic coverage
The dataset emphasizes explanation quality and response organization rather than extractive legal retrieval.
Learnings from V2
The previous generation of training data produced visible improvements compared with the base model.
Improvements Observed
- More structured answer formatting
- Better legal vocabulary usage
- Improved readability and organization
- Better long-form coherence
- Reduced generic responses
- Stronger domain adaptation compared to base outputs
However, deeper evaluation revealed important limitations.
Issues Identified
Although output quality improved stylistically, factual grounding remained weaker than expected.
Observed patterns included:
- Over-interpretation of statutory provisions
- Adding implications not directly supported by source text
- Generating policy-style explanations unnecessarily
- Introducing concepts not explicitly present in legal text
- Excessive explanatory sections creating unsupported claims
- Strong formatting with weaker source faithfulness
Example behavior observed during evaluation:
Instead of staying close to statutory language, the model sometimes produced:
- Broad significance statements
- Inferred operational goals
- Generalized administrative explanations
- Legally plausible but unsupported details
This indicated that the model learned answer style more strongly than legal grounding.
What I Learned
The primary bottleneck was not model size.
After reviewing outputs and analyzing failure cases, I concluded that the dataset itself introduced systematic bias.
Key findings:
- Long essay-style targets encouraged unnecessary interpretation
- Structured headings sometimes promoted hallucinated sections
- Responses mixed statutory explanation with inferred conclusions
- Some samples rewarded verbosity instead of factual precision
This project became an important lesson:
Data quality matters more than parameter count.
Current Direction (Next Dataset Iteration)
The next training iteration focuses on improving the dataset itself.
Planned improvements:
- Reduce interpretive and speculative text
- Increase statute-grounded explanations
- Shorten unnecessarily long responses
- Separate legal text from explanation
- Reduce unsupported conclusions
- Improve factual consistency
- Introduce more concise and source-faithful targets
- Improve answer density while reducing hallucination pressure
Target Answer Structure
1Section Summary
2
3↓
4
5Key Provision
6
7↓
8
9Brief Explanation
10
11↓
12
13Short Conclusion
instead of long essay-style outputs.
Model Status
Current release status:
Experimental / Research Preview
This model is uploaded to allow users to test behavior and provide feedback while the next dataset iteration is being developed.
Expected Strengths
- Structure
- Readability
- Legal language
Current Known Limitations
- Factual grounding
- Over-explanation
- Occasional unsupported interpretation
Usage
Load the GGUF file in your preferred inference framework.
Example applications:
- Legal QA experiments
- Domain adaptation research
- Dataset quality studies
- Local LLM inference
Future Work
Planned next iteration:
Dataset → Improved Grounding → Retraining → Evaluation → Release
The next version will prioritize:
Accuracy first. Structure second.