A program that allows you to ablate and inspect AI models easily
- I'm envisioning that this would render the value of all the nodes upon giving a model a prompt, and then allow you to weaken the weights that result in the nodes being "activated"
Guide to installing repository and required packages
- Python 3.13.2
-
Clone repository
git clone https://github.com/altrup/model-ablater.git
-
Enter newly created folder
cd model-ablater -
Create Python virtual environment
python -m venv .venv
-
Activate Python virtual environment
-
Linux
source .venv/bin/activate -
Windows
.venv\Scripts\activate
-
-
Download packages
pip install -r requirements.txt
- Hugging Face model will be installed into
./model/model_name
python install.py --model-id "meta-llama/Llama-3.2-3B-Instruct"NOTE: Add -h option to any script for more info
- Generate the tensors from a sample text
python get_tensors.py- Generate mappings (optional)
python gen_mappings.py- Generate images
python gen_images.py- View activations (click on pixels to select them)
python view_activations.py- Run ablated model (selected pixels will be set to 0)
python test_model.py