{"id":27837033,"url":"https://github.com/attentionmech/mav","last_synced_at":"2026-01-23T12:44:19.866Z","repository":{"id":284648560,"uuid":"955625055","full_name":"attentionmech/mav","owner":"attentionmech","description":"Model Activity Visualiser","archived":false,"fork":false,"pushed_at":"2025-04-09T02:17:48.000Z","size":6277,"stargazers_count":519,"open_issues_count":0,"forks_count":40,"subscribers_count":8,"default_branch":"main","last_synced_at":"2025-11-27T17:11:07.223Z","etag":null,"topics":["large-language-models","machine-learning","visualization"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/openmav/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/attentionmech.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-03-26T23:54:39.000Z","updated_at":"2025-10-29T15:44:54.000Z","dependencies_parsed_at":"2025-03-27T00:40:26.612Z","dependency_job_id":null,"html_url":"https://github.com/attentionmech/mav","commit_stats":null,"previous_names":["attentionmech/mav"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/attentionmech/mav","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/attentionmech%2Fmav","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/attentionmech%2Fmav/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/attentionmech%2Fmav/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/attentionmech%2Fmav/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/attentionmech","download_url":"https://codeload.github.com/attentionmech/mav/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/attentionmech%2Fmav/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28692007,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-23T11:01:27.039Z","status":"ssl_error","status_checked_at":"2026-01-23T11:00:26.909Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["large-language-models","machine-learning","visualization"],"created_at":"2025-05-02T18:05:10.477Z","updated_at":"2026-01-23T12:44:19.862Z","avatar_url":"https://github.com/attentionmech.png","language":"Python","readme":"\u003cdiv align=\"center\"\u003e\n  \u003cimg width=\"500\" height=\"200\" alt=\"MAV Logo\" src=\"https://github.com/user-attachments/assets/2474be26-6601-4bb2-b71a-f2eb529fad53\" /\u003e\n\u003c/div\u003e\n\u003cbr\u003e\n\u003cdiv align=\"center\"\u003e\n  \u003ca href=\"https://pypi.org/project/openmav/\"\u003e\u003cimg src=\"https://img.shields.io/pypi/v/openmav.svg\" alt=\"PyPI\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://pypi.org/project/openmav/\"\u003e\u003cimg src=\"https://img.shields.io/pypi/pyversions/openmav\" alt=\"Python Versions\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://pypi.org/project/openmav/\"\u003e\u003cimg src=\"https://img.shields.io/pypi/dm/openmav\" alt=\"PyPI - Downloads\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/attentionmech/mav\"\u003e\u003cimg src=\"https://img.shields.io/github/stars/attentionmech/mav\" alt=\"GitHub Repo stars\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/attentionmech/mav/actions/workflows/test.yml\"\u003e\u003cimg src=\"https://github.com/attentionmech/mav/actions/workflows/test.yml/badge.svg\" alt=\"Build Status\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://pypi.org/project/openmav/\"\u003e\u003cimg src=\"https://img.shields.io/pypi/l/openmav\" alt=\"License\"\u003e\u003c/a\u003e\n\u003c/div\u003e\n\n# MAV - Model Activity Visualiser\n\n\u003e **Visualize the internal workings of Large Language Models as they generate text**\n\n\u003cdiv align=\"center\"\u003e\n  \u003cimg width=\"100%\" alt=\"MAV Demo\" src=\"https://github.com/user-attachments/assets/8bca6807-325f-4863-ab1a-fe25bd7f4c46\" /\u003e\n\u003c/div\u003e\n\n## 🚀 Getting Started\n\n### Method 1: Using `uv` (Recommended)\n\n```sh\n# Run with PyPI package\nuv run --with openmav mav\n\n# Or run directly from GitHub\nuv run --with git+https://github.com/attentionmech/mav mav --model gpt2 --prompt \"hello mello\"\n```\n\n**Note**: You can replace `gpt2` with any other Hugging Face model compatible with transformers:\n\n- `HuggingFaceTB/SmolLM-135M`\n- `gpt2-medium`\n- `gpt2-large`\n- `meta-llama/Llama-3.2-1B`\n\nFor gated repos, ensure you have done `huggingface-cli login` and your environment has access to it.\n\n\n### Method 2: Using `pip`\n\n1. Set up and activate a virtual environment\n2. Install the package:\n   ```sh\n   # From PyPI\n   pip install openmav\n   \n   # Or from GitHub\n   pip install git+https://github.com/attentionmech/mav\n   ```\n3. Run the visualizer:\n   ```sh\n   mav --model gpt2 --prompt \"hello mello\"\n   ```\n4. Or import in your code:\n   ```python\n   from openmav.mav import MAV\n   MAV(\"gpt2\", \"Hello\")\n   ```\n\n### Method 3: Local Development\n\n1. Clone the repository:\n   ```sh\n   git clone https://github.com/attentionmech/mav\n   cd mav\n   ```\n2. Set up and activate a virtual environment\n3. Install in development mode:\n   ```sh\n   pip install .\n   ```\n4. Run the visualizer:\n   ```sh\n   mav --model gpt2 --prompt \"hello mello\"\n   ```\n\n### Method 4: Jupyter Notebook/Colab\n\n\u003ca href=\"https://colab.research.google.com/gist/attentionmech/507312c98a6f49f420ec539c301dcb2d/openmav.ipynb\" target=\"_parent\"\u003e\u003cimg src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/\u003e\u003c/a\u003e\n\n## 📚 Documentation \u0026 Tutorials\n\n### Documentation\n\nCheck out the [documentation.md](documentation.md) file for detailed information.\n\n### Tutorials\n\n#### Custom Plugin Development\n\u003ca href=\"https://colab.research.google.com/gist/attentionmech/56062b4f6112c793b2c9360ee5a7dfb9/openmav.ipynb\" target=\"_parent\"\u003e\u003cimg src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Writing Custom Plugin Panel\"/\u003e\u003c/a\u003e\n\n#### Advanced Usage Examples\n\n```sh\n# Run MAV with a training loop and custom model\nuv run examples/test_vis_train_loop.py\n\n# Run with custom panel configuration\nuv run --with git+https://github.com/attentionmech/mav mav \\\n  --model gpt2 \\\n  --num-grid-rows 3 \\\n  --selected-panels generated_text attention_entropy top_predictions \\\n  --max-bar-length 20 \\\n  --refresh-rate 0 \\\n  --max-new-tokens 10000\n```\n\n## 🎥 Demos\n\n- [Basic plugins](https://x.com/attentionmech/status/1906769030540824963)\n- [Interactive mode](https://x.com/attentionmech/status/1905732784314081511)\n- [Limit characters](https://x.com/attentionmech/status/1905760510445850709)\n- [Sample with temperature](https://x.com/attentionmech/status/1905886861245259857)\n- [Running with custom model](https://x.com/attentionmech/status/1906172982294376755)\n- [Panel selection](https://x.com/attentionmech/status/1906304032798339124)\n- [Running in Colab notebook](https://x.com/attentionmech/status/1906657159355789593)\n\n\u003e **Note**: Explore additional options using the command line help, as many sampling parameters are exposed.\n\n## 👥 Contributing\n\nClone the repository and install the package in development mode:\n\n```sh\ngit clone https://github.com/attentionmech/mav\ncd mav\n\n# Using uv (recommended)\nuv sync\n\n# Or using pip\npip install -e .\n```\n\n## 📝 Citation \n\n```\n@article{attentionmech2025openmav,\n  title={OpenMAV: Model Activity Visualiser},\n  author={attentionmech},\n  year={2025}\n}\n```\n\n\n## 🧠 Trivia\n\nThis project started from a small tweet while testing a simple terminal ui loop: \u003ca href=\"https://x.com/attentionmech/status/1905018536042570084\"\u003etweet\u003c/a\u003e\n\n## ⭐ Star History\n\n[![Star History Chart](https://api.star-history.com/svg?repos=attentionmech/mav\u0026type=Timeline)](https://www.star-history.com/#attentionmech/mav\u0026Timeline)\n\n","funding_links":[],"categories":["A01_文本生成_文本对话","Python"],"sub_categories":["大语言对话模型及数据"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fattentionmech%2Fmav","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fattentionmech%2Fmav","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fattentionmech%2Fmav/lists"}