MAV: Model Activity Visualizer
Project description
Introduction
MAV - Model Activity Visualiser (for LLMs)
Getting started
METHOD 1: If uv is installed:
uv run --with openmav mav
or
uv run --with git+https://github.com/attentionmech/mav mav --model gpt2 --prompt "hello mello"
METHOD 2: Without uv:
-
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")
METHOD 3: Locally from scratch
- 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"
METHOD 4: Inside Jupyter notebook/Colab
You can replace gpt2 with other Hugging Face models for example:
meta-llama/Llama-3.2-1BHuggingFaceTB/SmolLM-135Mgpt2-mediumgpt2-large
Tutorials
Writing your custom plugin tutorial in colab
running MAV with a training loop with a custom model (not pretrained one)
uv run examples/test_vis_train_loop.py
running MAV with custom panel selection and arrangement
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
Demos
- Basic plugins
- Entropy Fire plugin
- 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.
Contributing
Clone the repository and install the package in development mode:
git clone https://github.com/attentionmech/mav
cd mav
# recommended
uv sync
# if you don't use uv
pip install -e .
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file openmav-0.0.12.tar.gz.
File metadata
- Download URL: openmav-0.0.12.tar.gz
- Upload date:
- Size: 14.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c4726b00f453bcf40714f9db375d19f6d17f4bd79fcb83b1040aa790881c83d5
|
|
| MD5 |
bca0eedf656886ec8680e31aefc2fa05
|
|
| BLAKE2b-256 |
cfc5177d2157090b5f8d12cb7562d65c46a44287a6ae0ac4bf745580f997ab59
|
File details
Details for the file openmav-0.0.12-py3-none-any.whl.
File metadata
- Download URL: openmav-0.0.12-py3-none-any.whl
- Upload date:
- Size: 17.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0a8e4876a9ca76f5b550737b85dca93f291280c9d21e781146099874c0dc19cc
|
|
| MD5 |
fdd59abb6cb21a04965f0199df607215
|
|
| BLAKE2b-256 |
80f404ec800d997da14aeb9e838c30c0035ddbfb5b3eb393d8a9eb14f360a7ec
|