Dataset Viewer
Duplicate
The dataset viewer is not available for this split.
Cannot load the dataset split (in streaming mode) to extract the first rows.
Error code:   StreamingRowsError
Exception:    TypeError
Message:      Couldn't cast array of type
struct<top: null, mean: null, top_idx: null>
to
{'code_bucket': Value('null'), 'code_entangled': Value('int64'), 'code_selective': Value('int64')}
Traceback:    Traceback (most recent call last):
                File "/src/services/worker/src/worker/utils.py", line 147, 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 127, 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 478, 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 2303, in cast_table_to_schema
                  cast_array_to_feature(
                  ~~~~~~~~~~~~~~~~~~~~~^
                      table[name] if name in table_column_names else pa.array([None] * len(table), type=schema.field(name).type),
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                      feature,
                      ^^^^^^^^
                  )
                  ^
                File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 1852, in wrapper
                  return pa.chunked_array([func(chunk, *args, **kwargs) for chunk in array.chunks])
                                           ~~~~^^^^^^^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2059, in cast_array_to_feature
                  _c(array.field(name) if name in array_fields else null_array, subfeature)
                  ~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 1854, in wrapper
                  return func(array, *args, **kwargs)
                File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2149, in cast_array_to_feature
                  raise TypeError(f"Couldn't cast array of type\n{_short_str(array.type)}\nto\n{_short_str(feature)}")
              TypeError: Couldn't cast array of type
              struct<top: null, mean: null, top_idx: null>
              to
              {'code_bucket': Value('null'), 'code_entangled': Value('int64'), 'code_selective': Value('int64')}

Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.

YAML Metadata Warning:empty or missing yaml metadata in repo card

Check out the documentation for more information.

SmolLM2-135M-Instruct SAE Atlas

30 custom SAEs across all 30 layers of HuggingFaceTB/SmolLM2-135M-Instruct. Zero dead features at convergence. Mean explained variance 0.9519. 552,960 sparse features. One sitting, one trainer, zero hyperparameter tuning.

What is this

A full mechanistic interpretability atlas for SmolLM2-135M-Instruct — every layer, every component (MLP, gate, up-projection, attention heads, Q/K/V), with SAE sparse features scored and merged into a 91.6MB SQLite database. The SAEs were trained with a custom trainer built from the ground up for this run. No OpenAI or Eleuther SAE for guidance on where to start.

The census corpus that drove it: 4,946 prompts across 16 buckets — technical, creative, reasoning, roleplay, introspection, humor, niche, the works. Not random web scrap. Curated to light up different circuits.

Results

Layer EV Mean L0 Recon Loss Dead %
0 0.9480 48.74 0.2074 0.0
1 0.9599 43.65 0.3298 0.0
2 0.9631 46.81 0.5021 0.0
3 0.9508 46.56 0.7462 0.0
4 0.9463 46.23 0.8936 0.0
5 0.9350 47.57 1.1605 0.0
6 0.9306 48.44 1.3838 0.0
7 0.9318 49.51 1.5446 0.0
8 0.9432 46.52 1.6598 0.0
9 0.9373 47.15 2.0706 0.0
10 0.9348 45.53 2.2983 0.0
11 0.9905 48.58 5.8113 0.0
12 0.9901 48.42 6.1039 0.0
13 0.9891 46.15 6.9692 0.0
14 0.9884 44.76 7.1844 0.0
15 0.9863 47.63 8.6521 0.0
16 0.9840 43.45 10.179 0.0
17 0.9808 45.88 12.363 0.0
18 0.9811 47.17 12.300 0.0
19 0.9775 46.23 15.521 0.0
20 0.9726 48.23 18.727 0.0
21 0.9667 46.49 24.817 0.0
22 0.9594 46.15 31.128 0.0
23 0.9418 45.13 47.936 0.0
24 0.9397 45.35 57.931 0.0
25 0.9299 46.33 74.413 0.0
26 0.9212 45.32 92.727 0.0
27 0.9139 45.69 118.75 0.0
28 0.8809 46.56 129.83 0.0
29 0.8812 52.01 196.36 0.0

Highlights:

  • Dead features: 0.0% across all 30 layers. Not averaged. Every single layer.
  • Mid layers 11–18: EV above 0.98, peaking at 0.9905 on layer 11
  • L0 stayed tight: 43.45–52.01 against a target of 50
  • Mean EV across all layers: 0.9519

SAE training

Target L0 of 50, rolling-HF capture, 500 pool batches, 5000 max steps, 32,768 tokens per microbatch. Custom trainer — built from scratch for this run, not adapted from an existing library. The full training log and per-layer breakdown live in smollm2-135-instruct-SAE-trainer.md. The raw Modal terminal output is preserved in smollm2-135-instruct-SAE-trainer.raw.log.

Layer 29 needed a separate pass due to an off-by-one in the layer range argument — 0,29 trained layers 0–28, not 0–29. It still converged clean — EV 0.8812, L0 52.01, 0 dead features.

What's in here

If you know the layer, go to atlas/layers/<layer>/. That's the home base. Everything else branches from there.

