girishgupta/persona-steering-activations
Persona-Conditional Steering — Gemma-2-27B-IT Activations (v2) Mean assistant-turn hidden-state activations from google/gemma-2-27b-it, recorded while the model role-plays one of 17 personas and answers questions under different trait-shaping instructions. The activations are the raw inputs that the project's contrastive steering vectors are computed from (mean(pos) − mean(neg) per persona × trait). This is the v2 release — the version used for the paper. Earlier… See the full description on the dataset page: https://huggingface.co/datasets/girishgupta/persona-steering-activations.
Persona-Conditional Steering — Gemma-2-27B-IT Activations (v2)
Mean assistant-turn hidden-state activations from google/gemma-2-27b-it, recorded while the model role-plays one of 17 personas and answers questions under different trait-shaping instructions. The activations are the raw inputs that the project's contrastive steering vectors are computed from (mean(pos) − mean(neg) per persona × trait).
This is the v2 release — the version used for the paper. Earlier outputs/gemma-2-27b-it/{activations,caa_activations}/ directories in the source repo are superseded.
Source code: github project repo — Persona-Conditional Steering Vectors (see pipeline/2_activations.py).
What's in the box
46 is the transformer layer count of gemma-2-27b-it and 4608 is its hidden size.
Personas (17)
actor_in_rehearsal, con_artist, contrarian_deceiver, drill_sergeant, farmer, kindergarten_teacher, nonsense, null, pathological_liar, politician, professor, six_year_old, sociopath, street_hustler, surgeon, tech_ceo, therapist.
The 10 core archetypes are described in the project README. nonsense and null are control personas; the remaining six are extension personas used for robustness / generalization analyses.
The neutral baseline set covers the 10 core personas plus nonsense and null.
Traits (8)
assertiveness, confidence, deference, empathy, honesty, impulsivity, risk_taking, warmth.
File schema
Each .pt file is a torch.save'd Python dict mapping sample-key → tensor:
{
"v0_q0": Tensor[46, 4608] (float16), # variant 0, question 0
"v0_q1": Tensor[46, 4608] (float16),
...
"v4_q99": Tensor[46, 4608] (float16), # CAA: all 5 variants × 100 questions
}- For IV files, keys span
v{0..4}_q{0..19}— 5 instruction variants × 20 questions = 100 samples. Eachpos/negfile pair shares the same(v, q)indices but differs only in the trait-shaping instruction prefix. - For CAA files, keys span
v{0..4}_q{0..99}— 500 samples per file. - For neutral files, naming is just
{persona}.ptwith 50 samples (no trait conditioning).
Each tensor is the mean activation over the assistant-turn tokens, per layer. Activations were extracted with PyTorch forward hooks on each transformer block's output (via assistant_axis.ProbingModel + ActivationExtractor + SpanMapper).
Loading
from huggingface_hub import hf_hub_download
import torch
path = hf_hub_download(
repo_id="girishgupta/persona-steering-activations",
filename="activations/farmer_assertiveness_pos.pt",
repo_type="dataset",
)
acts = torch.load(path, map_location="cpu", weights_only=False)
print(len(acts), next(iter(acts.values())).shape) # 100, torch.Size([46, 4608])To grab everything:
huggingface-cli download girishgupta/persona-steering-activations --repo-type dataset --local-dir ./actsComputing the steering vectors
import torch
pos = torch.load("activations/farmer_assertiveness_pos.pt", weights_only=False)
neg = torch.load("activations/farmer_assertiveness_neg.pt", weights_only=False)
pos_mean = torch.stack(list(pos.values())).float().mean(0) # (46, 4608)
neg_mean = torch.stack(list(neg.values())).float().mean(0)
v_farmer_assertiveness = pos_mean - neg_mean # (46, 4608)This reproduces the outputs/gemma-2-27b-it/v2/vectors/{persona}_{trait}.pt artifacts from step 3 of the pipeline.
Reproducibility / audit trail
Every activation file has a sibling text file under responses/ (or neutral_responses/) with the same stem. Each line of the JSONL is one sample:
{
"variant_index": 2,
"question_index": 17,
"conversation": [
{"role": "system", "content": "..."},
{"role": "user", "content": "..."},
{"role": "assistant", "content": "..."}
],
...
}The (v{variant_index}_q{question_index}) keys in the .pt files correspond directly to entries in the JSONL. To audit: take the conversation, replay it through google/gemma-2-27b-it, mean-pool the assistant-turn hidden states per layer, and compare to the tensor at the matching key.
Model
All activations are from google/gemma-2-27b-it. The model itself is not redistributed here; see Google's license for the weights.
Citation
If you use these activations, please cite the accompanying paper (link in source repo).
