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.

traberph/advbench-alpaca-contrastive

published by @traberph

Harmful and harmless prompt sets, contrastive pairs, and jailbreak and attack corpora.Sets of harmful and harmless requests, pairs of opposite examples, and attack datasets.

task_categories:text-classificationtask_categories:feature-extractiontask_categories:token-classificationsource_datasets:walledai/AdvBenchsource_datasets:tatsu-lab/alpacalanguage:enlicense:cc-by-nc-4.0size_categories:1K<n<10K +14 more
Lifetime downloads
105
Last 30 days
30
Likes
-
Size
394.4 MB

Description

AdvBench–Alpaca Contrastive Dataset

A balanced, contrastive set of 520 harmful and 520 harmless user prompts.

Each prompt comes with the hidden states of

Qwen/Qwen3-4B-Instruct-2507

for the last prompt token at every layer.

The dataset was built for an AI-safety course project at the University of Tübingen.

It is used to train linear probes that detect harmful intent in the residual stream,

and to build harmfulness steering vectors.

Code: traberph/aisa-miniprojects/03… See the full description on the dataset page: https://huggingface.co/datasets/traberph/advbench-alpaca-contrastive.

Structure 1 config · from the README front matter1 subset, from the author's description

default default 1,040 rows
SplitPartRowsSize
train 1,040 394.3 MB
FeaturesFields
promptstring harmfulbool layers_last_tokenlist<struct>
Data files
train data/train-*

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
cc-by-nc-4.0
Language
en
Created on HFCreated
2026-06-02 · 6 months ago
Size category
1K<n<10K
ModalitiesData types
text
Formats
parquet
LibrariesTools
datasetspandaspolarsmlcroissant
ArXivPaper

Related datasets same stage · Extractsame step · Finding refusals

Read further

Total size
394.4 MB
Files
3
Formats
parquet
Head
ebf972d
Last updated on HFLast updated
2026-11-25

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("traberph/advbench-alpaca-contrastive")
Raw snapshot (Python)All files (Python)
from huggingface_hub import snapshot_download
snapshot_download(repo_id="traberph/advbench-alpaca-contrastive", repo_type="dataset")
git clone (requires git-lfs)With git (needs git-lfs)
git clone https://huggingface.co/datasets/traberph/advbench-alpaca-contrastive

Files by folder from our last crawlfrom our last check

top level 2 files 10.0 KB
.gitattributes 2.5 KB file download
README.md 7.5 KB md download
data/ 1 file 394.3 MB
train-00000-of-00001.parquet 394.3 MB parquet download

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

AdvBench–Alpaca Contrastive Dataset

A balanced, contrastive set of 520 harmful and 520 harmless user prompts.
Each prompt comes with the hidden states of
Qwen/Qwen3-4B-Instruct-2507
for the last prompt token at every layer
.

The dataset was built for an AI-safety course project at the University of Tübingen.
It is used to train linear probes that detect harmful intent in the residual stream,
and to build harmfulness steering vectors.

Content warning: the harmful half contains requests for dangerous, illegal and unethical content.

Dataset structure

One train split with 1,040 rows.

field type description
prompt string the user prompt
harmful bool True = from AdvBench, False = from Alpaca
layers_last_token float32[37][2560] hidden states of the last token. Index 0 is the embedding output, indices 1–36 are the outputs of the 36 transformer layers

How the activations were extracted

Each prompt was wrapped in the Qwen chat template with a generic system prompt and
the generation prompt appended:

tokenizer.apply_chat_template(
    [{"role": "system", "content": "You are a helpful assistant."},
     {"role": "user", "content": prompt}],
    add_generation_prompt=True, return_tensors="pt")

A single forward pass was run with output_hidden_states=True, and the vector at
the last token position was kept for every layer. Because the generation prompt is
appended, the "last token" is the end of the assistant header, which is where the
model decides how to answer. No sampling was involved.

Usage

import numpy as np
from datasets import load_dataset

ds = load_dataset("traberph/advbench-alpaca-contrastive", split="train")  # requires accepted access + HF token

X = np.array(ds["layers_last_token"], dtype=np.float32)  # (1040, 37, 2560), ~390 MB
y = np.array(ds["harmful"])

# e.g. a difference-of-means "harmfulness" direction at layer 18
layer = 18
direction = X[y, layer].mean(0) - X[~y, layer].mean(0)

