MAV - Model Activations Visualiser
uv run --with openmav mav
or
uv run --with git+https://github.com/attentionmech/mav mav --model gpt2 --prompt "hello mello"
-
Set up and activate a virtual environment
-
Install the package:
pip install openmav
or
pip install git+https://github.com/attentionmech/mav
-
Run:
mav --model gpt2 --prompt "hello mello"
-
or Import
from openmav.mav import MAV MAV("gpt2", "Hello")
- git clone https://github.com/attentionmech/mav
- cd mav
- Set up and activate a virtual environment
- Install the package:
pip install .
- Run:
mav --model gpt2 --prompt "hello mello"
You can replace gpt2
with other Hugging Face models for example:
meta-llama/Llama-3.2-1B
HuggingFaceTB/SmolLM-135M
gpt2-medium
gpt2-large
uv run examples/vis_train_loop.py
uv run --with git+https://github.com/attentionmech/mav mav --model gpt2 --num-grid-rows 3 --selected-panels generated_text attention_entropy top_predictions --max-bar-length 20 --refresh-rate 0 --max-new-tokens 10000
- interactive mode
- limit chars
- sample with temperature
- running with custom model
- panel selection
- running in colab notebook
Note: explore it using the command line help as well, since many sampling params are exposed.