Views
No views yet
pip install rotalabs-steer1from huggingface_hub import hf_hub_download
2from rotalabs_steer import SteeringVector, ActivationInjector
3
4# Download a vector
5vector_path = hf_hub_download(
6 repo_id="rotalabs/steering-vectors",
7 filename="refusal_qwen3_8b/layer_15.pt",
8)
9metadata_path = hf_hub_download(
10 repo_id="rotalabs/steering-vectors",
11 filename="refusal_qwen3_8b/layer_15.json",
12)
13
14# Load and use
15vector = SteeringVector.load(vector_path.replace('.pt', ''))
16
17# Apply to model
18injector = ActivationInjector(model, [vector], strength=1.0)
19with injector:
20 outputs = model.generate(**inputs)| Behavior | Model | Layers | Description |
|---|---|---|---|
refusal | Qwen3-8B | 14-18 | Refuse harmful requests |
refusal | Mistral-7B-Instruct-v0.2 | 14-18 | Refuse harmful requests |
refusal | Gemma-2-9B-IT | 14-18 | Refuse harmful requests |
hierarchy | Qwen3-8B | 12-22 | Follow system over user instructions |
hierarchy | Mistral-7B-Instruct-v0.2 | multiple | Follow system over user instructions |
tool_restraint | Mistral-7B-Instruct-v0.2 | multiple | Avoid unnecessary tool use |
uncertainty | Mistral-7B-Instruct-v0.2 | multiple | Express calibrated uncertainty |
refusal_qwen3_8b/
├── metadata.json # Set metadata
├── layer_14.json # Layer 14 vector metadata
├── layer_14.pt # Layer 14 vector tensor
├── layer_15.json
├── layer_15.pt
└── ...