HarmBench
by Center for AI Safety & collaborators
What is HarmBench? HarmBench is a safety & factuality eval made by Center for AI Safety & collaborators. A standard framework for red-teaming: it tests how easily attacks can make a model produce harmful content and how well defences hold.
Editor note
A standard framework for red-teaming: it tests how easily attacks can make a model produce harmful content and how well defences hold.
- What it tests
- Robustness to jailbreaks and harmful requests.
- Original source
- www.harmbench.org/
- Last updated
- Not checked yet
- License
- Not checked yet — see source
When to use HarmBench
- You are comparing automated red-teaming attacks, or testing how well a model and its defences refuse harmful requests, in one standard setup.
- You want results comparable with a large baseline: the paper compares 18 red-teaming methods against 33 target LLMs and defences.
Limitations
- Running the full pipeline is compute-heavy; the example commands use a Slurm cluster.
- It measures refusal of harmful behaviour, not over-refusal of safe requests; pair it with a test such as XSTest.
How to run it
- Clone the repository and install requirements.
- Run the pipeline for chosen attack methods and target models.
git clone https://github.com/centerforaisafety/HarmBench.git
pip install -r requirements.txt
python ./scripts/run_pipeline.py --methods GCG --models all --step all --mode slurmNotable results
- The paper also introduces an adversarial training method that it reports improves LLM resistance across a wide range of attacks. [Paper (arXiv)]
Sources
Compare HarmBench
Related safety & factuality evals
- TruthfulQA — Truthfulness versus imitating human misconceptions.
- StrongREJECT — Real effectiveness of jailbreak attacks.
- SimpleQA — Short-form factuality and calibration.
- XSTest — Over-refusal (exaggerated safety).
Discussion
No one has discussed HarmBench yet. Have you run it? Share what it caught, what it missed or how you set it up.