abliteration.org
Get the app

Two ways to read this site

Technical mode is the default: exact terms and codes, for engineers, researchers, journalists and companies. Simple mode gives the same facts in plain words, for anyone who wants a model that runs on their own computer. You can switch at any time at the top of the page.

technical
MLX weights for Apple silicon (M1 or later), usually quantized to 4 or 8 bits.
simple
Made for Macs with Apple silicon (M1 or newer), usually compressed to 4 or 8 bits.

marvintong/legal-llm-benchmark

published by @marvintong

Safety benchmarks, over-refusal tests, and guard-model data.Safety tests and tests for refusing harmless requests.

task_categories:text-generationtask_categories:question-answeringtask_categories:text-classificationlanguage:enlicense:mitsize_categories:1K<n<10Kformat:jsonmodality:tabular +11 more
Lifetime downloads
3.8K
Last 30 days
596
Likes
2
Size
37.4 MB

Description

Legal LLM Benchmark Dataset

Safety-Utility Trade-offs in Legal AI: An LLM Evaluation Across 12 Models

Quick Start

from datasets import load_dataset

# Core datasets

questions = load_dataset("marvintong/legal-llm-benchmark", "questions")

phase1_evals = load_dataset("marvintong/legal-llm-benchmark", "phase1_evaluations")

phase3_evals = load_dataset("marvintong/legal-llm-benchmark", "phase3_evaluations")

# Additional helpful datasets

contracts =… See the full description on the dataset page: https://huggingface.co/datasets/marvintong/legal-llm-benchmark.

Structure 8 configs · from the README front matter8 subsets, from the author's description

questions
Data files
all_questions_flat.jsonl
phase1_evaluations
Data files
phase1_flat.jsonl
phase3_evaluations
Data files
phase3_flat.jsonl
phase2_contracts
Data files
phase2_contracts.jsonl
practice_areas
Data files
practice_areas.jsonl
detailed_evaluations
Data files
detailed_evaluations.jsonl
best_vs_worst
Data files
best_vs_worst.jsonl
refusal_analysis
Data files
phase3_refusal_analysis.jsonl

Used by uncensored models none yet

No abliterated models in our catalog have declared this dataset in their YAML metadata yet. This can mean the dataset is used but not declared, is used outside abliteration workflows, or is new. The link will populate automatically as models are indexed.No model in our catalog lists this dataset yet. It may be used without being listed, used for other work, or simply be new. The list fills in by itself as models are added.

MetadataDetails

License
mit
Language
en
Created on HFCreated
2025-11-12 · 1 years ago
Size category
1K<n<10K
ModalitiesData types
tabulartext
Formats
json
LibrariesTools
datasetspandasmlcroissantpolars

Related datasets same stage · Evaluatesame step · Testing

Read further

Total size
37.4 MB
Files
25
Formats
json, jsonl
Head
78c53f6
Last updated on HFLast updated
2025-11-12

Download the dataset

Copy any of these snippets into your notebook or terminal. All three fetch directly from Hugging Face using your own credentials.Each of these lines of code downloads the dataset straight from Hugging Face, with your own Hugging Face login.

Recommended: datasets library (Python)
from datasets import load_dataset
ds = load_dataset("marvintong/legal-llm-benchmark")
Raw snapshot (Python)All files (Python)
from huggingface_hub import snapshot_download
snapshot_download(repo_id="marvintong/legal-llm-benchmark", repo_type="dataset")
git clone (requires git-lfs)With git (needs git-lfs)
git clone https://huggingface.co/datasets/marvintong/legal-llm-benchmark

Files by folder from our last crawlfrom our last check

