sardines-mlp

Trained runs for sardines-mlp: a reproduction of Elhage et al. 2022, Toy Models of Superposition. The toy model squeezes n sparse features into m < n dimensions and reads them back with the same matrix, x' = ReLU(Wα΅€Wx + b). The code, the full write-up and the figures are on GitHub.

Each run folder holds one sweep, trained as a batch of independent instances:

  • model.safetensors: W (instances Γ— m Γ— n) and b (instances Γ— n).
  • sweep.safetensors: every instance's feature probability 1 βˆ’ S and importances.
  • metrics.json: the full training record (config, seeds, coordinates, evaluation history, baselines, code state, environment).
  • training.png: a diagnostic plot.
  • analysis/: per-instance and per-feature geometry tables, a diagnostic plot and a summary.
Sweep n β†’ m Instances What it shows
intro-{relu,linear}-seed{0..4} 20 β†’ 5 7 sparsities The ReLU model keeps up to 13–14 features in 5 dimensions; the linear model keeps 5
polygons-{relu,linear}-seed{0..4} 5 β†’ 2 21 densities A regular pentagon in all five seeds once 1 βˆ’ S ≀ 0.05
phase-{relu,linear}-seed{0..4} 2 β†’ 1 24 Γ— 24 grid When the second feature is dropped, gets the dimension, or forms an antipodal pair
dimensionality-{relu,linear}-seed{0..4} 400 β†’ 30 40 sparsities Half a dimension per feature over a range of sparsities; features at Β½, β…– and β…œ

The compare-* folders hold each sweep's geometry across the five seeds, the numbers the README figures are drawn from.

To load a run, with the sardines-mlp package installed:

from pathlib import Path
from huggingface_hub import snapshot_download
from sardines_mlp import checkpoint

folder = Path(snapshot_download('coeiico/sardines-mlp', allow_patterns='polygons-relu-seed0/*')) / 'polygons-relu-seed0'
run = checkpoint.load(folder)  # run.model, run.sweep, run.record

These are evaluation weights, not resumable checkpoints. The intro, polygons and phase runs were trained on the CPU and the dimensionality runs on CUDA (an RTX 3060). A seed fixes a run on one kind of device.

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support