Add dataset card
Browse files
README.md
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: mit
|
| 3 |
+
language:
|
| 4 |
+
- en
|
| 5 |
+
tags:
|
| 6 |
+
- legal
|
| 7 |
+
- india
|
| 8 |
+
- law
|
| 9 |
+
- instruction-tuning
|
| 10 |
+
- pretraining
|
| 11 |
+
size_categories:
|
| 12 |
+
- 100K<n<1M
|
| 13 |
+
---
|
| 14 |
+
|
| 15 |
+
# Comprehensive Indian Legal Dataset (CPT & SFT)
|
| 16 |
+
|
| 17 |
+
## Overview
|
| 18 |
+
This repository contains a rigorously processed and highly structured dataset for training Large Language Models (LLMs) on Indian Law. It is specifically designed to overcome the hallucination and generic advice problems common in existing legal models by forcing exact citations and strict adherence to statutory text.
|
| 19 |
+
|
| 20 |
+
The dataset is split into two phases:
|
| 21 |
+
1. **Continued Pre-Training (CPT):** `master_cpt_final.jsonl` - Designed to teach the model the base language, syntax, and fundamental knowledge of Indian statutes, case laws, and regulations.
|
| 22 |
+
2. **Supervised Fine-Tuning (SFT):** `master_sft_final.jsonl` - A massive collection of high-quality, instruction-following Q&A pairs designed to teach the model how to act as a precise legal assistant.
|
| 23 |
+
|
| 24 |
+
## Why This Dataset is Superior to Existing Alternatives
|
| 25 |
+
Many existing Indian legal datasets suffer from three fatal flaws: they jumble CPT and SFT data together, they contain massive amounts of noisy OCR text, and they lack the newly enacted criminal codes. This dataset solves all three:
|
| 26 |
+
|
| 27 |
+
* **Distinct CPT & SFT Phasing:** By strictly separating unstructured legal text (CPT) from conversational reasoning (SFT), this dataset ensures the model first internalizes the law before it learns how to give advice.
|
| 28 |
+
* **Modern vs. Legacy Cross-Referencing:** This is one of the few datasets to comprehensively map and include the newly enacted Indian criminal codes (BNS, BNSS, BSA) alongside their legacy counterparts (IPC, CrPC, IEA), ensuring historical continuity and modern relevance.
|
| 29 |
+
* **Zero-Hallucination Prompt Engineering:** The SFT data is engineered with highly specific prompt templates that force the model to cite specific sections, clauses, and acts rather than relying on generalized, hallucinated summaries.
|
| 30 |
+
* **Aggressive Noise Reduction:** All documents have been passed through rigorous deduplication and filtering pipelines to strip out boilerplate HTML, raw OCR garbage, and irrelevant metadata that degrades model quality.
|
| 31 |
+
|
| 32 |
+
## Technical Nuances
|
| 33 |
+
- **Format:** JSONL
|
| 34 |
+
- **Context Length:** Optimized for 2048-token chunking, making it highly efficient for training on consumer-grade GPUs (e.g., T4, RTX 3090/4090) using QLoRA.
|
| 35 |
+
- **Data Distribution:** Contains a balanced mix of Bare Acts, Supreme Court judgments, Tribunal rulings, and regulatory frameworks (e.g., SEBI, RBI).
|