Nanointerpret objective is being a minimal but full-fledged interpretability playground where you can:
- Train your own SAE
- Record SAE feature activations
- Interpret and filter the features with any LLM
- Explore the features in a local dashboard and steer the model with them
train.py: runs the LLM over data mix (web, PDF, code, math, multilingual content) captures the residual stream at one layer, and trains a Top-K SAE on it.- Attention-sink tokens and massive-activation dimensions are kept out of the SAE
- the SAE is judged by how little it changes the LLM's predictions when its reconstruction is fed back in (downstream KL).
- See methodology, hyperparameters, ablations, massive activations behind the defaults.
record_activations.py: runs the trained SAE over held-out textinterpret.py: an LLM names each feature from its activations, then the name is checked on held-out tokens + tests, and by steering the model along the feature (how it works).explore.py: serves a local dashboard to browse the features and steer the model.
- Prepare the environment:
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt- Then proceed to a guide:
- Gemma3 270M Base (~5GB free RAM required)
- Qwen3 1.7B Base (~14GB free RAM required)
Nanointerpret Qwen3 1.7B SAE (layer 11, k50, 1B tokens) vs its Qwen-Scope equivalent.