saev - Sparse Auto-Encoders for Vision
Implementation of sparse autoencoders (SAEs) for vision transformers (ViTs) in PyTorch.
This is the codebase used for our preprint "Sparse Autoencoders for Scientifically Rigorous Interpretation of Vision Models"
About
saev is a package for training sparse autoencoders (SAEs) on vision transformers (ViTs) in PyTorch. It also includes an interactive webapp for looking through a trained SAE's features.
Originally forked from HugoFry who forked it from Joseph Bloom.
Read logbook.md for a detailed log of my thought process.
See related-work.md for a list of works training SAEs on vision models. Please open an issue or a PR if there is missing work.
Installation
Installation is supported with uv. saev will likely work with pure pip, conda, etc. but I will not formally support it.
To install, clone this repository (maybe fork it first if you want).
In the project root directory, run uv run python -m saev --help.
The first invocation should create a virtual environment and show a help message.
Using saev
See the docs for an overview.
I recommend using the llms.txt file as a way to use any LLM provider to ask questions.
For example, you can run curl https://osu-nlp-group.github.io/SAE-V/llms.txt | pbcopy on macOS to copy the text, then paste it into https://claude.ai and ask any question you have.
Metadata
Release files for saev 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| saev-0.1.0.tar.gz | 33.2 kB | Without provenance | Details for saev-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| saev-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for saev-0.1.0-py3-none-any.whl |
Total release size: 69.5 kB
Release files / saev-0.1.0.tar.gz
| Download URL | saev-0.1.0.tar.gz |
|---|---|
| Size | 33.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
440ccad8aacfdece2d4198755e5c16cdd2de9f4ed3d21576faebbfb468a92836
|
|
BLAKE2b-256 checksum How to use checksums |
866776771813d55ba0ca151ee2040481938755f1e3b0a6379847d842c29e40b2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.6.14
|
Release files / saev-0.1.0-py3-none-any.whl
| Download URL | saev-0.1.0-py3-none-any.whl |
|---|---|
| Size | 36.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4c8abb6a1dcb843497a468ff688002e03986bed246fb7b76147b7c312ab2db10
|
|
BLAKE2b-256 checksum How to use checksums |
8827dc63afe765f31fd6dc456e272836226c845126477a02d3b5dbceb5e51f5e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.6.14
|
Security for saev 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.