top level 25 files 37.4 MB
.gitattributes 2.5 KB file download
1_questions_phase1.json 64.0 KB json download
1_questions_phase2.json 7.0 KB json download
1_questions_phase3.json 13.3 KB json download
2_responses_phase1.json 5.1 MB json download
2_responses_phase2.json 3.7 MB json download
2_responses_phase3.json 783.8 KB json download
3_evaluations_phase1.json 6.1 MB json download
3_evaluations_phase2.json 3.7 MB json download
3_evaluations_phase3.json 866.7 KB json download
all_questions_flat.jsonl 53.7 KB jsonl download
best_vs_worst.jsonl 166.7 KB jsonl download
detailed_evaluations.jsonl 878.1 KB jsonl download
falsereject_benchmark_results.json 783.8 KB json download
legal_questions.json 62.0 KB json download
phase1_benchmark_results.json 4.1 MB json download
phase1_flat.jsonl 5.3 MB jsonl download
phase2_benchmark_results.json 3.3 MB json download
phase2_contract_tasks.json 1.6 MB json download
phase2_contracts.jsonl 20.0 KB jsonl download
phase3_flat.jsonl 805.7 KB jsonl download
phase3_refusal_analysis.jsonl 13.3 KB jsonl download
practice_area_mapping.json 2.3 KB json download
practice_areas.jsonl 8.8 KB jsonl download
README.md 8.7 KB md download

READMEAuthor's description current version from Hugging Faceas it is now on Hugging Face

Legal LLM Benchmark Dataset

Safety-Utility Trade-offs in Legal AI: An LLM Evaluation Across 12 Models

Dataset on HF

Quick Start

from datasets import load_dataset

# Core datasets
questions = load_dataset("marvintong/legal-llm-benchmark", "questions")
phase1_evals = load_dataset("marvintong/legal-llm-benchmark", "phase1_evaluations")
phase3_evals = load_dataset("marvintong/legal-llm-benchmark", "phase3_evaluations")

# Additional helpful datasets
contracts = load_dataset("marvintong/legal-llm-benchmark", "phase2_contracts")
practice_areas = load_dataset("marvintong/legal-llm-benchmark", "practice_areas")
detailed_evals = load_dataset("marvintong/legal-llm-benchmark", "detailed_evaluations")
best_vs_worst = load_dataset("marvintong/legal-llm-benchmark", "best_vs_worst")
refusal_analysis = load_dataset("marvintong/legal-llm-benchmark", "refusal_analysis")

Dataset Description

This benchmark evaluates 12 Large Language Models across 163 legal tasks to measure the critical safety-utility tradeoff in production AI systems.

Key Findings

  • Safety Paradox: Safety-trained models achieve 87% higher quality (8.5 vs 4.6/10) but 58% higher refusal rates
  • Catastrophic Over-Refusal: 2 widely-used models refuse 87-96% of legitimate legal questions
    • GPT-OSS-120B: 95.8% false positive rate
    • O3-Mini: 87.5% false positive rate
  • Human Validation: Cohen's κ=0.91 [95% CI: 0.84, 0.98]
  • Statistical Rigor: ANOVA F=142.3, η²=0.93; Spearman ρ=0.82; 5 robustness checks

Dataset Configs

Core Evaluation Datasets

Config Rows Description
questions 124 All Phase 1 + Phase 3 questions (legal Q&A + FalseReject)
phase1_evaluations 1,200 12 models × 100 Q&A with quality scores ⭐
phase3_evaluations 240 10 models × 24 FalseReject with refusal labels 🚨

Additional Helpful Datasets

Config Rows Description
phase2_contracts 40 Contract analysis tasks with embedded contract text (35 real contracts) 📄
practice_areas 77 Legal practice area taxonomy (10 major categories) 📚
detailed_evaluations 1,000 Detailed evaluation reasoning for Phase 1 responses 📊
best_vs_worst 100 Best vs worst response comparisons per question 🏆
refusal_analysis 24 Question-level refusal statistics across models 🚨

Use Cases

For Researchers

1. Test Your Own Model

# Get questions only
questions = load_dataset("marvintong/legal-llm-benchmark", "questions")
for q in questions['train']:
    response = your_model.generate(q['question'])
    # Evaluate against our rubric

2. Analyze Contract Understanding

# Get contracts with tasks
contracts = load_dataset("marvintong/legal-llm-benchmark", "phase2_contracts")
for contract in contracts['train']:
    print(f"Task: {contract['task_title']}")
    print(f"Contract length: {contract['contract_length']} chars")
    # Test document-grounded reasoning

3. Study Safety Calibration

# Analyze refusal patterns
refusals = load_dataset("marvintong/legal-llm-benchmark", "refusal_analysis")
for row in refusals['train']:
    print(f"Question: {row['question'][:100]}...")
    print(f"Refusal rate: {row['refusal_rate']}%")
    print(f"Models refusing: {row['models_refusing']}")

