Belluxx/nanointerpret

train your sae, interpret your llm

0

stars

374

commits

Python

primary language

Aug 31, 2026

updated

nanointerpret.pages.dev
mechanistic-intepretability
sparse-autoencoder
Browse cluster: Sparse Autoencoders and Mechanistic Interpretability

README

nanointerpret

Nanointerpret objective is being a minimal but full-fledged interpretability playground where you can:

  • Train your own SAE on your own LLM
  • Automatically interpret SAE features with a local or remote LLM
  • Explore the features via a web GUI
  • Forcefully activate features and observe the effect on LLM generations (the fun part)

To try it right now, go to nanointerpret.pages.dev.

To try it locally with a pretrained SAE, check Run the visualizer below.

To train your SAE locally, check Train your SAE below.

Want to know more about the decisions that went into making this project? Check experiments.md.

example with tree feature clamping

Run the visualizer

If you don't want to train the model but just explore the features and perform interventions locally:

  1. Prepare the environment:
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
  1. Download the pretrained Qwen3 SAE and activations and start the visualizer:
hf download Belluxx/nanointerpret-qwen3 --local-dir artifacts/nanointerpret-qwen3
python3 visualize.py --activations artifacts/nanointerpret-qwen3/activations
  1. Open http://127.0.0.1:8000.

Train your SAE

  1. Prepare the environment:
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
  1. Then proceed to a guide:

Details

The repo takes different ideas from OpenAI and Anthropic. It also includes various ablation experiments I did to see what works best (experiments.md)

Future objectives:

  • Use later layers to avoid heavily syntactic features
  • Use llama.cpp to run LLM and capture acivations
  • Test on 3B-7B models
  • Test 1.7B on later layers compraing feature categories and scores
  • Test on interactive chat tuned models (the repo uses pretrained base Gemma/Qwen)

[!NOTE] This should not be taken as a reference implementation. I made this project just to get started with an hands-on approach and share the results publicly.

Contributors

Belluxx

374 commits

Belluxx/nanointerpret

train your sae, interpret your llm

0

stars

374

commits

Python

primary language

Aug 31, 2026

updated

nanointerpret.pages.dev
mechanistic-intepretability
sparse-autoencoder
Browse cluster: Sparse Autoencoders and Mechanistic Interpretability

README

nanointerpret

Nanointerpret objective is being a minimal but full-fledged interpretability playground where you can:

  • Train your own SAE on your own LLM
  • Automatically interpret SAE features with a local or remote LLM
  • Explore the features via a web GUI
  • Forcefully activate features and observe the effect on LLM generations (the fun part)

To try it right now, go to nanointerpret.pages.dev.

To try it locally with a pretrained SAE, check Run the visualizer below.

To train your SAE locally, check Train your SAE below.

Want to know more about the decisions that went into making this project? Check experiments.md.

example with tree feature clamping

Run the visualizer

If you don't want to train the model but just explore the features and perform interventions locally:

  1. Prepare the environment:
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
  1. Download the pretrained Qwen3 SAE and activations and start the visualizer:
hf download Belluxx/nanointerpret-qwen3 --local-dir artifacts/nanointerpret-qwen3
python3 visualize.py --activations artifacts/nanointerpret-qwen3/activations
  1. Open http://127.0.0.1:8000.

Train your SAE

  1. Prepare the environment:
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
  1. Then proceed to a guide:

Details

The repo takes different ideas from OpenAI and Anthropic. It also includes various ablation experiments I did to see what works best (experiments.md)

Future objectives:

  • Use later layers to avoid heavily syntactic features
  • Use llama.cpp to run LLM and capture acivations
  • Test on 3B-7B models
  • Test 1.7B on later layers compraing feature categories and scores
  • Test on interactive chat tuned models (the repo uses pretrained base Gemma/Qwen)

[!NOTE] This should not be taken as a reference implementation. I made this project just to get started with an hands-on approach and share the results publicly.

Contributors

Belluxx

374 commits

Languages

Python

65.7%

JavaScript

15.4%

CSS

12.0%

HTML

6.9%