Skip to main content
Screenshot

PyPI Python Versions PyPI - Downloads GitHub Repo stars Build Status License

Introduction

MAV - Model Activity Visualiser (for LLMs)

test (1)

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:

  1. Set up and activate a virtual environment

  2. Install the package:

    pip install openmav
    

    or

    pip install git+https://github.com/attentionmech/mav
    
  3. Run:

    mav --model gpt2 --prompt "hello mello"
    
  4. or Import

    from openmav.mav import MAV
    
    MAV("gpt2", "Hello")
    

METHOD 3: Locally from scratch

  1. git clone https://github.com/attentionmech/mav
  2. cd mav
  3. Set up and activate a virtual environment
  4. Install the package:
    pip install .
    
  5. Run:
    mav --model gpt2 --prompt "hello mello"
    

METHOD 4: Inside Jupyter notebook/Colab

Open In Colab


You can replace gpt2 with other Hugging Face models for example:

  • meta-llama/Llama-3.2-1B
  • HuggingFaceTB/SmolLM-135M
  • gpt2-medium
  • gpt2-large

Tutorials

Writing your custom plugin tutorial in colab

writing custom plugin panel

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

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 .

Metadata

Release files for openmav 0.0.12

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for openmav 0.0.12
File Size Uploaded
openmav-0.0.12.tar.gz 14.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for openmav 0.0.12
File Interpreter ABI Platform
openmav-0.0.12-py3-none-any.whl Python 3 none any Details

Total release size: 32.6 kB

Release files / openmav-0.0.12.tar.gz

Download URL openmav-0.0.12.tar.gz
Size 14.7 kB
Tags Source
SHA-256 checksum
How to use checksums
c4726b00f453bcf40714f9db375d19f6d17f4bd79fcb83b1040aa790881c83d5
BLAKE2b-256 checksum
How to use checksums
cfc5177d2157090b5f8d12cb7562d65c46a44287a6ae0ac4bf745580f997ab59
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.7

Release files / openmav-0.0.12-py3-none-any.whl

Download URL openmav-0.0.12-py3-none-any.whl
Size 17.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0a8e4876a9ca76f5b550737b85dca93f291280c9d21e781146099874c0dc19cc
BLAKE2b-256 checksum
How to use checksums
80f404ec800d997da14aeb9e838c30c0035ddbfb5b3eb393d8a9eb14f360a7ec
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.7

Release history Release notifications | RSS feed

This release

0.0.12 This release

2 release files

0.0.11

2 release files

0.0.9

2 release files

0.0.8

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page