Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
145 commits
Select commit Hold shift + click to select a range
56775d4
wip: Inline edge normalization and add backend user tracking
ocg-goodfire Dec 5, 2025
a637d3b
wip: Add graph caching with database storage and retrieval
ocg-goodfire Dec 5, 2025
299523c
wip: Refactor graph caching API to use Pydantic models
ocg-goodfire Dec 5, 2025
9ac1343
Merge branch 'main' into feature/app-fixes-1
Dec 8, 2025
a9e39fc
conflicts
ocg-goodfire Dec 8, 2025
44a7d3f
remove renderscan
ocg-goodfire Dec 8, 2025
ba6d5a4
wip: Add exception handlers and improve error logging in FastAPI server
ocg-goodfire Dec 8, 2025
7e674d9
Improve backend error logging and use HTTPException consistently
ocg-goodfire Dec 8, 2025
c72de38
clean up
ocg-goodfire Dec 8, 2025
1c1b362
Fix new model class
danbraunai-goodfire Dec 8, 2025
d3199c9
move norm handling, show logs, fix topk input
ocg-goodfire Dec 8, 2025
ed66756
fix input weird behaviour
ocg-goodfire Dec 8, 2025
2f78b8c
key runs by run id AND ctx len
ocg-goodfire Dec 8, 2025
c21604f
tweaks
ocg-goodfire Dec 8, 2025
6af64f5
remove non-final output nodes in optimized graphs
ocg-goodfire Dec 8, 2025
a7bfbc3
interventions mvp, state persist btwn tabs
ocg-goodfire Dec 8, 2025
5f80ba7
normalisation cleanup, pinned nodes cleanup
ocg-goodfire Dec 8, 2025
bca6883
interventions is nice now, filtering cleaner
ocg-goodfire Dec 8, 2025
844f3ce
token uplift
ocg-goodfire Dec 8, 2025
52c3c90
hypothesis input
ocg-goodfire Dec 9, 2025
43b5873
hypothesis input in acts tab
ocg-goodfire Dec 9, 2025
ce8b752
remove base rates. improve interventions
ocg-goodfire Dec 9, 2025
1f1594f
improve act harvest defaults
ocg-goodfire Dec 9, 2025
ef9f9a5
reenable hot reload
ocg-goodfire Dec 9, 2025
70e7faa
restucture interventions. fix in/out nodes
ocg-goodfire Dec 9, 2025
0493d35
fix act examples loading
ocg-goodfire Dec 9, 2025
edd3bc8
drag to select
ocg-goodfire Dec 9, 2025
79a9989
svelteset, click drag ergonomics, linting
ocg-goodfire Dec 9, 2025
2ab2d38
wip: Remove unused lift cell styling classes
ocg-goodfire Dec 9, 2025
4005af7
replace remaining Sets with SvelteSet
ocg-goodfire Dec 9, 2025
c0913f8
remove persisted composer selection
ocg-goodfire Dec 9, 2025
845d585
reintroduce node pinning
ocg-goodfire Dec 9, 2025
65e09a9
tidy up component hover window handling
ocg-goodfire Dec 9, 2025
6eb5000
wip: Make seqIdx required in ComponentNodeCard props
ocg-goodfire Dec 9, 2025
2c7efa3
Do post-hoc ci-threshold filtering (#291)
danbraunai-goodfire Dec 10, 2025
f51386a
Added panel for searching the dataset (#293)
lee-goodfire Dec 10, 2025
edb9c31
Add token dropdown to optimize label (#292)
danbraunai-goodfire Dec 10, 2025
f8a4950
Tell Claude how to make check-app
danbraunai-goodfire Dec 10, 2025
8ad0850
Changed allowed ranges for compute_graph_optimized_stream
leesharkey Dec 10, 2025
fa11bce
Show L0 for standard graphs (#295)
danbraunai-goodfire Dec 10, 2025
ace0698
Improve UI labels in app frontend and context length default (#296)
lee-goodfire Dec 10, 2025
a748acd
Fix CI threshold filtering hiding output token nodes (#299)
lee-goodfire Dec 11, 2025
f81014e
Support kl div on final token for optimization (#297)
danbraunai-goodfire Dec 11, 2025
0afb3b1
Add run registry dropdown
danbraunai-goodfire Dec 11, 2025
acfb94b
Support models with W_U decompositions (#300)
lee-goodfire Dec 11, 2025
2e91197
Target Model Probabilities in Intervention Run History (#303)
lee-goodfire Dec 12, 2025
70d5bcb
token and component correlations (#298)
ocg-goodfire Dec 12, 2025
53fb73a
improve claude.md
ocg-goodfire Dec 12, 2025
76e92b4
Sort nodes by ci in interventions tab
danbraunai-goodfire Dec 12, 2025
78098db
Fix tuple order error and pred.spd_prob
danbraunai-goodfire Dec 12, 2025
f89cefb
Add notebooks/ to .gitignore for easier scribe usage
danbraunai-goodfire Dec 12, 2025
5828656
Add 'Hide unconnected edges' checkbox to attribution graph (#304)
lee-goodfire Dec 12, 2025
64baab5
fix harvesting
ocg-goodfire Dec 12, 2025
23913f1
forking, tidy set overlap tidyup
ocg-goodfire Dec 12, 2025
97190b7
cleanup
ocg-goodfire Dec 12, 2025
9b60a25
Add edge attribution lists to the hover panel in the local attributio…
lee-goodfire Dec 12, 2025
399d5b1
smaller component nodes in interventions
ocg-goodfire Dec 12, 2025
326ac60
shift to change view, faster hover
ocg-goodfire Dec 15, 2025
2fa23e5
Add subcomponent idx search in Activation Contexts
danbraunai-goodfire Dec 16, 2025
84091ad
Add 'Hide node card' checkbox to graph views
danbraunai-goodfire Dec 16, 2025
31ebf4e
Remove Positive and Negative legend
danbraunai-goodfire Dec 16, 2025
6467b34
fix: Use Alt/Option key for edge toggle, add blur handler (#312)
lee-goodfire Dec 16, 2025
c169167
Add hide unpinned edges in interventions
danbraunai-goodfire Dec 16, 2025
1ba1c22
Support clusters in app (#314)
danbraunai-goodfire Dec 17, 2025
2a13d8b
Autointerp pipeline + app refactoring (#315)
ocg-goodfire Dec 19, 2025
d85a0fa
merge main into dev/app
danbraunai-goodfire Dec 22, 2025
33daca0
rename spd-interpret to spd-autointerp for consistency
danbraunai-goodfire Dec 22, 2025
c050b05
Remove dataset_report/
danbraunai-goodfire Dec 22, 2025
d33d8d1
Clean up train_loader_and_tokenizer
danbraunai-goodfire Dec 22, 2025
0628a94
Remove play.py
danbraunai-goodfire Dec 22, 2025
55e9056
Specify localhost for CORS
danbraunai-goodfire Dec 22, 2025
b16ee4f
Fix async file writes
danbraunai-goodfire Dec 22, 2025
139895b
Clean up run_optim_cis
danbraunai-goodfire Dec 22, 2025
8ac1155
Remove app/scripts
danbraunai-goodfire Dec 22, 2025
db6f8ec
Move backend/db/database.py to backend/database.py
danbraunai-goodfire Dec 22, 2025
44af300
Remove unnecessary __init__.py
danbraunai-goodfire Dec 22, 2025
f8f0ca6
Allow running interventions with no nodes selected
danbraunai-goodfire Dec 29, 2025
7945ed5
Merge main to dev/app
danbraunai-goodfire Dec 29, 2025
0aa6618
Remove sqlite-web
danbraunai-goodfire Dec 29, 2025
01a8758
Add tooltip mentioning biases are always on
danbraunai-goodfire Dec 29, 2025
a46b7bb
Merge branch 'main' into dev/app
danbraunai-goodfire Jan 2, 2026
8a5da9f
Merge branch 'main' into dev/app
danbraunai-goodfire Jan 5, 2026
8e1fb52
Merge branch 'main' into dev/app
danbraunai-goodfire Jan 5, 2026
b7bda2e
Merge branch 'main' into dev/app
danbraunai-goodfire Jan 5, 2026
2dda482
Show ci-masked and target output on output node hover
danbraunai-goodfire Jan 6, 2026
7d92028
Fix bug which showed load bar in wrong tab
danbraunai-goodfire Jan 6, 2026
3fd7d82
Merge branch 'main' into dev/app
danbraunai-goodfire Jan 6, 2026
a4b6348
Merge branch 'main' into dev/app
danbraunai-goodfire Jan 6, 2026
f39fcaa
Improve autointerp (#325)
ocg-goodfire Jan 7, 2026
9465f97
Add subcomponent activation display (#324)
lee-goodfire Jan 7, 2026
a0e4d69
Ensure autointerp has enough mem
danbraunai-goodfire Jan 7, 2026
5686860
Prevent file write errors when running autointerp
danbraunai-goodfire Jan 7, 2026
222e194
Merge branch 'main' into dev/app
danbraunai-goodfire Jan 7, 2026
1a73c4e
Fix EdgeAttributionList to show token strings for wte/output nodes
lee-goodfire Jan 7, 2026
6b51cfe
minor autointerp prompt change
ocg-goodfire Jan 7, 2026
e97582a
more minor autointerp prompt changes
ocg-goodfire Jan 7, 2026
86aa39d
Add zoom to attributions and interventions tabs (#330)
danbraunai-goodfire Jan 8, 2026
33b3ab7
Merge remote-tracking branch 'origin/dev/app' into fix/token-na-panels2
lee-goodfire Jan 8, 2026
b76e4d9
Use unmasked and weight deltas for attribution calcs
danbraunai-goodfire Jan 9, 2026
66d5b74
Disable zoom when on node tooltip
danbraunai-goodfire Jan 9, 2026
299b91d
Show output logits in app (#334)
danbraunai-goodfire Jan 10, 2026
6678c76
Optimize harvest data loading and refactor frontend state management …
ocg-goodfire Jan 10, 2026
fd16eea
trivial fixes from 331
ocg-goodfire Jan 10, 2026
9518635
Run frontend linter
danbraunai-goodfire Jan 12, 2026
439ad35
Add option to use ci masked for optimized graphs
danbraunai-goodfire Jan 12, 2026
8dfba64
Make MaskType intervention arg persist in db
danbraunai-goodfire Jan 13, 2026
0511f87
Add node offset and fix zoom in interventions
danbraunai-goodfire Jan 9, 2026
addc731
Merge branch 'main' into dev/app
danbraunai-goodfire Jan 14, 2026
2d98857
Fix database fields
danbraunai-goodfire Jan 14, 2026
1908335
Fix greyed out mask_type for existing optimized run
danbraunai-goodfire Jan 14, 2026
45908b0
Show graph id in tab headers for agent referencing
danbraunai-goodfire Jan 14, 2026
5722b25
Add global_shared_mlp CI function type
lee-goodfire Jan 14, 2026
042d61d
Fix bugs and issues in global CI function implementation
lee-goodfire Jan 14, 2026
9ca95ff
Use explicit global_ci bool instead of inferring from ci_fn_type name
lee-goodfire Jan 14, 2026
805d612
Rename global_ci to use_global_ci and make _create_global_ci_fn exten…
lee-goodfire Jan 14, 2026
82a669d
Refactor CI config to use discriminated union pattern
lee-goodfire Jan 14, 2026
99daec5
Add agents router
danbraunai-goodfire Jan 15, 2026
4d96a23
Add rate limiter to autointerp
danbraunai-goodfire Jan 15, 2026
cc2c518
Merge branch 'main' into dev/app
danbraunai-goodfire Jan 15, 2026
c7f362e
Add unique constraint to prompts
danbraunai-goodfire Jan 15, 2026
63b0975
Create subgraph from interventions view (#340)
danbraunai-goodfire Jan 16, 2026
8de576d
Rename 'local' to 'prompt' attribution
danbraunai-goodfire Jan 16, 2026
d81f418
Merge branch 'main' into dev/app
danbraunai-goodfire Jan 16, 2026
aa44b05
Merge remote-tracking branch 'origin/main' into dev/app
lee-goodfire Jan 19, 2026
199329d
Add script to plot component activations vs component rank
lee-goodfire Jan 19, 2026
c035bf1
Add frequency-ordered plots with abs distance from midpoint
lee-goodfire Jan 19, 2026
26f8510
Add script to plot component activations scatter plots (bi-/mono-sema…
lee-goodfire Jan 19, 2026
dfd928d
Merge dev/app into global-ci-fn and update configs to new ci_config f…
lee-goodfire Jan 19, 2026
6e2368f
Merge dev/app into feature/global-ci-fn
lee-goodfire Jan 19, 2026
78adc83
Merge feature/global-ci-fn-with-app-merge for config migration
lee-goodfire Jan 19, 2026
a9dd880
Fix global CI issues and add comprehensive test coverage
lee-goodfire Jan 19, 2026
43e0bfe
Clean up global CI code based on review feedback
lee-goodfire Jan 19, 2026
c30e190
Remove scripts/outputs/ and add to .gitignore
lee-goodfire Jan 19, 2026
0a50cd8
Address PR review feedback for component activation scatter script
lee-goodfire Jan 19, 2026
db9e9cf
Merge feature/component-activation-scatter-clean into dev/app
lee-goodfire Jan 19, 2026
c414056
Refactor CI functions to use unified wrapper pattern
lee-goodfire Jan 19, 2026
5dea2a9
Make layerwise CI naming explicit
lee-goodfire Jan 19, 2026
76880bf
Reorder match cases: layerwise before global
lee-goodfire Jan 19, 2026
6b84fdf
Update test_distributed.py to use new ci_config format
lee-goodfire Jan 19, 2026
b307777
Update canonical runs to use new ci_config format
lee-goodfire Jan 19, 2026
be92977
Fix clustering test: disable streaming for resid_mlp
lee-goodfire Jan 19, 2026
80453d2
Add resid_mlp1_global experiment config
lee-goodfire Jan 20, 2026
ecfeee0
Minor simplification
danbraunai-goodfire Jan 20, 2026
ca5e5a5
merge dev into feature/global-ci-fn
danbraunai-goodfire Jan 20, 2026
ea3b9e5
Merge dev/app into feature/global-ci-fn
lee-goodfire Jan 20, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ spd/scripts/sweep_params.yaml
docs/coverage/**
notebooks/**

# Script outputs (generated files, often large)
scripts/outputs/

**/out/
neuronpedia_outputs/
.env
Expand Down
42 changes: 32 additions & 10 deletions spd/configs.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,34 @@

from spd.base_config import BaseConfig
from spd.log import logger
from spd.spd_types import CiFnType, ModelPath, Probability
from spd.spd_types import GlobalCiFnType, LayerwiseCiFnType, ModelPath, Probability


class LayerwiseCiConfig(BaseConfig):
"""Configuration for layerwise CI functions (one per layer)."""

mode: Literal["layerwise"] = "layerwise"
fn_type: LayerwiseCiFnType = Field(
..., description="Type of layerwise CI function: mlp, vector_mlp, or shared_mlp"
)
hidden_dims: list[NonNegativeInt] = Field(
..., description="Hidden dimensions for the CI function MLP"
)


class GlobalCiConfig(BaseConfig):
"""Configuration for global CI function (single function for all layers)."""

mode: Literal["global"] = "global"
fn_type: GlobalCiFnType = Field(
..., description="Type of global CI function: global_shared_mlp"
)
hidden_dims: list[NonNegativeInt] = Field(
..., description="Hidden dimensions for the global CI function MLP"
)


CiConfig = LayerwiseCiConfig | GlobalCiConfig


class ScheduleConfig(BaseConfig):
Expand Down Expand Up @@ -397,13 +424,10 @@ class Config(BaseConfig):
...,
description="Number of stochastic masks to sample when using stochastic recon losses",
)
ci_fn_type: CiFnType = Field(
default="vector_mlp",
description="Type of causal importance function used to calculate the causal importance.",
)
ci_fn_hidden_dims: list[NonNegativeInt] = Field(
default=[8],
description="Hidden dimensions for the causal importance function used to calculate the causal importance",
ci_config: CiConfig = Field(
...,
description="Configuration for the causal importance function. "
"Use LayerwiseCiConfig for per-layer CI functions or GlobalCiConfig for a single global CI function.",
)
sampling: SamplingType = Field(
default="continuous",
Expand Down Expand Up @@ -614,8 +638,6 @@ def microbatch_size(self) -> PositiveInt:
"pretrained_model_name_hf": "pretrained_model_name",
"recon_coeff": "ci_recon_coeff",
"recon_layerwise_coeff": "ci_recon_layerwise_coeff",
"gate_type": "ci_fn_type",
"gate_hidden_dims": "ci_fn_hidden_dims",
}

@model_validator(mode="before")
Expand Down
6 changes: 4 additions & 2 deletions spd/experiments/ih/ih_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,10 @@ stochastic_recon_layerwise_coeff: 1
importance_minimality_coeff: 1e-2
pnorm: 0.1
output_loss_type: kl
ci_fn_type: "vector_mlp"
ci_fn_hidden_dims: [128]
ci_config:
mode: layerwise
fn_type: vector_mlp
hidden_dims: [128]

n_examples_until_dead: 10000

Expand Down
6 changes: 4 additions & 2 deletions spd/experiments/lm/gpt2_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@ wandb_run_name_prefix: ""
# --- General ---
seed: 0
n_mask_samples: 1
ci_fn_type: "vector_mlp"
ci_fn_hidden_dims: [12]
ci_config:
mode: layerwise
fn_type: vector_mlp
hidden_dims: [12]
sigmoid_type: "leaky_hard"
module_info:
- module_pattern: "transformer.h.1.attn.c_attn"
Expand Down
6 changes: 4 additions & 2 deletions spd/experiments/lm/ss_gpt2_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@ wandb_run_name_prefix: ""
# --- General ---
seed: 0
n_mask_samples: 1
ci_fn_type: "vector_mlp"
ci_fn_hidden_dims: [12]
ci_config:
mode: layerwise
fn_type: vector_mlp
hidden_dims: [12]
sigmoid_type: "leaky_hard"
module_info:
- module_pattern: "transformer.h.1.mlp.c_fc"
Expand Down
6 changes: 4 additions & 2 deletions spd/experiments/lm/ss_gpt2_simple-1L.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@ wandb_run_name_prefix: ""
# --- General ---
seed: 1
n_mask_samples: 1
ci_fn_type: "shared_mlp"
ci_fn_hidden_dims: [550]
ci_config:
mode: layerwise
fn_type: shared_mlp
hidden_dims: [550]
sigmoid_type: "leaky_hard"
module_info:
- module_pattern: "h.*.mlp.c_fc"
Expand Down
6 changes: 4 additions & 2 deletions spd/experiments/lm/ss_gpt2_simple-2L.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@ wandb_run_name_prefix: ""
# --- General ---
seed: 1
n_mask_samples: 1
ci_fn_type: "shared_mlp"
ci_fn_hidden_dims: [550]
ci_config:
mode: layerwise
fn_type: shared_mlp
hidden_dims: [550]
sigmoid_type: "leaky_hard"
module_info:
- module_pattern: "h.*.mlp.c_fc"
Expand Down
6 changes: 4 additions & 2 deletions spd/experiments/lm/ss_gpt2_simple_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@ wandb_run_name_prefix: ""
# --- General ---
seed: 0
n_mask_samples: 1
ci_fn_type: "shared_mlp"
ci_fn_hidden_dims: [1000]
ci_config:
mode: layerwise
fn_type: shared_mlp
hidden_dims: [1000]
sigmoid_type: "leaky_hard"
module_info:
- module_pattern: "h.*.mlp.c_fc"
Expand Down
6 changes: 4 additions & 2 deletions spd/experiments/lm/ss_gpt2_simple_noln_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@ wandb_run_name_prefix: ""
# --- General ---
seed: 0
n_mask_samples: 1
ci_fn_type: "vector_mlp"
ci_fn_hidden_dims: [12]
ci_config:
mode: layerwise
fn_type: vector_mlp
hidden_dims: [12]
sigmoid_type: "leaky_hard"
module_info:
- module_pattern: "h.*.mlp.c_fc"
Expand Down
7 changes: 4 additions & 3 deletions spd/experiments/lm/ss_llama_simple-1L.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ wandb_run_name: null
wandb_run_name_prefix: ''
seed: 0
n_mask_samples: 1
ci_fn_type: shared_mlp
ci_fn_hidden_dims:
- 550
ci_config:
mode: layerwise
fn_type: shared_mlp
hidden_dims: [550]
sampling: continuous
sigmoid_type: leaky_hard
module_info:
Expand Down
7 changes: 4 additions & 3 deletions spd/experiments/lm/ss_llama_simple-2L.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ wandb_run_name: null
wandb_run_name_prefix: ''
seed: 0
n_mask_samples: 1
ci_fn_type: shared_mlp
ci_fn_hidden_dims:
- 550
ci_config:
mode: layerwise
fn_type: shared_mlp
hidden_dims: [550]
sampling: continuous
sigmoid_type: leaky_hard
module_info:
Expand Down
6 changes: 4 additions & 2 deletions spd/experiments/lm/ss_llama_simple_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@ wandb_run_name_prefix: ""
# --- General ---
seed: 0
n_mask_samples: 1
ci_fn_type: "shared_mlp"
ci_fn_hidden_dims: [1000]
ci_config:
mode: layerwise
fn_type: shared_mlp
hidden_dims: [1000]
sigmoid_type: "leaky_hard"
module_info:
- module_pattern: "h.*.mlp.gate_proj"
Expand Down
7 changes: 4 additions & 3 deletions spd/experiments/lm/ss_llama_simple_mlp-1L.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ wandb_run_name: null
wandb_run_name_prefix: ''
seed: 0
n_mask_samples: 1
ci_fn_type: shared_mlp
ci_fn_hidden_dims:
- 550
ci_config:
mode: layerwise
fn_type: shared_mlp
hidden_dims: [550]
sampling: continuous
sigmoid_type: leaky_hard
module_info:
Expand Down
7 changes: 4 additions & 3 deletions spd/experiments/lm/ss_llama_simple_mlp-2L-wide.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ wandb_run_name: null
wandb_run_name_prefix: ''
seed: 0
n_mask_samples: 1
ci_fn_type: shared_mlp
ci_fn_hidden_dims:
- 1250
ci_config:
mode: layerwise
fn_type: shared_mlp
hidden_dims: [1250]
sampling: continuous
sigmoid_type: leaky_hard
module_info:
Expand Down
7 changes: 4 additions & 3 deletions spd/experiments/lm/ss_llama_simple_mlp-2L.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ wandb_run_name: null
wandb_run_name_prefix: ''
seed: 0
n_mask_samples: 1
ci_fn_type: shared_mlp
ci_fn_hidden_dims:
- 550
ci_config:
mode: layerwise
fn_type: shared_mlp
hidden_dims: [550]
sampling: continuous
sigmoid_type: leaky_hard
module_info:
Expand Down
7 changes: 4 additions & 3 deletions spd/experiments/lm/ss_llama_simple_mlp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ wandb_run_name: null
wandb_run_name_prefix: ''
seed: 0
n_mask_samples: 1
ci_fn_type: shared_mlp
ci_fn_hidden_dims:
- 800
ci_config:
mode: layerwise
fn_type: shared_mlp
hidden_dims: [800]
sampling: continuous
sigmoid_type: leaky_hard
module_info:
Expand Down
6 changes: 4 additions & 2 deletions spd/experiments/lm/ts_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@ wandb_run_name_prefix: ""
# --- General ---
seed: 0
n_mask_samples: 1
ci_fn_type: "vector_mlp"
ci_fn_hidden_dims: [8]
ci_config:
mode: layerwise
fn_type: vector_mlp
hidden_dims: [8]
sigmoid_type: "leaky_hard"
module_info:
- module_pattern: "transformer.h.3.mlp.c_fc"
Expand Down
6 changes: 4 additions & 2 deletions spd/experiments/resid_mlp/resid_mlp1_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@ wandb_run_name_prefix: ""
# --- General ---
seed: 0
n_mask_samples: 1
ci_fn_type: "mlp"
ci_fn_hidden_dims: [16]
ci_config:
mode: layerwise
fn_type: mlp
hidden_dims: [16]
sigmoid_type: "leaky_hard"
module_info:
- module_pattern: "layers.*.mlp_in"
Expand Down
85 changes: 85 additions & 0 deletions spd/experiments/resid_mlp/resid_mlp1_global_config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
# ResidualMLP 1 layer - Global CI
# --- WandB ---
wandb_project: spd
wandb_run_name: null
wandb_run_name_prefix: ""

# --- General ---
seed: 0
n_mask_samples: 1
ci_config:
mode: global
fn_type: global_shared_mlp
hidden_dims: [400, 300]
sigmoid_type: "leaky_hard"
module_info:
- module_pattern: "layers.*.mlp_in"
C: 100
- module_pattern: "layers.*.mlp_out"
C: 100
identity_module_info: null
use_delta_component: true

# --- Loss config ---
loss_metric_configs:
- classname: "ImportanceMinimalityLoss"
coeff: 1e-5
pnorm: 2.0
beta: 0
- classname: "StochasticReconLayerwiseLoss"
coeff: 1.0
- classname: "StochasticReconLoss"
coeff: 1.0
output_loss_type: mse

# --- Training ---
batch_size: 2048
eval_batch_size: 2048
steps: 20_000
lr_schedule:
start_val: 2e-3
fn_type: constant
warmup_pct: 0.0

# --- Faithfulness Warmup ---
faithfulness_warmup_steps: 200
faithfulness_warmup_lr: 0.01
faithfulness_warmup_weight_decay: 0.1

# --- Logging & Saving ---
train_log_freq: 100
eval_freq: 500
n_eval_steps: 100
slow_eval_freq: 5_000
slow_eval_on_first_step: true
save_freq: null
ci_alive_threshold: 0.1
n_examples_until_dead: 204_800
eval_metric_configs:
- classname: "CIHistograms"
n_batches_accum: 5
- classname: "ComponentActivationDensity"
- classname: "PermutedCIPlots"
identity_patterns: ["layers.*.mlp_in"]
dense_patterns: ["layers.*.mlp_out"]
- classname: "IdentityCIError"
identity_ci:
- layer_pattern: "layers.*.mlp_in"
n_features: 100
dense_ci:
- layer_pattern: "layers.*.mlp_out"
k: 50
- classname: "CI_L0"
groups: null
- classname: "CIMeanPerComponent"
- classname: "StochasticHiddenActsReconLoss"

# --- Pretrained model info ---
pretrained_model_class: "spd.experiments.resid_mlp.models.ResidMLP"
pretrained_model_path: "wandb:goodfire/spd-pre-Sep-2025/runs/pziyck78"

# --- Task Specific ---
task_config:
task_name: resid_mlp
feature_probability: 0.01
data_generation_type: "at_least_zero_active"
7 changes: 4 additions & 3 deletions spd/experiments/resid_mlp/resid_mlp2_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ wandb_run_name_prefix: ""
# --- General ---
seed: 0
n_mask_samples: 1
ci_fn_type: shared_mlp
ci_fn_hidden_dims:
- 256
ci_config:
mode: layerwise
fn_type: shared_mlp
hidden_dims: [256]
sigmoid_type: leaky_hard
module_info:
- module_pattern: "layers.*.mlp_in"
Expand Down
6 changes: 4 additions & 2 deletions spd/experiments/resid_mlp/resid_mlp3_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@ wandb_run_name_prefix: ""
# --- General ---
seed: 0
n_mask_samples: 1
ci_fn_type: "mlp"
ci_fn_hidden_dims: [128]
ci_config:
mode: layerwise
fn_type: mlp
hidden_dims: [128]
sigmoid_type: "leaky_hard"
module_info:
- module_pattern: "layers.*.mlp_in"
Expand Down
Loading