Arguments

The CLI follows a simple pattern: specify the task(s) to run, followed by configuration options.

Basic Usage
python -m wisent_guard tasks <task_name> [OPTIONS]

Quick Start Commands

Steering Mode (HellaSwag)
python -m wisent_guard tasks hellaswag --model meta-llama/Llama-3.1-8B-Instruct --layer 15 --limit 5 --steering-mode --steering-strength 1.0 --verbose
Classification Mode (MMLU)
python -m wisent_guard tasks mmlu --model meta-llama/Llama-3.1-8B-Instruct --layer 15 --limit 10 --classifier-type logistic --verbose

Core Arguments

Required Arguments

ArgumentDescriptionExample
commandCommand to run (always `tasks`)tasks
task_namesTask name(s) or file pathmmlu, hellaswag

Basic Configuration

ArgumentTypeDefault StateDescription
--modelstrmeta-llama/Llama-3.1-8B-InstructModel name or path
--layerstr15Layer(s) to extract activations from
--shotsint0Number of few-shot examples
--limitintNoneLimit number of documents per task
--seedint42Random seed for reproducibility
--devicestrNoneDevice to run on (auto-detected if None)
--verboseflagFalseEnable verbose logging

Classification Mode

Classification mode trains classifiers to detect harmful/incorrect content in model activations.

Classifier Configuration

ArgumentTypeDefault StateDescription
--classifier-typestrlogisticType of classifier (logistic, mlp)
--detection-thresholdfloat0.6Classification threshold (higher = stricter)

Examples

Basic Classification
python -m wisent_guard tasks mmlu --model meta-llama/Llama-3.1-8B-Instruct --layer 15 --limit 10 --classifier-type logistic
Advanced Steering Configuration
python -m wisent_guard tasks hellaswag --model meta-llama/Llama-3.1-8B-Instruct --layer 15 --steering-mode --steering-strength 1.5 --steering-method caa
Multi-task Evaluation
python -m wisent_guard tasks mmlu,hellaswag,truthfulqa --model meta-llama/Llama-3.1-8B-Instruct --layer 15 --limit 5 --verbose

Stay in the loop. Never miss out.

Subscribe to our newsletter and unlock Wisent insights.