If you only need the prompts, use ds.select_columns(["prompt", "harmful"]) to
skip decoding the activations.

Creation

  1. Load walledai/AdvBench (520 prompts) and tatsu-lab/alpaca (52k instructions).
  2. Shuffle both with seed 2 and take 520 rows from each, so all of AdvBench is used.
  3. Keep only the prompt text: Alpaca instruction is renamed to prompt, and Alpaca input/output and AdvBench target are dropped.
  4. Add the harmful label and concatenate the two sets. The rows are not shuffled afterwards, so the harmful rows come first.
  5. Add layers_last_token from Qwen3-4B-Instruct-2507 as described above.

Intended uses

  • Linear probing for harmfulness or refusal-related features
  • Computing contrastive or steering vectors (e.g. difference of means)
  • Teaching and small-scale interpretability experiments

Out of scope: commercial use (licence), training models to produce harmful
content, and use as a general harmfulness benchmark (see limitations).

Limitations and biases

  • Style confound: the two sources differ in more than harmfulness. AdvBench prompts
    are short imperative requests written in one style, while Alpaca instructions are
    generic GPT-3.5-generated tasks. A probe can partly separate the classes by source
    or style instead of by harmfulness.
  • Small and English-only. There are 520 prompts per class, with no held-out split. Create your own train/test split.
  • Single model and template. The activations are only valid for
    Qwen3-4B-Instruct-2507 with the system prompt above. Other models need re-extraction
    (see the notebook).
  • AdvBench contains many near-duplicate prompts.

Sources and licences

The dataset combines material from two sources with different licences:

rows source licence changes made
harmful == True (520) walledai/AdvBench, originally from llm-attacks (Zou et al., 2023) MIT shuffled (seed 2), only prompt kept, harmful label added, hidden states added
harmful == False (520) tatsu-lab/alpaca (Taori et al., 2023) CC BY-NC 4.0 shuffled (seed 2), 520 rows sampled, instruction renamed to prompt (input/output dropped), harmful label added, hidden states added

The hidden states were produced with Qwen3-4B-Instruct-2507, which is released under
Apache 2.0.

The dataset as a whole is released under CC BY-NC 4.0 (non-commercial use only),
because it contains Alpaca material. The AdvBench rows are still covered by
their original MIT licence. Its notice is reproduced below.

Alpaca was generated with OpenAI's text-davinci-003. Its authors state it is
intended for research use only.

Citation

If you use this dataset, please cite the two source datasets:

AdvBench (llm-attacks README):

@misc{zou2023universal,
      title={Universal and Transferable Adversarial Attacks on Aligned Language Models},
      author={Andy Zou and Zifan Wang and J. Zico Kolter and Matt Fredrikson},
      year={2023},
      eprint={2307.15043},
      archivePrefix={arXiv},
      primaryClass={cs.CL}
}

Alpaca (stanford_alpaca README):

@misc{alpaca,
  author = {Rohan Taori and Ishaan Gulrajani and Tianyi Zhang and Yann Dubois and Xuechen Li and Carlos Guestrin and Percy Liang and Tatsunori B. Hashimoto },
  title = {Stanford Alpaca: An Instruction-following LLaMA model},
  year = {2023},
  publisher = {GitHub},
  journal = {GitHub repository},
  howpublished = {\url{https://github.com/tatsu-lab/stanford_alpaca}},
}

README historyEdit history 8 revisions8 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. 2026-11-25 Update README.md ebf972d 7.3 KB
    Loading...
  2. 2026-06-02 Update README.md fcf08ee 842 B
    Loading...
  3. 2026-06-02 Update README.md 582aa68 513 B
    Loading...
  4. 2026-06-02 Upload dataset 7d6c1b1 374 B
    Loading...
  5. 2026-06-02 Upload dataset 2b1c234 370 B
    Loading...
  6. 2026-06-02 Upload dataset 9d7f200 302 B
    Loading...
  7. 2026-06-02 Upload dataset a5127c4 302 B
    Loading...
  8. 2026-06-02 initial commit c85c4c7 0 B
    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. 2026-06-03 [bot] Conversion to Parquet open 1 💬 #1
    Loading...
Download from Hugging Face

traberph/advbench-alpaca-contrastive

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