ablate 0 0 0

pandaman007/steered-persona-space

published by @pandaman007

Alignment dataset tracked in the /datasets sub-catalog.

Lifetime downloads
9.1K
Last 30 days
37
Likes
-
Size
539.6 MB
Created on HF
2026-05-18
Age
5 months ago

Description

Steered Persona Space

How activation steering reshapes a language model's character cloud.

We apply activation-steering hooks at the canonical mid-layer (N/2) of three open chat models and measure how the model's default-assistant point — its neutral self-identity — moves through a baseline-derived principal-component space of 275 character role-playing activations.

Each colored marker is a steered model's default-assistant point projected into the baseline model's PC1×PC2… See the full description on the dataset page: https://huggingface.co/datasets/pandaman007/steered-persona-space.

Tags

task_categories:feature-extractionlicense:apache-2.0size_categories:1K<n<10Kmodality:imageregion:usactivation-steeringpersona-vectorsinterpretabilitymechanistic-interpretabilityllamaqwen

README current version from Hugging Face


license: apache-2.0
task_categories:

  • feature-extraction
    tags:
  • activation-steering
  • persona-vectors
  • interpretability
  • mechanistic-interpretability
  • llama
  • qwen
    size_categories:
  • 1K<n<10K

Steered Persona Space

How activation steering reshapes a language model's character cloud.

We apply activation-steering hooks at the canonical mid-layer (N/2) of three open chat models and measure how the model's default-assistant point — its neutral self-identity — moves through a baseline-derived principal-component space of 275 character role-playing activations.

all-models default trajectory

Each colored marker is a steered model's default-assistant point projected into the baseline model's PC1×PC2 plane. Marker size scales with α (steering strength). Gray dots are the baseline role cloud for spatial context. The same neutral assistant prompt sends the model to systematically different places under different trait vectors, and barely moves under magnitude-matched random vectors.


Findings (3 bullets, each with its own figure)

1. Direction matters more than magnitude

trait vs control

At α=2 every trait vector shifts the persona cloud by ‖δ‖ ≈ 5–7 in 4096-dim residual space. random_unit_s42 — a Gaussian vector rescaled to match the trait vectors' norm — sits at the same ‖α·v‖ but moves the cloud only a fraction as much. Steering is direction-specific, not just magnitude-driven.

2. Different traits send the default in distinguishable directions

per-model trajectories

Evil, sycophantic, hallucinating, and humorous each carve a distinct path through PC1×PC2×PC3 as α grows. The trajectories aren't collinear — meaning the four "persona vectors" don't share one master "steering direction." See per-model PNGs in headline_figures/ for qwen7b and dolphin8b.

3. Clean dose-response within the coherent regime (α ≤ 2)

dose-response

Per-role ‖steered − α=0‖ grows monotonically with α for every (model, trait). At α=4 the model often falls off-manifold (incoherent degeneration) — see sample responses in responses_sample/ for qualitative confirmation. α=1–2 is the scientifically useful regime; α=4 is the manifold-edge stress test.


Experimental design

Axis Values
Models llama8b · qwen7b · dolphin8b
Traits evil · sycophantic · hallucinating · humorous
Controls random_unit_s42 · random_unit_s43 · random_unit_s44
α magnitudes [0.5, 1.0, 2.0, 4.0, 8.0] (plus α=0 baseline)
Roles × prompts × questions 276 · 5 · 16 = 22,080 generations per condition

