axbench

Run the AxBench concept steering and detection benchmark against a subject model. Reproduces the published AxBench protocol (a steering-factor sweep over Alpaca-Eval instructions with judge-scored ratings) and reports either steering quality or concept-detection metrics.

Basic Usage
python -m wisent axbench --model MODEL --axbench-action {steer,detect} --output FILE [OPTIONS]

Examples

Steer a single concept
python -m wisent axbench   --model google/gemma-2-2b   --axbench-action steer   --concept-id 42   --judge-model openai:gpt-4o-mini   --output ./axbench_steer.json
Concept detection over the variant
python -m wisent axbench   --model google/gemma-2-2b   --axbench-action detect   --all-concepts --max-concepts 50   --output ./axbench_detect.json

Arguments

Required

ArgumentDescription
--modelSubject model to steer/probe (HuggingFace id)
--axbench-actionsteer: judge-scored steering protocol; detect: AUROC/F1 concept detection
--outputOutput JSON file for the summary

Dataset & Concepts

ArgumentDefaultDescription
--variantconcept500AxBench dataset variant (concept500, concept16k, concept16k_v2)
--concept-set2b/l10Concept set by GemmaScope subject model/layer
--concept-id(none)Run a single concept by id
--all-conceptsoffRun every concept in the variant
--max-conceptsallCap the concept count with --all-concepts
--layermidpoint1-indexed layer for extraction/steering

Steering & Judge

ArgumentDefaultDescription
--methodcaaWisent steering method (caa = AxBench DiffMean baseline)
--factors14 referenceComma-separated steering factors
--judge-model(none)Judge for steer: openai:gpt-4o-mini or a local HF model id
--judge-batch-size16Concurrent judge requests / local judge batch

Additional protocol knobs (--n-instructions, --seed, --max-new-tokens, --temperature, --use-hard-negatives, --pair-limit, --judge-max-new-tokens, --judge-temperature, --imbalanced-negatives, --work-dir, --device) default to the AxBench reference values; run wisent axbench --help for the full list.

Related Commands

Stay in the loop. Never miss out.

Subscribe to our newsletter and unlock Wisent insights.