scottyjmp5/courtlistener-legal-corpus
CourtListener Legal Corpus (CPT + SFT) Training corpus used to fine-tune the Legal-Qwen model family (27B, 9B). All content is derived from public-domain United States court opinions via CourtListener (Free Law Project). Files File Records Purpose cpt.jsonl 21,421 Continued pre-training documents: full opinion texts, quality-filtered sft_cap20k.jsonl 20,000 Instruction pairs: opinion excerpt -> one-sentence holding (legal parenthetical), built from… See the full description on the dataset page: https://huggingface.co/datasets/scottyjmp5/courtlistener-legal-corpus.
CourtListener Legal Corpus (CPT + SFT)
Training corpus used to fine-tune the Legal-Qwen model family (27B, 9B). All content is derived from public-domain United States court opinions via CourtListener (Free Law Project).
Files
Schemas
CPT records: {"kind": "cpt", "text": "<full opinion text>"}
SFT records: {"kind": "sft", "instruction": "...", "input": "<opinion excerpt>", "output": "<one-sentence holding>"}
Provenance and processing
- Source: CourtListener bulk data exports (opinions + parentheticals CSVs) and REST API v4.
- Court opinions are public-domain works of the United States judiciary.
- Processing: HTML stripping, length/quality filters, per-opinion parenthetical caps, deterministic hash-based sampling. Build and training scripts are included in this repo under
scripts/. - The models trained on a subsample (16,000 CPT docs / 12,000 SFT pairs, 2,048-token sequences, 1 epoch).
Recommended use
This corpus teaches doctrine, drafting style, and citation form. It does not make a model a reliable citator. For citation-accurate applications, pair any model trained on this data with retrieval (RAG) over the full CourtListener bulk corpus so quotes, dates, and reporter citations come from source documents rather than model memory.
