CoolFace
Datasetpublic

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.

sourceHugging Faceapache-2.0updated 4mo agoView on Hugging Face
0likes664downloads
Dataset Card

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

FolderMethodFilesSizeSamples / fileTensor shape
activations/Instruction-Variant (IV)272 (17 personas × 8 traits × {pos, neg})~11 GB100 = 5 instruction variants × 20 sampled questions(46, 4608) fp16
caa_activations/Contrastive Activation Addition (CAA)272~54 GB500(46, 4608) fp16
neutral_activations/Per-persona neutral baselines (no trait instruction)12~245 MB50(46, 4608) fp16
responses/Source conversations for activations/ and caa_activations/272 JSONL~40 MBtext
neutral_responses/Source conversations for neutral_activations/12 JSONL~0.7 MBtext
personas/Persona YAMLs (system prompt + 5 variants per persona) — only the 17 personas used by v217 YAML~0.5 MBtext
prompts/Trait dataset JSONs (5 instruction variants + 100 questions per trait, plus a caa/ subdir with CAA-specific prompts)18 files~1 MBtext
vectors/Contrastive IV steering vectors mean(pos) − mean(neg)136 .pt~110 MB1(46, 4608) fp16
caa_vectors/Contrastive CAA steering vectors136 .pt~110 MB1(46, 4608) fp16

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:

python
{
  "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. Each pos / neg file 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}.pt with 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

python
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:

bash
huggingface-cli download girishgupta/persona-steering-activations --repo-type dataset --local-dir ./acts

Computing the steering vectors

python
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:

json
{
  "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).