geometry-search

Search for optimal steering geometry by systematically exploring combinations of layers, extraction strategies, and benchmarks. This command helps identify the best configuration for creating effective steering vectors.

Basic Usage
python -m wisent geometry-search --model MODEL [OPTIONS]

Examples

Basic Geometry Search
python -m wisent geometry-search \
  --model meta-llama/Llama-3.1-8B-Instruct \
  --output ./geometry_results.json
Specific Benchmarks
python -m wisent geometry-search \
  --model meta-llama/Llama-3.1-8B-Instruct \
  --benchmarks arc_easy,hellaswag,truthfulqa_mc1 \
  --pairs-per-benchmark 100 \
  --output ./benchmark_geometry.json
Specific Strategies
python -m wisent geometry-search \
  --model meta-llama/Llama-3.1-8B-Instruct \
  --strategies chat_last,chat_mean,chat_max_norm \
  --max-layer-combo-size 2 \
  --output ./strategy_geometry.json
Full Search with Caching
python -m wisent geometry-search \
  --model meta-llama/Llama-3.1-8B-Instruct \
  --max-layer-combo-size 3 \
  --pairs-per-benchmark 50 \
  --cache-dir ./geometry_cache/ \
  --seed 42 \
  --output ./full_geometry.json
Benchmarks from File
python -m wisent geometry-search \
  --model meta-llama/Llama-3.1-8B-Instruct \
  --benchmarks ./my_benchmarks.txt \
  --output ./custom_geometry.json

Arguments

ArgumentDefaultDescription
--modelrequiredModel name or path
--outputgeometry_results.jsonOutput path for results JSON
--pairs-per-benchmark50Number of pairs to sample per benchmark
--max-layer-combo-size3Maximum layers in combination (1=individual, 2=pairs, 3=triplets)
--strategiesall (7)Comma-separated list of extraction strategies
--benchmarksallComma-separated benchmarks or path to .txt file
--cache-dir/tmp/wisent_geometry_cacheDirectory for activation cache
--seed42Random seed for reproducibility
--deviceautoDevice for model (auto/cuda/mps/cpu)

Output

The search produces a JSON file containing:

  • Best layer combinations for each benchmark
  • Optimal extraction strategies
  • Linearity scores for each configuration
  • Recommendations for steering vector generation

Related Commands

Stay in the loop. Never miss out.

Subscribe to our newsletter and unlock Wisent insights.