Skip to main content

MAV

Project description


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

Introduction

MAV

Getting started

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"

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")
    

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"
    

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

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

UI

image

Examples

running MAV with a training loop with a custom model (not pretrained one)

uv run examples/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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

openmav-0.0.9.tar.gz (12.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

openmav-0.0.9-py3-none-any.whl (13.9 kB view details)

Uploaded Python 3

File details

Details for the file openmav-0.0.9.tar.gz.

File metadata

  • Download URL: openmav-0.0.9.tar.gz
  • Upload date:
  • Size: 12.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.7

File hashes

Hashes for openmav-0.0.9.tar.gz
Algorithm Hash digest
SHA256 ff36203512c2178f091e36abce4a5b9e64c65e3bff2fb5bb17ad8e1fe1753648
MD5 8abe4dcf08c20c5e2ef87fed3e85f8f3
BLAKE2b-256 688e0ee31735f46299001e50b60a488eaa496eec9150be0c842d13af89b12359

See more details on using hashes here.

File details

Details for the file openmav-0.0.9-py3-none-any.whl.

File metadata

  • Download URL: openmav-0.0.9-py3-none-any.whl
  • Upload date:
  • Size: 13.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.7

File hashes

Hashes for openmav-0.0.9-py3-none-any.whl
Algorithm Hash digest
SHA256 c6753a64b5bdfc9e2f4fac3a88717935d0b5eb8544f16feb8296a04892cee480
MD5 947aac87bf1a5403569aa1767ef22b45
BLAKE2b-256 1a4f573fe55d2a411743e0b8d0ef4d7df3ae047c4903c2fda1fd0736acde6dda

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page