Add eval.yaml to register CWE-Bench as a Hub benchmark

#4
by SaylorTwift HF Staff - opened

Hi Collinear team, thanks for open-sourcing CWE-Bench!

This PR adds an eval.yaml at the repo root, which registers CWE-Bench as a benchmark on the Hub:

  • one task, resolve_rate: the share of tasks where the verifier finds every exploit closed and every legitimate case working (binary reward per task, as described in the README)
  • scores reported as percentages (0-100), higher is better
  • config: default, split: test, the same as other Harbor-native benchmarks like Terminal-Bench 2.0

It also adds a registry.json listing the 100 tasks as the cwe-bench@1.0 dataset (mean reward), so Harbor can run the benchmark straight from this repo, with no clone or registry needed:

harbor run --repo "https://huggingface.co/datasets/collinear-ai/cwe-bench" -d cwe-bench@1.0 \
  -a <agent> -m <model> --env docker

Without -d, Harbor already falls back to the tasks/ folder. The registry gives the dataset a name and a version to pin. Since the repo is gated, git needs an HF token that can read gated repos.

Please edit the wording however you like. If you also report another metric (for example cost per run), we can add it as a second task.

Once this is merged, we'll add the dataset to the benchmark allow-list. CWE-Bench then gets the "Benchmark" tag, and scores published in model repos (.eval_results/*.yaml) will show up as a leaderboard on this page and on each model's page. You keep control, including hiding results you dispute.

Docs: Eval results / Registering a Benchmark · Leaderboard data guide

Thanks!
Nathan (HF @SaylorTwift )

Collinear AI org

Thanks Nathan, this is great! We pushed a few small changes on top:

  • resolve_rate is defined over 4 rollouts per task: the mean reward over all 400 trials (each task's pass rate averaged over 4 attempts). The README run command now uses -k 4 to match.
  • The dataset version is now cwe-bench@2.0. This is CWE-bench 2, our first open-source release, so we're starting the public set at 2.0 to avoid confusion with earlier internal versions.
  • The name is styled "CWE-bench".

Merging now. Please go ahead and add it to the benchmark allow-list.

chalo2000 changed pull request status to merged

Sign up or log in to comment