For Educators

4. Best vs Worst Examples

# Show students quality differences
comparisons = load_dataset("marvintong/legal-llm-benchmark", "best_vs_worst")
for comp in comparisons['train'][:5]:
    print(f"\nQuestion: {comp['question']}")
    print(f"Best ({comp['best_model']}): {comp['best_score']}/10")
    print(f"Worst ({comp['worst_model']}): {comp['worst_score']}/10")
    print(f"Gap: {comp['score_gap']}")

5. Understand Legal Practice Areas

# Explore legal domain coverage
areas = load_dataset("marvintong/legal-llm-benchmark", "practice_areas")
for area in areas['train']:
    print(f"{area['major_category']} → {area['subcategory']}")
# Output: 77 distinct legal practice areas across 10 categories

Data Fields

Core Datasets

questions Config

  • id, question, category, difficulty, expected_behavior, phase

phase1_evaluations and phase3_evaluations Configs

  • question_id, question, category, model
  • response (full text)
  • score (0-10), appropriateness_score, actionability_score
  • is_refusal (bool), refusal_type, contains_harmful

Additional Datasets

phase2_contracts Config (40 rows)

  • task_id, contract_id, task_type, task_title
  • instruction (what to do)
  • contract_text (full contract document text)
  • contract_length (character count)
  • evaluation_criteria (rubric items)

practice_areas Config (77 rows)

  • major_category (e.g., "Corporate & Business Law")
  • subcategory (e.g., "contract_drafting")
  • category_id (unique identifier)

detailed_evaluations Config (1,000 rows)

  • question_index, model
  • appropriateness_score, appropriateness_reasoning
  • actionability_score, actionability_reasoning
  • refusal_type, has_specific_steps, has_concrete_examples

best_vs_worst Config (100 rows)

  • question_id, question, category
  • best_model, best_score, best_response
  • worst_model, worst_score, worst_response
  • has_refusal_example, refusal_model, refusal_response
  • score_gap (difference between best and worst)

refusal_analysis Config (24 rows)

  • question_id, question
  • total_models, refusals_count, answers_count
  • refusal_rate (%)
  • models_refusing (comma-separated list)
  • models_answering (comma-separated list)

Example: Detailed Evaluation Reasoning

from datasets import load_dataset

# Load detailed evaluations with reasoning
detailed = load_dataset("marvintong/legal-llm-benchmark", "detailed_evaluations")

# Find GPT-5's evaluation for question 0
gpt5_eval = [r for r in detailed['train'] if r['model'] == 'openai/gpt-5' and r['question_index'] == 0][0]

print(f"Appropriateness Score: {gpt5_eval['appropriateness_score']}/10")
print(f"Reasoning: {gpt5_eval['appropriateness_reasoning']}")
print(f"\nActionability Score: {gpt5_eval['actionability_score']}/10")
print(f"Reasoning: {gpt5_eval['actionability_reasoning']}")

Models Evaluated

Safety-Trained Models (10)

  1. openai/gpt-5 - Top performer: 9.17/10 quality, 0% false refusal ✅
  2. anthropic/claude-sonnet-4.5
  3. deepseek/deepseek-chat
  4. zhipuai/glm-4-plus - Best balance: 8.2/10 quality, 62.5% non-refusal
  5. qwen/qwen-2.5-72b-instruct - 0% false refusal ✅
  6. openai/gpt-4o
  7. meta-llama/llama-3.3-70b-instruct
  8. google/gemini-pro-1.5
  9. openai/o3-mini - Catastrophic over-refusal: 87.5% false positive ❌
  10. openrouter/auto (GPT-OSS-120B) - Worst over-refusal: 95.8% false positive ❌

Ablated Models (2)

  1. Mistral-7B-Instruct-abliterated
  2. Qwen2.5-7B-Instruct-abliterated

Paper & Citation

Full Paper: GitHub Repository