atlas/

  • atlas.sqlite — the main database (91.6MB)
  • manifest.json — layer list, components, corpus metadata
  • model_meta.json — model reference
  • layers/<layer>/ — per-layer research artifacts:
    • heatmaps (gate, attention, heads, Q/K/V)
    • separation scores
    • code analysis
    • coactivation pairs
    • neuron taxonomies (MLP, gate, up, attention, Q/K/V)
    • per-head summaries
    • component comparison
    • compliance_behaviour/ — compliance/behaviour scoring
    • sub_zero/ — Sub-Zero specific outputs
    • census/ — per-layer census detail

raw/

  • 30 raw census .npz files (l<layer>_census_raw.npz)
  • census_raw_index.parquet — index into the census dumps

SAE/

  • 30 SAE score .npz files (sae_l<layer>_custom_l0_50.npz)
  • sae_features.parquet — 552,960 rows of sparse feature data
  • sae_files.parquet — file-level SAE metadata

exports/

  • brain_atlas_layers.parquet — viewer-friendly layer summary (552KB)
  • brain_atlas_summary.json — aggregate atlas summary
  • compliance_behaviour_scores.parquet — 201,600 rows of compliance/behaviour scores
  • compliance_behaviour_scores.json — same data in JSON (56MB)

Quick lookup

You want Go to
Layer 12 gate heatmap atlas/layers/12/gate_census_heatmap.png
Layer 4 attention coactivation atlas/layers/4/attn_coactivation_pairs.json
Layer 29 SAE scores SAE/sae_l29_custom_l0_50.npz
Raw activations for layer 7 raw/l7_census_raw.npz
All compliance/behaviour scores exports/compliance_behaviour_scores.parquet
Layer-level summary exports/brain_atlas_layers.parquet

Corpus

The census was built from 4,946 prompts across 16 buckets:

core_technical · ml_ai · research · writing · creative_writing · brainstorming · planning · data · learning · roleplay · introspection · business · design · niche · community · humor

~300 prompts per bucket, designed to activate different circuits across the network. Not a random sample — targeted coverage.

Notes

  • ov_circuits and subzero_svs are in the SQLite schema but empty in this release.
  • SAE stays capitalized. Everything else lowercase.
  • The SAE trainer code will be published separately. This dataset is the output.

How to query

The atlas is a SQLite database. If you're comfortable with numpy and parquet but haven't touched SQL, here's everything you need.

import sqlite3
import pandas as pd

db = sqlite3.connect("atlas/atlas.sqlite")

Get all features for a specific layer and component:

df = pd.read_sql("""
    SELECT * FROM features
    WHERE layer_id = 12 AND component = 'gate'
""", db)

Find the strongest compliance/behaviour features:

df = pd.read_sql("""
    SELECT * FROM compliance_behaviour_features
    WHERE fstat > 100
    ORDER BY fstat DESC
""", db)

Get SAE features sorted by topic strength:

df = pd.read_sql("""
    SELECT * FROM sae_features
    WHERE layer = 12 AND variant = 'custom_l0_50'
    ORDER BY topic_fstat DESC
    LIMIT 20
""", db)

Which features are specific to a circuit vs broadly shared?

df = pd.read_sql("""
    SELECT taxonomy_class, COUNT(*) as n
    FROM features
    WHERE layer_id = 12
    GROUP BY taxonomy_class
    ORDER BY n DESC
""", db)

Coactivation pairs — what fires together:

df = pd.read_sql("""
    SELECT * FROM coactivation
    WHERE layer_id = 12 AND component = 'mlp'
    ORDER BY ABS(correlation) DESC
    LIMIT 20
""", db)

Per-head attention analysis:

df = pd.read_sql("""
    SELECT * FROM per_head
    WHERE layer_id = 12 AND component = 'heads'
    ORDER BY fstat_best DESC
""", db)

Tables at a glance:

Table Rows What it holds
features 201,600 Per-layer, per-component feature taxonomies + activation stats
sae_features 394,473 SAE sparse features with topic + compliance-behaviour fstat scores
coactivation 18,023 Feature pairs that fire together, with correlation + dominant bucket
per_head 720 Attention-head level: dims, specificity, fstat scores
code_analysis 7110 Feature roles: entangled or selective
compliance_behaviour_features 201600 Features scored on compliance vs. behaviour axis (fstat, delta, means)
layers 30 Per-layer metadata: prompts, corpus hash, capture timestamp
subzero_layer 30 Sub-Zero classifier accuracy, refusal angles, SV counts
subzero_svs — Individual singular vectors with classifier + wanda scores

Don't want SQL? The parquet exports in exports/ and SAE/ cover the big ones — load them with pd.read_parquet() and skip the database entirely.

Citation

If you use this atlas, cite it and the model:

@misc{smollm2-135m-sae-atlas-2026,
  author = {Holmberg, Rick},
  title = {SmolLM2-135M-Instruct SAE Atlas: Full-Layer Sparse Autoencoder Features},
  year = {2025},
  url = {https://huggingface.co/datasets/juiceb0xc0de/smollm2-135m-instruct-atlas-SAE}
}
@misc{smollm2,
  title = {SmolLM2},
  author = {{HuggingFace TB}},
  url = {https://huggingface.co/HuggingFaceTB/SmolLM2-135M-Instruct}
}
Downloads last month
88

Article mentioning juiceb0xc0de/smollm2-135m-instruct-atlas-SAE