Skip to main content

Model Activation Visualizer

Project description

+===========================================================================+
|          _____                    _____                    _____          |
|         /\    \                  /\    \                  /\    \         |
|        /::\____\                /::\    \                /::\____\        |
|       /::::|   |               /::::\    \              /:::/    /        |
|      /:::::|   |              /::::::\    \            /:::/    /         |
|     /::::::|   |             /:::/\:::\    \          /:::/    /          |
|    /:::/|::|   |            /:::/__\:::\    \        /:::/____/           |
|   /:::/ |::|   |           /::::\   \:::\    \       |::|    |            |
|  /:::/  |::|___|______    /::::::\   \:::\    \      |::|    |     _____  |
| /:::/   |::::::::\    \  /:::/\:::\   \:::\    \     |::|    |    /\    \ |
|/:::/    |:::::::::\____\/:::/  \:::\   \:::\____\    |::|    |   /::\____\|
|\::/    / ~~~~~/:::/    /\::/    \:::\  /:::/    /    |::|    |  /:::/    /|
| \/____/      /:::/    /  \/____/ \:::\/:::/    /     |::|    | /:::/    / |
|             /:::/    /            \::::::/    /      |::|____|/:::/    /  |
|            /:::/    /              \::::/    /       |:::::::::::/    /   |
|           /:::/    /               /:::/    /        \::::::::::/____/    |
|          /:::/    /               /:::/    /          ~~~~~~~~~~          |
|         /:::/    /               /:::/    /                               |
|        /:::/    /               /:::/    /                                |
|        \::/    /                \::/    /                                 |
|         \/____/                  \/____/                                  |
+===========================================================================+
Screenshot

Model Activations Visualiser

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"
    

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

Demos

Note: explore it using the command line help as well, since many sampling params are exposed.

Contributing

IMP NOTE: The design is not good for scaling it right now to multiple backends, and stuff which i am planning.. so your pull requests will have to wait for sometime

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.5.tar.gz (8.4 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.5-py3-none-any.whl (8.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: openmav-0.0.5.tar.gz
  • Upload date:
  • Size: 8.4 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.5.tar.gz
Algorithm Hash digest
SHA256 2cced952dc2094815ae99a4d37f3bb0de617c69e647911959f979ca6eb450d4b
MD5 5e3334f1785630eb21f8ea8dff3ec593
BLAKE2b-256 f049a7d87cd02f30ae95f07d0116fdef113823ea910bdaf6a4658a7eb15988a0

See more details on using hashes here.

File details

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

File metadata

  • Download URL: openmav-0.0.5-py3-none-any.whl
  • Upload date:
  • Size: 8.5 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.5-py3-none-any.whl
Algorithm Hash digest
SHA256 a17588f85c5b1c7f9d049b56bafbc62dcce38538032f184c3ad2c607713e3f4c
MD5 d4d970e6f3e93e3d598e22b28d7fa7e1
BLAKE2b-256 ab9b7fe507a7c6f55d705110f492d3e7b027966138440b9f402c8822871190d7

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