Downloads · 30 days
153
100% of all-time downloads
dams2005/olmo-3-7b-think-saes
olmo-3-7b-think-saes is a machine learning model from dams2005. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for saelens.
This repository contains sparse autoencoders (SAEs) trained on post-layer residual stream activations from allenai/Olmo-3-7B-Think.
Downloads · 30 days
153
100% of all-time downloads
All-time downloads
153
Public
Repo size
36.5 GB
Likes
2
Public
Click a slice to open those files.
.safetensors36.5 GB · 100%
From the Hugging Face model README
This repository contains sparse autoencoders (SAEs) trained on post-layer
residual stream activations from allenai/Olmo-3-7B-Think.
Each folder is packaged for SAELens with cfg.json and
sae_weights.safetensors. The original training checkpoints included
optimizer state; this release contains inference-only weights.
Training and collection code is available at daMS2005/olmo-sae-builder.
allenai/Olmo-3-7B-Think4096L uses outputs.hidden_states[L + 1] from Hugging Face Transformers8192 tokensv1_6-sample plus Dolci-Instruct-SFT textActivations were collected with the local collect_data.py pipeline:
103 Dolma v1_6-sample JSONL gzip shards from allenai/dolma.15 Dolci-Instruct-SFT train parquet shards from allenai/Dolci-Instruct-SFT.(512, 2048), (3500, 5000), and (7000, 8192) tokens.allenai/Olmo-3-7B-Think in bfloat16 with torch.no_grad(), eval(), and use_cache=False.olmo.model.layers[L] outputs for layers 7, 15, 23, and 31.outputs.hidden_states[L + 1] from Hugging Face Transformers.[num_real_tokens, 4096].380 activation chunks per layer, about 20.0M token activations.Use these unless you specifically want to compare raw versus layernorm variants:
layer_07/width_131k/topk_64_rawlayer_15/width_163k/topk_64_rawlayer_23/width_163k/topk_128_rawlayer_31/width_163k/topk_128_rawlayer_31/width_163k/topk_128_raw is the final-layer SAE in this release.
31163840128none (raw activations)2563e-40.326502Validation after export:
SAE.from_pretrained(...) loaded successfully through SAELensencode() and decode() ran on CPU and CUDA0.0| SAE id | layer | width | k | norm | final normalized MSE | canonical |
|---|---|---|---|---|---|---|
layer_07/width_131k/topk_64_raw | 7 | 131072 | 64 | none | 0.274970 | yes |
layer_07/width_163k/topk_64_layernorm | 7 | 163840 | 64 | layer_norm | 0.277127 | |
layer_15/width_163k/topk_64_raw | 15 | 163840 | 64 | none | 0.303301 | yes |
layer_15/width_163k/topk_64_layernorm | 15 | 163840 | 64 | layer_norm | 0.304524 | |
layer_23/width_163k/topk_64_raw | 23 | 163840 | 64 | none | 0.343949 | |
layer_23/width_163k/topk_128_raw | 23 | 163840 | 128 | none | 0.329776 | yes |
layer_31/width_163k/topk_128_raw | 31 | 163840 | 128 | none | 0.326502 | yes |
The layernorm variants use SAELens runtime normalize_activations="layer_norm".
The raw variants reconstruct raw activation vectors directly.
layer_07/width_131k/topk_64_rawLayer 7 raw-activation TopK64 SAE; best layer 7 run by final loss.
7131072 latents409664none0.274970dams2005/olmo-3-7b-think-sae-layer-07/raw_prebias_131k_topk64/olmo_sae_layer07.ptRaw residual stream activations; no runtime input normalization.
layer_07/width_163k/topk_64_layernormLayer 7 TopK64 SAE trained with runtime layernorm preprocessing.
7163840 latents409664layer_norm0.277127dams2005/olmo-3-7b-think-sae-layer-07/olmo_sae_layer07.ptUses SAELens runtime layer normalization before encoding and reverses it after decoding.
layer_15/width_163k/topk_64_rawLayer 15 raw-activation TopK64 SAE; best layer 15 run by final loss.
15163840 latents409664none0.303301dams2005/olmo-3-7b-think-sae-layer-15/raw_prebias_163k_topk64/olmo_sae_layer15.ptRaw residual stream activations; no runtime input normalization.
layer_15/width_163k/topk_64_layernormLayer 15 TopK64 SAE trained with runtime layernorm preprocessing.
15163840 latents409664layer_norm0.304524dams2005/olmo-3-7b-think-sae-layer-15/olmo_sae_layer15.ptUses SAELens runtime layer normalization before encoding and reverses it after decoding.
layer_23/width_163k/topk_64_rawLayer 23 raw-activation TopK64 SAE; kept for same-k comparisons.
23163840 latents409664none0.343949dams2005/olmo-3-7b-think-sae-layer-23/raw_prebias_163k_topk64/olmo_sae_layer23.ptRaw residual stream activations; no runtime input normalization.
layer_23/width_163k/topk_128_rawLayer 23 raw-activation TopK128 SAE; best layer 23 run by final loss.
23163840 latents4096128none0.329776dams2005/olmo-3-7b-think-sae-layer-23/raw_prebias_163k_topk128/olmo_sae_layer23.ptRaw residual stream activations; no runtime input normalization.
layer_31/width_163k/topk_128_rawLayer 31 raw-activation TopK128 SAE.
31163840 latents4096128none0.326502dams2005/olmo-3-7b-think-sae-layer-31/raw_prebias_163k_topk128/olmo_sae_layer31.ptRaw residual stream activations; no runtime input normalization.
from sae_lens import SAE
repo_id = "dams2005/olmo-3-7b-think-saes"
sae_id = "layer_31/width_163k/topk_128_raw"
sae = SAE.from_pretrained(repo_id, sae_id, device="cuda", dtype="float32")
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
from sae_lens import SAE
model_id = "allenai/Olmo-3-7B-Think"
layer = 31
sae_id = "layer_31/width_163k/topk_128_raw"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
model_id,
dtype=torch.bfloat16,
device_map="auto",
)
sae = SAE.from_pretrained("dams2005/olmo-3-7b-think-saes", sae_id, device="cuda")
tokens = tokenizer("The Eiffel Tower is in", return_tensors="pt").to(model.device)
with torch.no_grad():
outputs = model(**tokens, output_hidden_states=True)
acts = outputs.hidden_states[layer + 1].to("cuda").float()
feature_acts = sae.encode(acts)
recons = sae.decode(feature_acts)
hidden_states[0] is the embedding output, so layer L activations are
hidden_states[L + 1].
These SAEs are intended for mechanistic interpretability research: feature inspection, activation analysis, and reconstruction experiments over OLMo 3 residual stream activations. They are not language models, classifiers, or safety filters.
config.json: repository-level metadatamanifest.json: machine-readable list of included SAEs and training metricssaelens_pretrained_saes.yaml: registry-style snippet for possible SAELens registration*/cfg.json: SAELens config for each SAE*/sae_weights.safetensors: SAELens weights for each SAE*/training.log: training log for the source run