The dataset viewer is not available for this split.
Error code: StreamingRowsError
Exception: CastError
Message: Couldn't cast
story_id: string
emotion: string
story_index: int64
sha1: string
n_tokens: int64
error: null
neutral: struct<0: list<item: double>, 3: list<item: double>, 6: list<item: double>, 9: list<item: double>, 1 (... 382 chars omitted)
child 0, 0: list<item: double>
child 0, item: double
child 1, 3: list<item: double>
child 0, item: double
child 2, 6: list<item: double>
child 0, item: double
child 3, 9: list<item: double>
child 0, item: double
child 4, 12: list<item: double>
child 0, item: double
child 5, 15: list<item: double>
child 0, item: double
child 6, 18: list<item: double>
child 0, item: double
child 7, 21: list<item: double>
child 0, item: double
child 8, 24: list<item: double>
child 0, item: double
child 9, 27: list<item: double>
child 0, item: double
child 10, 30: list<item: double>
child 0, item: double
child 11, 33: list<item: double>
child 0, item: double
child 12, 36: list<item: double>
child 0, item: double
child 13, 39: list<item: double>
child 0, item: double
child 14, 42: list<item: double>
child 0, item: double
child 15, 45: list<item: double>
child 0, item: double
child 16, 48: list<item: double>
child 0, item: double
child 17, 51: list<item: double>
child 0, item: double
child 18, 54: list<item: double>
child 0, item: double
child 19, 57: list<item: double>
child 0, item: double
to
{'neutral': {'0': List(Value('float64')), '3': List(Value('float64')), '6': List(Value('float64')), '9': List(Value('float64')), '12': List(Value('float64')), '15': List(Value('float64')), '18': List(Value('float64')), '21': List(Value('float64')), '24': List(Value('float64')), '27': List(Value('float64')), '30': List(Value('float64')), '33': List(Value('float64')), '36': List(Value('float64')), '39': List(Value('float64')), '42': List(Value('float64')), '45': List(Value('float64')), '48': List(Value('float64')), '51': List(Value('float64')), '54': List(Value('float64')), '57': List(Value('float64'))}}
because column names don't match
Traceback: Traceback (most recent call last):
File "/src/services/worker/src/worker/utils.py", line 149, in get_rows_or_raise
return get_rows(
dataset=dataset,
...<4 lines>...
column_names=column_names,
)
File "/src/libs/libcommon/src/libcommon/utils.py", line 272, in decorator
return func(*args, **kwargs)
File "/src/services/worker/src/worker/utils.py", line 129, in get_rows
rows_plus_one = list(itertools.islice(safe_iter(ds, dataset=dataset), rows_max_number + 1))
File "/src/services/worker/src/worker/utils.py", line 489, in safe_iter
yield from ds.decode(False) if ds.features else ds
File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 2818, in __iter__
for key, example in ex_iterable:
^^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 2355, in __iter__
for key, pa_table in self._iter_arrow():
~~~~~~~~~~~~~~~~^^
File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 2380, in _iter_arrow
for key, pa_table in self.ex_iterable._iter_arrow():
~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 536, in _iter_arrow
for key, pa_table in iterator:
^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 419, in _iter_arrow
for key, pa_table in self.generate_tables_fn(**gen_kwags):
~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/packaged_modules/json/json.py", line 343, in _generate_tables
self._cast_table(pa_table, json_field_paths=json_field_paths),
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/packaged_modules/json/json.py", line 132, in _cast_table
pa_table = table_cast(pa_table, self.info.features.arrow_schema)
File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2369, in table_cast
return cast_table_to_schema(table, schema)
File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2297, in cast_table_to_schema
raise CastError(
...<3 lines>...
)
datasets.table.CastError: Couldn't cast
story_id: string
emotion: string
story_index: int64
sha1: string
n_tokens: int64
error: null
neutral: struct<0: list<item: double>, 3: list<item: double>, 6: list<item: double>, 9: list<item: double>, 1 (... 382 chars omitted)
child 0, 0: list<item: double>
child 0, item: double
child 1, 3: list<item: double>
child 0, item: double
child 2, 6: list<item: double>
child 0, item: double
child 3, 9: list<item: double>
child 0, item: double
child 4, 12: list<item: double>
child 0, item: double
child 5, 15: list<item: double>
child 0, item: double
child 6, 18: list<item: double>
child 0, item: double
child 7, 21: list<item: double>
child 0, item: double
child 8, 24: list<item: double>
child 0, item: double
child 9, 27: list<item: double>
child 0, item: double
child 10, 30: list<item: double>
child 0, item: double
child 11, 33: list<item: double>
child 0, item: double
child 12, 36: list<item: double>
child 0, item: double
child 13, 39: list<item: double>
child 0, item: double
child 14, 42: list<item: double>
child 0, item: double
child 15, 45: list<item: double>
child 0, item: double
child 16, 48: list<item: double>
child 0, item: double
child 17, 51: list<item: double>
child 0, item: double
child 18, 54: list<item: double>
child 0, item: double
child 19, 57: list<item: double>
child 0, item: double
to
{'neutral': {'0': List(Value('float64')), '3': List(Value('float64')), '6': List(Value('float64')), '9': List(Value('float64')), '12': List(Value('float64')), '15': List(Value('float64')), '18': List(Value('float64')), '21': List(Value('float64')), '24': List(Value('float64')), '27': List(Value('float64')), '30': List(Value('float64')), '33': List(Value('float64')), '36': List(Value('float64')), '39': List(Value('float64')), '42': List(Value('float64')), '45': List(Value('float64')), '48': List(Value('float64')), '51': List(Value('float64')), '54': List(Value('float64')), '57': List(Value('float64'))}}
because column names don't matchNeed help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.
Emotion vectors, google/gemma-4-31b-it (corrected extraction)
Residual-stream activations for google/gemma-4-31b-it, pooled per story and averaged per emotion. Each emotion ends up as one direction in the model's activation space.
Read LINEAGE.md before using this. This set supersedes
abotresol/neutral-vectors-gemma-4-31b-it. The earlier extraction ran
while the tokenizer padded on the left, so the step that skips a story's first
50 tokens skipped padding instead. This set re-extracts the same corpus with
padding forced to the right. LINEAGE.md gives the measured before-and-after
impact. The predecessor stays up, unmodified, as the "before" side of that
comparison.
What is in it
| Path | Contents |
|---|---|
<emotion>/layer_<N>_resid.npy |
the mean vector for one emotion at one layer |
emotion_vectors.json |
the same per-emotion means, in the reference's format |
shards/<emotion>__<idx>.npy |
one [layers, d_model] array per story, before averaging |
manifest.jsonl |
per-story metadata: emotion, index, text SHA-1, token count |
run_config.json |
the full extraction configuration |
LINEAGE.md |
what this set corrects, and by how much |
Shards are published so the per-emotion means can be recomputed, resampled or subsetted without running the model again.
How it was made
- Corpus:
abotresol/neutral-transcripts-gemma-4-31b-it, transcripts written to carry no emotion - Layers: every third, 0 to 57
- Pooling: mean over non-padding tokens after position 50, stories truncated at 512 tokens. The first 50 tokens are dropped as narrative framing, which is the convention the source paper used.
- Precision: bf16 weights, fp32 activations. Seed 20260720.
- Across stories: a token-weighted mean, so a long story counts for more than a short one.
Extracted by scripts/extract_emotion_vectors.py in
gemma4-emotion-vectors, adapted from
sinievanderben/emotion_experiment.
Reproducing
Re-extracting needs the model weights and a GPU with enough memory for a 31B model in bf16. Analysis does not: the per-emotion means in this repository are enough to redo the geometry and detection work on a laptop.
uv run python scripts/extract_emotion_vectors.py
Caveats
A 2-3 day research sprint, not a reviewed publication. The write-up (https://github.com/Antonio-Tresol/gemma4-emotion-vectors) records which findings survived a falsification pass and which did not. These vectors describe a model reading emotions in text; that is a different claim from the model having them.
Licence
MIT, matching the project repository. The model weights and the story corpora carry their own licences.
- Downloads last month
- 245