@article{legal-llm-safety-2025,
  title={Safety-Utility Trade-offs in Legal AI: An LLM Evaluation Across 12 Models},
  author={[Your Name]},
  journal={arXiv preprint arXiv:2501.XXXXX},
  year={2025},
  url={https://github.com/marvintong/legal-llm-benchmark},
  dataset={https://huggingface.co/datasets/marvintong/legal-llm-benchmark}
}

License

MIT

Contact

README historyEdit history latest 20 of 32 revisionslatest 20 of 32 edits

Every night we snapshot the README of every dataset in the catalog. When the SHA changes we archive the new version and diff it against the last. This is the evolving thought record of the alignment-data field: what the author decided to say about the corpus, and how that framing shifted over time.Every night we save the author's description of every dataset in the catalog. When it changes, we keep the new text and compare it with the one before. This shows what each author chose to say about their dataset, and how that changed over time.

  1. 2025-11-12 Upload README.md with huggingface_hub 78c53f6 8.5 KB
    Loading...
  2. 2025-11-12 Upload phase3_refusal_analysis.jsonl with huggingface_hub b44128c 8.1 KB
    Loading...
  3. 2025-11-12 Upload best_vs_worst.jsonl with huggingface_hub 3594028 8.1 KB
    Loading...
  4. 2025-11-12 Upload detailed_evaluations.jsonl with huggingface_hub 750af01 8.1 KB
    Loading...
  5. 2025-11-12 Upload practice_areas.jsonl with huggingface_hub e3a34b6 8.1 KB
    Loading...
  6. 2025-11-12 Upload phase2_contracts.jsonl with huggingface_hub 7b8b7bd 8.1 KB
    Loading...
  7. 2025-11-12 Upload README.md with huggingface_hub 5ff7d28 8.1 KB
    Loading...
  8. 2025-11-12 Upload phase3_flat.jsonl with huggingface_hub e038086 13.4 KB
    Loading...
  9. 2025-11-12 Upload phase1_flat.jsonl with huggingface_hub fef5afa 13.4 KB
    Loading...
  10. 2025-11-12 Upload all_questions_flat.jsonl with huggingface_hub cd3b705 13.4 KB
    Loading...
  11. 2025-11-12 Upload README.md with huggingface_hub 8f14d5b 13.4 KB
    Loading...
  12. 2025-11-12 Delete legal-llm-benchmark.py with huggingface_hub 7edb722 13.3 KB
    Loading...
  13. 2025-11-12 Upload legal-llm-benchmark.py with huggingface_hub 5694eb4 13.3 KB
    Loading...
  14. 2025-11-12 Upload README.md with huggingface_hub 9f99bfe 13.3 KB
    Loading...
  15. 2025-11-12 Upload 3_evaluations_phase3.json with huggingface_hub 56e6d91 7 KB
    Loading...
  16. 2025-11-12 Upload 3_evaluations_phase2.json with huggingface_hub 91ca9b2 7 KB
    Loading...
  17. 2025-11-12 Upload 3_evaluations_phase1.json with huggingface_hub 048f0b5 7 KB
    Loading...
  18. 2025-11-12 Upload 2_responses_phase3.json with huggingface_hub 51ad050 7 KB
    Loading...
  19. 2025-11-12 Upload 2_responses_phase2.json with huggingface_hub ba2050f 7 KB
    Loading...
  20. 2025-11-12 Upload 2_responses_phase1.json with huggingface_hub 4484763 7 KB
    Loading...

Community discussions 1 thread · 1 open · 1 comments

Threads posted by the community on Hugging Face: bug reports, questions about usage, pull requests on the README, licence clarifications. Click any thread to expand and read the full conversation inline. Newest first.Conversations people started on Hugging Face: bug reports, questions about using the data, suggested changes to the author's description, questions about the licence. Open a thread to read it here. Newest first.

  1. 2025-11-13 [bot] Conversion to Parquet open 1 💬 #1
    Loading...
Download from Hugging Face

marvintong/legal-llm-benchmark

Catalog is the map. Apps are the tools.

Run models on your own machine, not in the cloud.

Every GGUF model page has an "Open in Abliteration" button that lets you pick a file, then opens it in the desktop app. No API keys, no subscription, no prompt leakage.Each model page in the format the app uses has an "Open in Abliteration" button to open a file in the desktop app. No API keys, no subscription, your requests stay on your computer.

Open in Abliteration