Practical overview
When it fits
Use it when you need a codebook-based workflow to inspect model features or study how selected internal codes affect generated output.
Who it is for
- Researchers investigating interpretability and internal representations in neural networks.
- Developers training or analyzing codebook models, particularly language models.
Documented uses
- Train a neural network with learned sparse, discrete internal representations.
- Analyze code activations and search for codes that respond to a pattern.
- Intervene on a code during a forward pass and examine its effect on model output.
Requirements & limits
The project is open source under the MIT license. The README documents installation from PyPI or source and links to a Colab intervention tutorial and a Hugging Face Space.
- The browser workflow requires both a saved codebook model and locally generated cache files.
- Training configuration uses Hydra and builds on Hugging Face Transformers training components.
- The repository includes model classes for GPT-2, GPT-Neo and GPT-NeoX.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Prepare a codebook model for the local browser
Generate the cache files and launch the interpretability browser for a saved codebook model.
Before you start
- A trained codebook model saved on disk.
- The original model name or path, dataset name and dataset configuration name.
Steps
Run the command below with
--orig_model_name,--pretrained_path,--dataset_name,--dataset_config_nameand--output_base_dirset to the relevant model, dataset and output paths.python -m codebook_features.code_search_cacheLaunch the browser with the command below, using the base output directory from the cache-generation step.
python -m streamlit run codebook_features/webapp/Code_Browser.py -- --cache_dir
Expected outcome
A local webapp for visualizing the codebook model using its generated cache.
Guide limitations
- This workflow starts from an already trained and saved model; it does not cover model training.
- The browser requires cache files generated for the model.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 17 October 2026
- Original website title
- taufeeque9/codebook-features · Official homepage title · retained in its source language

