$ the-wire · showcase
SAELens fixes seed, MPS and NaN eval bugs operators hit before step one
By RepoJournal · Filed · About Interpretability · Composed from the cited sources · methodology
A day of correctness fixes lands in SAELens, and the two that matter most are a seed the training runners ignored and eval metrics that could silently report NaN.
fix: apply cfg.seed in the SAE training runners jbloomAus/SAELens
The training runners never read cfg.seed: in LanguageModelSAETrainingRunner and MultiSAETrainingRunner the SAE init and mixing-buffer shuffles drew from torch's global RNG state, so two runs with identical configs, seed included, diverged. Reproducibility is now what your config says it is.
fix: eval cosine similarities are NaN for zero-norm vectors jbloomAus/SAELens
The per-token cossim in get_sparsity_and_variance_metrics divided x and x_hat by their norms by hand, so a single all-zero SAE output (no active latent, zero b_dec) produced 0/0 and turned the reported mean cossim into NaN. A NaN there means an eval sweep that looks fine until you read the number.
fix: let BatchTopKTrainingSAE run on MPS jbloomAus/SAELens
BatchTopKTrainingSAE constructed its topk_threshold buffer as float64, which MPS does not support, so construction raised TypeError before the first step on Apple Silicon, whitening or not. BatchTopK training now runs on MPS.
fix: return a torch.device for HookedMamba's input token device jbloomAus/SAELens
HookedMamba has no W_E or get_input_embeddings, so _get_input_token_device fell through to model.cfg.device, which mamba-lens stores as a string, and get_activations crashed calling .type on it. The device is now returned as a torch.device, and SAE training on a HookedMamba reaches the first step.
fix: return the list URL from make_neuronpedia_list_with_features when open_browser=False jbloomAus/SAELens
Elsewhere in the long tail, make_neuronpedia_list_with_features required "url" in the response and open_browser to both be true to return, so open_browser=False always raised; the list URL is now returned in both cases.
Action items