Dataset Viewer
Auto-converted to Parquet Duplicate
document_id
stringlengths
10
73
document_type
stringclasses
5 values
source_family
stringlengths
10
73
raw_sha256
stringlengths
64
64
size_band
stringclasses
5 values
complexity_band
stringclasses
4 values
text
stringlengths
88
136k
citations
listlengths
0
477
messages
listlengths
3
3
stat-111-114-115-c0
acts
stat-111-114-115
e914c15541e504f624016348bdf733652d24a26e1e394bbdf35e3ed1748a4d92
xl
q1
111 STAT. 2296 Public Law105–115 105th Congress An Act To amend the Federal Food, Drug, and Cosmetic Act and the Public Health Service Act to improve the regulation of food, drugs, devices, and biological products, and for other purposes. Nov. 21, 1997 [S. 830] Be it enacted by the Senate and House of Representati...
[ { "quote": "111 STAT. 2296", "start": 0, "end": 14, "kind": "statutes_at_large" }, { "quote": "Public Law105–115", "start": 16, "end": 33, "kind": "public_law" }, { "quote": "Federal Food, Drug, and Cosmetic Act", "start": 72, "end": 108, "kind": "act" }, ...
[ { "role": "system", "content": "Extract legal citations from the supplied raw text. Return only a JSON array of objects with keys \"quote\", \"start\", \"end\", and \"kind\". Copy quote verbatim. start and end are zero-based Unicode character offsets into the supplied text, end exclusive. Include every cita...
stat-125-24-25
acts
stat-125-24-25
84fa953106f1eff32b0ef3d4720991ee57af8fc3efac7e9b2bbc3bcb0ba0f8ec
xl
q1
"\nPublic Law112–25\n112th Congress\n\n\n\nAn Act\nTo provide for budget control.Aug. 2, 2011[S. 3(...TRUNCATED)
[{"quote":"Public Law112–25","start":1,"end":17,"kind":"public_law"},{"quote":"S. 365","start":86,(...TRUNCATED)
[{"role":"system","content":"Extract legal citations from the supplied raw text. Return only a JSON (...TRUNCATED)
stat-125-80-81-c0
acts
stat-125-80-81
9527da59b673a766081c08cd1bf71c081e5374d99558a0120bb3997c55ff8183
xl
q1
"125 STAT. 1298\nPublic Law112–81\n112th Congress\n\n\n\nAn Act\nTo authorize appropriations for f(...TRUNCATED)
[{"quote":"125 STAT. 1298","start":0,"end":14,"kind":"statutes_at_large"},{"quote":"Public Law112–(...TRUNCATED)
[{"role":"system","content":"Extract legal citations from the supplied raw text. Return only a JSON (...TRUNCATED)
stat-124-68-203-c0
acts
stat-124-68-203
595e2de359b76620ffc93b5386f739ee7af2466d3b7d94cd205b95a2faf2ae0e
xl
q1
"124 STAT. 1376\nPublic Law111–203\n111th Congress\n\n\n\nAn Act\nTo promote the financial stabili(...TRUNCATED)
[{"quote":"124 STAT. 1376","start":0,"end":14,"kind":"statutes_at_large"},{"quote":"Public Law111–(...TRUNCATED)
[{"role":"system","content":"Extract legal citations from the supplied raw text. Return only a JSON (...TRUNCATED)
stat-123-83-84-c0
acts
stat-123-83-84
45c41f63664afa28d227234d026eda9d90d3df6f309eec159a9c6e84a310d06a
xl
q1
"123 STAT. 2190\nPublic Law111–84\n111th Congress\n\n\n\nAn Act\nTo authorize appropriations for f(...TRUNCATED)
[{"quote":"123 STAT. 2190","start":0,"end":14,"kind":"statutes_at_large"},{"quote":"Public Law111–(...TRUNCATED)
[{"role":"system","content":"Extract legal citations from the supplied raw text. Return only a JSON (...TRUNCATED)
stat-110-75-170-c0
acts
stat-110-75-170
97373fbbd4d5aa62c141cc7f6e64668d4800d89494d22e27a787b2efe4a558ef
xl
q1
"\n110 STAT. 1489\nPublic Law 104–170\n104th Congress\n\n\n\nAn Act\nTo amend the Federal Insectic(...TRUNCATED)
[{"quote":"110 STAT. 1489","start":1,"end":15,"kind":"statutes_at_large"},{"quote":"Public Law 104(...TRUNCATED)
[{"role":"system","content":"Extract legal citations from the supplied raw text. Return only a JSON (...TRUNCATED)
stat-106-51-295
acts
stat-106-51-295
51c47dd5ad127c400ce0c6e82f5d0fd48e9947f8d887436d06f3c355738a80bd
xl
q1
"\n106 STAT. 187\nPublic Law 102–295\n102d Congress\n\n\n\nAn Act\nTo amend the Child Abuse Preven(...TRUNCATED)
[{"quote":"106 STAT. 187","start":1,"end":14,"kind":"statutes_at_large"},{"quote":"Public Law 102–(...TRUNCATED)
[{"role":"system","content":"Extract legal citations from the supplied raw text. Return only a JSON (...TRUNCATED)
stat-120-51-222
acts
stat-120-51-222
83fc27c201641520fa6b149d94764445cd6f1babc631e0319063af9b300350b1
xl
q1
"PUBLIC LAW 109–222—MAY 17, 2006\n120 STAT. 345\nPublic Law109–222\n109th Congress\n\n\n\nAn A(...TRUNCATED)
[{"quote":"120 STAT. 345","start":32,"end":45,"kind":"statutes_at_large"},{"quote":"H.R. 4297","star(...TRUNCATED)
[{"role":"system","content":"Extract legal citations from the supplied raw text. Return only a JSON (...TRUNCATED)
stat-124-13-148-c0
acts
stat-124-13-148
b0ec49308352f1824efa592558d6b723c5a03a5814df2e3d62690b45d294967b
xl
q1
"124 STAT. 119\nPublic Law111–148\n111th Congress\n\n\n\nAn Act\nEntitled The Patient Protection a(...TRUNCATED)
[{"quote":"Public Law111–148","start":14,"end":31,"kind":"public_law"},{"quote":"[H.R. 3590]","sta(...TRUNCATED)
[{"role":"system","content":"Extract legal citations from the supplied raw text. Return only a JSON (...TRUNCATED)
stat-120-261-432-c0
acts
stat-120-261-432
47de00aea992d96dded6eaaebd85b4c6a1fb83f88073d8d8e1fd10dc6db1696e
xl
q1
"PUBLIC LAW 109–432—DEC. 20, 2006\n120 STAT. 2922\nPublic Law109–432\n109th Congress\n\n\n\nAn(...TRUNCATED)
[{"quote":"120 STAT. 2922","start":33,"end":47,"kind":"statutes_at_large"},{"quote":"Internal Revenu(...TRUNCATED)
[{"role":"system","content":"Extract legal citations from the supplied raw text. Return only a JSON (...TRUNCATED)
End of preview. Expand in Data Studio

citation-extractor-fast — training data and evaluation

The exact training cohort and frozen evaluation for citation-extractor-fast: legal source text paired with citation quotes, kinds and Unicode source offsets. This release includes the training recipe, checkpoint-bound code, split manifests, original evaluation predictions and a score-reproduction check.

Split Documents Contents
train 8,015 Actual examples used for the published one-epoch fine-tune
test 200 Frozen federal holdout documents and silver citation references

The original 8,129-candidate training archive and the 114 fit exclusions are included under reproduction/. The admitted training cohort is identified by the original common-fit manifest and final checkpoint's ordered document IDs. Train and test are disjoint by document ID, source family and exact source text.

Load the data

from datasets import load_dataset

data = load_dataset("thurstonpowers/citation-extractor-fast")
example = data["train"][0]
print(example["text"])
print(example["citations"])
print(example["messages"])

Each row contains:

  • document_id, document_type, source_family: source identity and grouping.
  • raw_sha256: SHA-256 of the exact UTF-8 source text.
  • size_band, complexity_band: original sampling strata.
  • text: complete original user-input text, preserving characters and line endings.
  • citations: objects with quote, start, end, kind.
  • messages: the actual system/user/assistant training messages; test rows contain system/user messages, with reference answers in citations.

Offsets are zero-based Unicode codepoints, with exclusive end. Every citation satisfies text[start:end] == quote. Repeated occurrences have separate offsets. The original assistant strings and prompt bytes are preserved. SYSTEM_PROMPT.txt SHA-256: 8e2451afcf15498b0aab55b490fd0536342fcf097ce5dc3abd99958556de4f85.

Label provenance

Sources are U.S. federal statutes, regulations, bills, acts and proposed rules. Citation labels were assembled from three teacher draws per source, reconciled using cross-draw support and exact source alignment. Repeated literal quote occurrences were projected to their source positions. These are silver annotations: coverage and teacher interpretation can contain errors.

The release preserves the source IDs/text hashes, original training archive, reference answers, and reconciliation implementation. Independent legal adjudication remains a separate step. See provenance/data-release.json for artifact identities and label-generation details.

Reproduce the published evaluation

The original eval200 includes 200 predictions per arm for untrained Nemotron, GPT‑6.1 Sol and fine-tuned Nemotron. Raw generated text, failure status, caps, timeouts, token counts, durations and scoring-relevant usage values are included. All original failures remain in the denominator.

Document type Documents Untrained Nemotron F1 GPT‑6.1 Sol F1 Fine-tuned original F1 Fine-tuned + timeout retries F1
Acts 37 3.32% 23.21% 55.76% 61.88%
Bills 44 0.73% 13.19% 49.01% 49.01%
Proposed rules 37 0.88% 31.43% 32.58% 32.58%
Regulations 44 0.59% 30.01% 38.08% 34.15%
Statutes 38 1.33% 17.57% 43.64% 43.64%
Overall 200 1.31% 23.18% 44.23% 44.55%

These are exact-quote multiset F1 scores. evaluation/comparison.json includes all metrics and strata; evaluation/comparison-by-document-type.md includes precision, recall and failures. The original fine-tuned arm has 31 caps and 19 600-second timeouts. The larger-budget follow-up below is recorded separately.

Completed longer-budget supplement

supplements/longer-budget-20261105/ preserves both retry stages, their fixed assignments, raw outputs, protocols, completion/capacity receipts and all scores. The first retry raised the deadline to 1,800 seconds. Four EOS outputs were retained, then the remaining 15 cases were run with 32,768 output tokens, 65,536 context tokens and the same deadline. The final 19-case cohort contains five complete JSON arrays and 14 capped outputs.

The last table column retains 181 original predictions and substitutes these 19 fixed retry outcomes. All 200 documents remain in the denominator. Overall quote precision/recall/F1 become 65.07% / 33.87% / 44.55%, with 45 caps and zero timeouts across the combined 200 outcomes. The original result files remain unchanged. The verifier recomputes every original and supplemental score group and checks that the other 181 prediction records are unchanged.

The two retry stages add 30 saved predictions and one caller-interrupted attempt to the original 200. The supplement accounts for 231 started attempts, including the interrupted token trace, and records cumulative time/tokens for the 230 saved prediction records. Thinking-disabled decoding was used throughout the fine-tuned runs; the larger allowance funds generated citation JSON. Repeated citations and drifting offsets remained substantial failure modes.

Download an immutable snapshot and verify it using Python's standard library:

from huggingface_hub import HfApi, snapshot_download

repo = "thurstonpowers/citation-extractor-fast"
revision = HfApi().dataset_info(repo).sha
snapshot = snapshot_download(repo, repo_type="dataset", revision=revision)
print(snapshot)
python /path/to/snapshot/verify_release.py /path/to/snapshot

This checks every file checksum, original training archive and code hashes, ordered cohort membership, exact source spans, split separation and every published score group across all three arms. It reports results without a GPU or API calls. Score recomputation uses preserved generated outputs; fresh model inference is available through the included frozen workers and protocols.

Reproduce training

Base model: nvidia/NVIDIA-Nemotron-3-Nano-4B-BF16, immutable revision dfaf35de3e30f1867dd8dbc38a7fc9fb52d3914f.

Recipe: full language-weight fine-tuning; native BF16 parameters with architecture-specific dtype exceptions; FP32 Adafactor state; one epoch; microbatch one, accumulation four; LR 5e-6; 101 warmup updates; cosine schedule to 0.1 of initial LR; seed 102301; 2,004 updates; complete sequences up to 32,768 tokens. Exact arguments and tensor/data contracts are in reproduction/.

  1. Install a compatible CUDA/PyTorch environment using the versions recorded in reproduction/training-environment.json. Training was run on NVIDIA GB10 with Python 3.12, PyTorch 2.13.0+cu130 and Transformers 5.15.1. The complete package inventory and original image digest are included.

  2. Download the pinned base model into the Hugging Face cache:

    hf download nvidia/NVIDIA-Nemotron-3-Nano-4B-BF16 --revision dfaf35de3e30f1867dd8dbc38a7fc9fb52d3914f
    
  3. Provide fresh GPU thermal telemetry at thermal/status.json, with ISO-8601 UTC timestamp and numeric max_temperature_c. The included thermal helper uses pause at 87°C and resume below 80°C. Keep your host safety guard active.

  4. From the dataset snapshot directory, run the actual frozen training pipeline:

    CUBLAS_WORKSPACE_CONFIG=:4096:8 python code/training/run_citation_student_pipeline.py \
      --data reproduction/train-candidates.jsonl.gz \
      --common-fit reproduction/common-fit.json \
      --model-key nemotron --output reproduced-run \
      --thermal-status thermal/status.json \
      --deterministic --allow-nonbitwise-trajectory
    

The pipeline qualifies optimizer updates and state restoration, then trains the admitted cohort. reproduction/encoded-manifest.jsonl records every original token sequence fingerprint for tokenization checks. Final checkpoint code hashes match the supplied training helpers byte-for-byte.

Numerical reproducibility: the recorded qualification restored parameters, buffers, optimizer, RNG, input encoding and data position exactly. Subsequent GPU-kernel trajectories varied in matched runs; the measured evidence and qualification receipt are included. The published model's checkpoint/export/ reload equality is separately documented. The data, recipe, token fingerprints and evaluation scores provide explicit checks for replication.

License and source attribution

Federal source text comes from U.S. government publications identified by the preserved source IDs. The dataset compilation, annotations and reproduction utilities are released under Apache-2.0, following the project's dataset-release convention. See LICENSE. The model weights retain their own license in the linked model repository. API response envelopes are reduced to scoring-relevant usage fields; complete generated answers and failure outcomes are preserved.

Downloads last month
82

Models trained or fine-tuned on thurstonpowers/citation-extractor-fast