CoolFace
Datasetpublic

abotresol/emotion-deepseek-diverse-vectors-gemma-4-31b-it

Per-story vectors from the prompt-diversified DeepSeek corpus Per-story vectors for google/gemma-4-31b-it, from stories written by deepseek-v4-pro with the protagonist and setting pinned from a deterministic 8-personas by 8-settings grid. This is the prompt-diversity condition. It tests whether forcing variety into the prompt produces better emotion vectors than a single fixed instruction. In the project's results it did not: at every matched sample size the fixed-prompt corpus… See the full description on the dataset page: https://huggingface.co/datasets/abotresol/emotion-deepseek-diverse-vectors-gemma-4-31b-it.

sourceHugging Facemitupdated 2mo agoView on Hugging Face
0likes255downloads
Dataset Card

Per-story vectors from the prompt-diversified DeepSeek corpus

Per-story vectors for google/gemma-4-31b-it, from stories written by deepseek-v4-pro with the protagonist and setting pinned from a deterministic 8-personas by 8-settings grid.

This is the prompt-diversity condition. It tests whether forcing variety into the prompt produces better emotion vectors than a single fixed instruction. In the project's results it did not: at every matched sample size the fixed-prompt corpus scored higher.

12 emotions, 20 layers, 5,376 dimensions per layer, about 1,022 stories per emotion.

Contents

PathShapeContents
emotion_means.npzsee belowthe per-emotion mean vectors
stacked_shards/<emotion>.npzresids [stories, 20, 5376] float32every story for one emotion, plus story_ids

Per-story data is stacked one file per emotion rather than one file per story, so a sample-size curve can be recomputed by subsampling on a laptop, with no GPU and no model download.

emotion_means.npz holds three arrays: emotions [12] (the names), layers [20] (which layers were captured), and means [12, 20, 5376].

python
import numpy as np

z = np.load("emotion_means.npz")
emotions, means = z["emotions"], z["means"]
afraid = means[list(emotions).index("afraid")]   # [20, 5376]

per_story = np.load("stacked_shards/afraid.npz")
resids, story_ids = per_story["resids"], per_story["story_ids"]
subset = resids[:256].mean(axis=0)               # a 256-story mean, no GPU

Reading a vector back

Use a centered cosine, not a raw dot product: subtract the mean over the emotion set first, or a direction that is large everywhere wins by default. emotion_vectors.q3_conventions in the project repository is the reference implementation, including the layer set the published numbers use.

Provenance and limits

Produced for gemma4-emotion-vectors, a 2-3 day replication of Anthropic's emotion-vector work on Gemma 4 31B. It is a research sprint, not a reviewed publication, and the write-up grades each finding by how far it was actually tested.

Two limits worth stating before anyone builds on this:

  • —These vectors describe a model reading emotion in text. That is a different claim from the model having emotions, and the distinction is easy to lose.
  • —How well emotion vectors work depends heavily on who wrote the stories they were built from. Holding everything else fixed, story source moved the number of working layers from 1 to 9 out of 20. Compare vector sets before trusting one.

Licence

MIT, matching the project repository. Model weights and third-party corpora carry their own licences.