Per condition we save: the 277 per-role activation means (role_vectors/{model}/{vector}/alpha_{a}/*.pt), the per-condition default-assistant activation (default.pt), and a representative response (doctor) in JSONL.

Currently in this release: 57 complete conditions (llama8b: 19, qwen7b: 19, dolphin8b: 19).


Folder map

Path What's inside
headline_figures/*.png 6 hero plots — start here
summary/default_positions.csv One row per (model, vector, α) — PC coords + along/perp decomposition
summary/displacement_table.csv Quantitative summary across all conditions
summary/cosine_matrix.csv Pairwise cosines between every steering vector
summary/trait_vector_stats.csv Per-model trait + control norms, hidden_dim, layer
configs/ models.py + steering_vectors.py + alphas.py from the source repo
steering_vectors/{model}/{name}.pt The 30 steering directions (12 trait + 18 control)
pca_basis/{model}_basis.pt Baseline-derived PC1/PC2/PC3 + role_mean per model
projections/{model}/{vector}/alpha_{a}.npz Each condition's roles projected into baseline PC1-3
role_vectors/{model}/{vector}/alpha_{a}/*.pt Per-role activations (276 + default), the "persona clouds"
responses_sample/{model}/{vector}/alpha_{a}/doctor.jsonl 1 role's 80 rollouts per condition for qualitative inspection

Deliberately excluded: the raw per-rollout activations (~280 GB) and the full responses corpus (~50 GB). Both are reproducible from steering_vectors/ + the source repo if you need them.


Load + use

# A. Load a steering vector
from huggingface_hub import hf_hub_download
import torch
p = hf_hub_download(repo_id="pandaman007/steered-persona-space", repo_type="dataset",
                    filename="steering_vectors/llama8b/evil.pt")
v_evil = torch.load(p, weights_only=False)["vector_at_canonical_layer"]   # (4096,)

# B. Load the PCA basis and project a custom activation
basis = torch.load(hf_hub_download("pandaman007/steered-persona-space", repo_type="dataset",
                                    filename="pca_basis/llama8b_basis.pt"), weights_only=False)
import numpy as np
P = np.stack([basis["pc1"], basis["pc2"], basis["pc3"]], axis=1)   # (4096, 3)
my_pc = (my_activation - basis["role_mean"]) @ P                    # (3,)

# C. Reproduce the hero figure from default_positions.csv
import pandas as pd, matplotlib.pyplot as plt
csv = hf_hub_download("pandaman007/steered-persona-space", repo_type="dataset",
                      filename="summary/default_positions.csv")
df = pd.read_csv(csv)
for (model, vec), g in df.groupby(["model", "vector"]):
    plt.plot(g["pc1"], g["pc2"], marker="o", label=f"{model}/{vec}")
plt.xlabel("PC1"); plt.ylabel("PC2"); plt.legend(fontsize=6); plt.show()

Caveats (read these)

These are real and worth understanding before drawing strong quantitative conclusions:

  1. Off-by-one layer. The persona-vectors paper builds v from hidden_states[L] (= output of model.model.layers[L-1]) and applies it back at the same layer. Our runner hooks model.model.layers[L] — one layer downstream of the build point. Empirically cos(h[L], h[L+1]) ≈ 0.88 for these traits, so the applied vector is ~88 % aligned with what was intended. Qualitative findings (direction-specificity, dose-response, trajectory separability) are robust; quantitative magnitudes are deflated ~12 % from the design intent.

  2. Extraction convention. Our per-role mean vectors are computed at the last token of the full (system, user, assistant) sequence. The prior project (and the upstream assistant_axis library) uses mean over assistant-turn tokens. We use the HF α=0 condition (same last-token convention) as the comparison baseline throughout, so within-pipeline deltas are clean. The shipped pca_basis/ was built on the prior convention — interpretable as "how does our steering displacement align with the variance directions of a related cloud" rather than "the natural PCs of our manifold."

  3. Controls. random_unit_* controls are Gaussian vectors rescaled to match the mean trait-vector norm — the magnitude-matched null direction. Three independent seeds (s42/s43/s44) per model for statistical robustness. partition_anchor_* vectors also exist in steering_vectors/ for the curious but were empirically uninformative for this experiment and are not featured in the headline analyses.


Reproducibility

Source code: see the configs/ folder for the exact model IDs, layer indices, trait list, alpha grid, and control seeds used. The full pipeline (build steering vectors → run steered axis → project into baseline PC → render figures) is reproducible with scripts/build_vectors.py, scripts/build_controls.py, scripts/run_steered.py, scripts/project_into_baseline.py, scripts/plot_steered_clouds.py in the source repository.

Citation

This dataset operationalizes ideas from two recent papers:

  • Persona Vectors: Monitoring and Controlling Character Traits in Language Models — safety-research/persona_vectors
  • The Assistant Axis: Measuring and Controlling Persona Structure in LLMs — safety-research/assistant-axis

README history 20 revisions

Every night we snapshot the README of every dataset in the catalog. When the SHA changes we archive the new version and diff it against the last. This is the evolving thought record of the alignment-data field: what the author decided to say about the corpus, and how that framing shifted over time.

  1. 2026-05-20Top-5 nearest table: add random_unit control + distribution gap (top-1 vs mean)98ae1b58 KB
    Loading...
  2. 2026-05-20Label peripheral archetypes + add top-5 nearest table (4096-D cosine)6035de48 KB
    Loading...
  3. 2026-05-20Trajectory plots: drop trait-colored labels, keep neutral landmark archetypes...ec159c98 KB
    Loading...
  4. 2026-05-20Remove 3D trajectory plot (dolphin8b)ae5b2da8 KB
    Loading...
  5. 2026-05-20Remove 3D trajectory plot (qwen7b)5741a5d8 KB
    Loading...
  6. 2026-05-20Remove 3D trajectory plot (llama8b)0768fde8 KB
    Loading...
  7. 2026-05-20Trajectory plots: label nearest archetypes in PC space (matches the displayed...8aee83b8 KB
    Loading...
  8. 2026-05-20Trajectory plot: drop black diamonds + dotted lines (confusing 2D-vs-4096D mi...939373d8 KB
    Loading...
  9. 2026-05-20Comparison diagrams: properly center text, hard-cap excerpts14806f78 KB
    Loading...
  10. 2026-05-20Compact rollout diagrams: 3-sentence excerpts, no text overflow13940658 KB
    Loading...
  11. 2026-05-20Use trait-specific probe questions for sharper rollout contrastsd905d2a8 KB
    Loading...
  12. 2026-05-20Rollout diagrams: 3 columns, centered text, header stripsd2c0f378 KB
    Loading...
  13. 2026-05-20Compact rollout diagrams to single-question formatdcedd5c8 KB
    Loading...
  14. 2026-05-20Add labeled trajectory plots + per-trait rollout comparison diagrams605df5f8 KB
    Loading...
  15. 2026-05-19Revert PCA basis to prior baseline: refresh headline_figures901a87f8 KB
    Loading...
  16. 2026-05-19Revert PCA basis to prior baseline: refresh summaryaab463d8 KB
    Loading...
  17. 2026-05-19Revert PCA basis to prior baseline: refresh pca_basis7761f908 KB
    Loading...
  18. 2026-05-19Add configsad887e48 KB
    Loading...
  19. 2026-05-19Upload folder using huggingface_hub751b82e8 KB
    Loading...
  20. 2026-05-19initial commited138070 B
    Loading...

Used by abliterated models none yet

No abliterated models in our catalog have declared this dataset in their YAML metadata yet. This can mean the dataset is used but not declared, is used outside abliteration workflows, or is new. The link will populate automatically as models are indexed.

Related datasets same stage · ablate

Read further

Metadata

License
apache-2.0

Repository

Download the dataset

0

Copy any of these snippets into your notebook or terminal. All three fetch directly from Hugging Face using your own credentials.

Recommended: datasets library (Python)
from datasets import load_dataset
ds = load_dataset("pandaman007/steered-persona-space")
Raw snapshot (Python)
from huggingface_hub import snapshot_download
snapshot_download(repo_id="pandaman007/steered-persona-space", repo_type="dataset")
git clone (requires git-lfs)
git clone https://huggingface.co/datasets/pandaman007/steered-persona-space
Catalog is the map. Apps are the tools.

Run models on your own machine, not in the cloud.

Every model page has an "Open in Abliteration" button that hands the model directly to the first-party desktop client, at the quantization your rig can actually run. No API keys, no subscription, no prompt leakage.

Open in Abliteration