Skip to content

decoderesearch/synth-sae-bench-experiments

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SynthSAEBench

This repo contains code for the paper: SynthSAEBench: Evaluating Sparse Autoencoders on Scalable Realistic Synthetic Data.

Trained SAEs and results are online at https://huggingface.co/decoderesearch/synth-sae-bench-16k-v1-saes.

Structure

Experiments for the paper are in the experiments directory. The extended SAE classes used in the paper (XStandardTrainingSAE and XJumpReLUTrainingSAE containing L0 autotuning) are in the saes directory.

Setup

This project uses uv for package management. To install the dependencies, run:

uv sync

Running Experiments

To run the experiments, use the uv run command. For example, to run the superposition experiment, run:

uv run experiments/sweeps/sweep_superposition.py

Loading the benchmark model

The main benchmark model is on Huggingface at decoderesearch/synth-sae-bench-16k-v1. To load the model, run:

from sae_lens.synthetic.synthetic_model import SyntheticModel

model = SyntheticModel.from_pretrained("decoderesearch/synth-sae-bench-16k-v1")

Development

Linting and Formatting

This project uses ruff for linting and formatting. To run the linting and formatting, run:

uv run ruff check .
uv run ruff format .

Testing

This project uses pytest for testing. To run the tests, run:

uv run pytest

Type Checking

This project uses pyright for type checking. To run the type checking, run:

uv run pyright

About

code for the paper: SynthSAEBench: Evaluating Sparse Autoencoders on Scalable Realistic Synthetic Data

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages