evaluate gated 0 0

Tomk187/LongHarmBench

published by @Tomk187

Alignment dataset tracked in the /datasets sub-catalog.

Lifetime downloads
40
Last 30 days
12
Likes
-
Size
274.0 MB
Created on HF
2026-07-01
Age
3 months ago

Description

LongHarmBench

LongHarmBench is a benchmark for evaluating whether ultra long-context language models maintain safety constraints when harmful instructions are embedded inside long, otherwise benign contexts. It uses generated benign haystacks and pairs them with 80 established HarmBench behaviors. For each HarmBench behavior, topical keywords are derived from the behavior description and used to iteratively generate semantically related but benign educational, descriptive, or… See the full description on the dataset page: https://huggingface.co/datasets/Tomk187/LongHarmBench.

Tags

task_categories:text-generationlanguage:enlicense:mitsize_categories:n<1Kformat:jsonmodality:tabularmodality:textlibrary:datasetslibrary:pandaslibrary:polarslibrary:mlcroissantregion:ustextbenchmarksafetyred-teaminglong-contextharmful-instructions

README current version from Hugging Face


license: mit
pretty_name: LongHarmBench
language:

  • en
    task_categories:
  • text-generation
    tags:
  • text
  • benchmark
  • safety
  • red-teaming
  • long-context
  • harmful-instructions
    gated: true
    extra_gated_prompt: "LongHarmBench contains harmful instruction prompts embedded in long contexts. Access is intended for safety research, red-team evaluation, and defensive analysis only."
    extra_gated_fields:
    Safety acknowledgment: checkbox
    Research use agreement: checkbox
    configs:
  • config_name: default
    default: true
    data_files:
    • split: test
      path: cases.jsonl

LongHarmBench

LongHarmBench is a benchmark for evaluating whether ultra long-context language models maintain safety constraints when harmful instructions are embedded inside long, otherwise benign contexts. It uses generated benign haystacks and pairs them with 80 established HarmBench behaviors. For each HarmBench behavior, topical keywords are derived from the behavior description and used to iteratively generate semantically related but benign educational, descriptive, or background-style passages with meta-llama/Meta-Llama-3.1-8B-Instruct. Generation continues until the selected target length is reached. The resulting contexts are stored as static files under haystacks/. The harmful instruction is stored separately in prompt_prefix and inserted only during prompt reconstruction. For each behavior, LongHarmBench includes one context for each length interval: short from 0 to 32K words, medium from 32K to 128K words, and long from 128K to 1M words. Each behavior and length variant is evaluated with the harmful instruction placed at the front, middle, or end of the context. This yields 720 total evaluation samples: 80 behaviors x 3 context lengths x 3 payload placements.

Safety Warning

This dataset contains harmful, unsafe, offensive, and policy-violating instructions. It is intended only for controlled safety research, red-team evaluation, robustness analysis, and defensive benchmarking of language models.

Do not use this dataset to generate, optimize, deploy, or facilitate harmful behavior. Users should evaluate models in controlled environments, apply appropriate safety filters, comply with applicable laws and institutional review requirements, and avoid publishing model outputs that provide actionable harmful guidance.

README history 5 revisions

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.

  1. 2026-07-02Add sharded case filesbf1a7082.3 KB
    Loading...
  2. 2026-07-02Add benchmark casesf827a682.3 KB
    Loading...
  3. 2026-07-02Add dataset card5e775212.3 KB
    Loading...
  4. 2026-07-02Initial release9c614f121 B
    Loading...
  5. 2026-07-01initial commit8b67e3421 B
    Loading...

Used by abliterated 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.

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, license clarifications. Click any thread to expand and read the full conversation inline. Newest first.

  1. 2026-07-03[bot] Conversion to Parquetopen1 💬#1
    Loading...

Related datasets same stage · evaluate

Read further

Metadata

License
mit

Repository

Download the dataset

Gated dataset. You need to accept the author's terms on Hugging Face before downloading. Visit the repository, click Agree and access repository, then log in locally with huggingface-cli login and use one of the snippets below.

Copy any of these snippets into your notebook or terminal. All three fetch directly from Hugging Face using your own credentials.

Recommended: datasets library (Python)
from datasets import load_dataset
ds = load_dataset("Tomk187/LongHarmBench")
Raw snapshot (Python)
from huggingface_hub import snapshot_download
snapshot_download(repo_id="Tomk187/LongHarmBench", repo_type="dataset")
git clone (requires git-lfs)
git clone https://huggingface.co/datasets/Tomk187/LongHarmBench
Catalog is the map. Apps are the tools.

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

Every model page has an "Open in Abliteration" button that hands the model directly to the first-party desktop client, at the quantization your rig can actually run. No API keys, no subscription, no prompt leakage.

Open in Abliteration