[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"similar-attentionmech--mav":3,"tool-attentionmech--mav":61},[4,18,26,36,44,53],{"id":5,"name":6,"github_repo":7,"description_zh":8,"stars":9,"difficulty_score":10,"last_commit_at":11,"category_tags":12,"status":17},4358,"openclaw","openclaw\u002Fopenclaw","OpenClaw 是一款专为个人打造的本地化 AI 助手，旨在让你在自己的设备上拥有完全可控的智能伙伴。它打破了传统 AI 助手局限于特定网页或应用的束缚，能够直接接入你日常使用的各类通讯渠道，包括微信、WhatsApp、Telegram、Discord、iMessage 等数十种平台。无论你在哪个聊天软件中发送消息，OpenClaw 都能即时响应，甚至支持在 macOS、iOS 和 Android 设备上进行语音交互，并提供实时的画布渲染功能供你操控。\n\n这款工具主要解决了用户对数据隐私、响应速度以及“始终在线”体验的需求。通过将 AI 部署在本地，用户无需依赖云端服务即可享受快速、私密的智能辅助，真正实现了“你的数据，你做主”。其独特的技术亮点在于强大的网关架构，将控制平面与核心助手分离，确保跨平台通信的流畅性与扩展性。\n\nOpenClaw 非常适合希望构建个性化工作流的技术爱好者、开发者，以及注重隐私保护且不愿被单一生态绑定的普通用户。只要具备基础的终端操作能力（支持 macOS、Linux 及 Windows WSL2），即可通过简单的命令行引导完成部署。如果你渴望拥有一个懂你",349277,3,"2026-04-06T06:32:30",[13,14,15,16],"Agent","开发框架","图像","数据工具","ready",{"id":19,"name":20,"github_repo":21,"description_zh":22,"stars":23,"difficulty_score":10,"last_commit_at":24,"category_tags":25,"status":17},3808,"stable-diffusion-webui","AUTOMATIC1111\u002Fstable-diffusion-webui","stable-diffusion-webui 是一个基于 Gradio 构建的网页版操作界面，旨在让用户能够轻松地在本地运行和使用强大的 Stable Diffusion 图像生成模型。它解决了原始模型依赖命令行、操作门槛高且功能分散的痛点，将复杂的 AI 绘图流程整合进一个直观易用的图形化平台。\n\n无论是希望快速上手的普通创作者、需要精细控制画面细节的设计师，还是想要深入探索模型潜力的开发者与研究人员，都能从中获益。其核心亮点在于极高的功能丰富度：不仅支持文生图、图生图、局部重绘（Inpainting）和外绘（Outpainting）等基础模式，还独创了注意力机制调整、提示词矩阵、负向提示词以及“高清修复”等高级功能。此外，它内置了 GFPGAN 和 CodeFormer 等人脸修复工具，支持多种神经网络放大算法，并允许用户通过插件系统无限扩展能力。即使是显存有限的设备，stable-diffusion-webui 也提供了相应的优化选项，让高质量的 AI 艺术创作变得触手可及。",162132,"2026-04-05T11:01:52",[14,15,13],{"id":27,"name":28,"github_repo":29,"description_zh":30,"stars":31,"difficulty_score":32,"last_commit_at":33,"category_tags":34,"status":17},1381,"everything-claude-code","affaan-m\u002Feverything-claude-code","everything-claude-code 是一套专为 AI 编程助手（如 Claude Code、Codex、Cursor 等）打造的高性能优化系统。它不仅仅是一组配置文件，而是一个经过长期实战打磨的完整框架，旨在解决 AI 代理在实际开发中面临的效率低下、记忆丢失、安全隐患及缺乏持续学习能力等核心痛点。\n\n通过引入技能模块化、直觉增强、记忆持久化机制以及内置的安全扫描功能，everything-claude-code 能显著提升 AI 在复杂任务中的表现，帮助开发者构建更稳定、更智能的生产级 AI 代理。其独特的“研究优先”开发理念和针对 Token 消耗的优化策略，使得模型响应更快、成本更低，同时有效防御潜在的攻击向量。\n\n这套工具特别适合软件开发者、AI 研究人员以及希望深度定制 AI 工作流的技术团队使用。无论您是在构建大型代码库，还是需要 AI 协助进行安全审计与自动化测试，everything-claude-code 都能提供强大的底层支持。作为一个曾荣获 Anthropic 黑客大奖的开源项目，它融合了多语言支持与丰富的实战钩子（hooks），让 AI 真正成长为懂上",159267,2,"2026-04-17T11:29:14",[14,13,35],"语言模型",{"id":37,"name":38,"github_repo":39,"description_zh":40,"stars":41,"difficulty_score":32,"last_commit_at":42,"category_tags":43,"status":17},2271,"ComfyUI","Comfy-Org\u002FComfyUI","ComfyUI 是一款功能强大且高度模块化的视觉 AI 引擎，专为设计和执行复杂的 Stable Diffusion 图像生成流程而打造。它摒弃了传统的代码编写模式，采用直观的节点式流程图界面，让用户通过连接不同的功能模块即可构建个性化的生成管线。\n\n这一设计巧妙解决了高级 AI 绘图工作流配置复杂、灵活性不足的痛点。用户无需具备编程背景，也能自由组合模型、调整参数并实时预览效果，轻松实现从基础文生图到多步骤高清修复等各类复杂任务。ComfyUI 拥有极佳的兼容性，不仅支持 Windows、macOS 和 Linux 全平台，还广泛适配 NVIDIA、AMD、Intel 及苹果 Silicon 等多种硬件架构，并率先支持 SDXL、Flux、SD3 等前沿模型。\n\n无论是希望深入探索算法潜力的研究人员和开发者，还是追求极致创作自由度的设计师与资深 AI 绘画爱好者，ComfyUI 都能提供强大的支持。其独特的模块化架构允许社区不断扩展新功能，使其成为当前最灵活、生态最丰富的开源扩散模型工具之一，帮助用户将创意高效转化为现实。",108322,"2026-04-10T11:39:34",[14,15,13],{"id":45,"name":46,"github_repo":47,"description_zh":48,"stars":49,"difficulty_score":32,"last_commit_at":50,"category_tags":51,"status":17},6121,"gemini-cli","google-gemini\u002Fgemini-cli","gemini-cli 是一款由谷歌推出的开源 AI 命令行工具，它将强大的 Gemini 大模型能力直接集成到用户的终端环境中。对于习惯在命令行工作的开发者而言，它提供了一条从输入提示词到获取模型响应的最短路径，无需切换窗口即可享受智能辅助。\n\n这款工具主要解决了开发过程中频繁上下文切换的痛点，让用户能在熟悉的终端界面内直接完成代码理解、生成、调试以及自动化运维任务。无论是查询大型代码库、根据草图生成应用，还是执行复杂的 Git 操作，gemini-cli 都能通过自然语言指令高效处理。\n\n它特别适合广大软件工程师、DevOps 人员及技术研究人员使用。其核心亮点包括支持高达 100 万 token 的超长上下文窗口，具备出色的逻辑推理能力；内置 Google 搜索、文件操作及 Shell 命令执行等实用工具；更独特的是，它支持 MCP（模型上下文协议），允许用户灵活扩展自定义集成，连接如图像生成等外部能力。此外，个人谷歌账号即可享受免费的额度支持，且项目基于 Apache 2.0 协议完全开源，是提升终端工作效率的理想助手。",100752,"2026-04-10T01:20:03",[52,13,15,14],"插件",{"id":54,"name":55,"github_repo":56,"description_zh":57,"stars":58,"difficulty_score":32,"last_commit_at":59,"category_tags":60,"status":17},4721,"markitdown","microsoft\u002Fmarkitdown","MarkItDown 是一款由微软 AutoGen 团队打造的轻量级 Python 工具，专为将各类文件高效转换为 Markdown 格式而设计。它支持 PDF、Word、Excel、PPT、图片（含 OCR）、音频（含语音转录）、HTML 乃至 YouTube 链接等多种格式的解析，能够精准提取文档中的标题、列表、表格和链接等关键结构信息。\n\n在人工智能应用日益普及的今天，大语言模型（LLM）虽擅长处理文本，却难以直接读取复杂的二进制办公文档。MarkItDown 恰好解决了这一痛点，它将非结构化或半结构化的文件转化为模型“原生理解”且 Token 效率极高的 Markdown 格式，成为连接本地文件与 AI 分析 pipeline 的理想桥梁。此外，它还提供了 MCP（模型上下文协议）服务器，可无缝集成到 Claude Desktop 等 LLM 应用中。\n\n这款工具特别适合开发者、数据科学家及 AI 研究人员使用，尤其是那些需要构建文档检索增强生成（RAG）系统、进行批量文本分析或希望让 AI 助手直接“阅读”本地文件的用户。虽然生成的内容也具备一定可读性，但其核心优势在于为机器",93400,"2026-04-06T19:52:38",[52,14],{"id":62,"github_repo":63,"name":64,"description_en":65,"description_zh":66,"ai_summary_zh":66,"readme_en":67,"readme_zh":68,"quickstart_zh":69,"use_case_zh":70,"hero_image_url":71,"owner_login":72,"owner_name":72,"owner_avatar_url":73,"owner_bio":74,"owner_company":74,"owner_location":74,"owner_email":74,"owner_twitter":74,"owner_website":74,"owner_url":75,"languages":76,"stars":81,"forks":82,"last_commit_at":83,"license":84,"difficulty_score":85,"env_os":86,"env_gpu":86,"env_ram":86,"env_deps":87,"category_tags":93,"github_topics":94,"view_count":32,"oss_zip_url":74,"oss_zip_packed_at":74,"status":17,"created_at":98,"updated_at":99,"faqs":100,"releases":116},8668,"attentionmech\u002Fmav","mav","Model Activity Visualiser","mav（Model Activity Visualiser）是一款专为大型语言模型设计的可视化工具，它能实时展示模型在生成文本过程中的内部运作机制。面对大模型通常被视为“黑盒”、内部决策逻辑难以捉摸的痛点，mav 通过将注意力分布、熵值、预测概率等抽象数据转化为直观的动态图表，让用户清晰看到模型每一步是如何思考和选择下一个字的。\n\n这款工具特别适合 AI 研究人员、开发者以及希望深入理解模型原理的学习者使用。无论是调试模型行为、分析注意力机制，还是用于教学演示，mav 都能提供极大的便利。其技术亮点在于支持多种主流 Hugging Face 模型（如 GPT-2、Llama 系列等），并具备高度可定制的插件系统，用户可根据需求灵活配置展示面板。此外，mav 提供了从命令行一键运行到 Jupyter Notebook 嵌入等多种使用方式，甚至支持在训练循环中实时监测，极大地降低了观察和分析大模型内部状态的门槛，是探索大模型可解释性的得力助手。","\u003Cdiv align=\"center\">\n  \u003Cimg width=\"500\" height=\"200\" alt=\"MAV Logo\" src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fattentionmech_mav_readme_ca8ce9daac6a.png\" \u002F>\n\u003C\u002Fdiv>\n\u003Cbr>\n\u003Cdiv align=\"center\">\n  \u003Ca href=\"https:\u002F\u002Fpypi.org\u002Fproject\u002Fopenmav\u002F\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fpypi\u002Fv\u002Fopenmav.svg\" alt=\"PyPI\">\u003C\u002Fa>\n  \u003Ca href=\"https:\u002F\u002Fpypi.org\u002Fproject\u002Fopenmav\u002F\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fpypi\u002Fpyversions\u002Fopenmav\" alt=\"Python Versions\">\u003C\u002Fa>\n  \u003Ca href=\"https:\u002F\u002Fpypi.org\u002Fproject\u002Fopenmav\u002F\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fpypi\u002Fdm\u002Fopenmav\" alt=\"PyPI - Downloads\">\u003C\u002Fa>\n  \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fattentionmech\u002Fmav\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fstars\u002Fattentionmech\u002Fmav\" alt=\"GitHub Repo stars\">\u003C\u002Fa>\n  \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fattentionmech\u002Fmav\u002Factions\u002Fworkflows\u002Ftest.yml\">\u003Cimg src=\"https:\u002F\u002Fgithub.com\u002Fattentionmech\u002Fmav\u002Factions\u002Fworkflows\u002Ftest.yml\u002Fbadge.svg\" alt=\"Build Status\">\u003C\u002Fa>\n  \u003Ca href=\"https:\u002F\u002Fpypi.org\u002Fproject\u002Fopenmav\u002F\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fpypi\u002Fl\u002Fopenmav\" alt=\"License\">\u003C\u002Fa>\n\u003C\u002Fdiv>\n\n# MAV - Model Activity Visualiser\n\n> **Visualize the internal workings of Large Language Models as they generate text**\n\n\u003Cdiv align=\"center\">\n  \u003Cimg width=\"100%\" alt=\"MAV Demo\" src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fattentionmech_mav_readme_ecd145d7b8f9.png\" \u002F>\n\u003C\u002Fdiv>\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:\u002F\u002Fgithub.com\u002Fattentionmech\u002Fmav 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\u002FSmolLM-135M`\n- `gpt2-medium`\n- `gpt2-large`\n- `meta-llama\u002FLlama-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:\u002F\u002Fgithub.com\u002Fattentionmech\u002Fmav\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:\u002F\u002Fgithub.com\u002Fattentionmech\u002Fmav\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\u002FColab\n\n\u003Ca href=\"https:\u002F\u002Fcolab.research.google.com\u002Fgist\u002Fattentionmech\u002F507312c98a6f49f420ec539c301dcb2d\u002Fopenmav.ipynb\" target=\"_parent\">\u003Cimg src=\"https:\u002F\u002Fcolab.research.google.com\u002Fassets\u002Fcolab-badge.svg\" alt=\"Open In Colab\"\u002F>\u003C\u002Fa>\n\n## 📚 Documentation & 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:\u002F\u002Fcolab.research.google.com\u002Fgist\u002Fattentionmech\u002F56062b4f6112c793b2c9360ee5a7dfb9\u002Fopenmav.ipynb\" target=\"_parent\">\u003Cimg src=\"https:\u002F\u002Fcolab.research.google.com\u002Fassets\u002Fcolab-badge.svg\" alt=\"Writing Custom Plugin Panel\"\u002F>\u003C\u002Fa>\n\n#### Advanced Usage Examples\n\n```sh\n# Run MAV with a training loop and custom model\nuv run examples\u002Ftest_vis_train_loop.py\n\n# Run with custom panel configuration\nuv run --with git+https:\u002F\u002Fgithub.com\u002Fattentionmech\u002Fmav 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:\u002F\u002Fx.com\u002Fattentionmech\u002Fstatus\u002F1906769030540824963)\n- [Interactive mode](https:\u002F\u002Fx.com\u002Fattentionmech\u002Fstatus\u002F1905732784314081511)\n- [Limit characters](https:\u002F\u002Fx.com\u002Fattentionmech\u002Fstatus\u002F1905760510445850709)\n- [Sample with temperature](https:\u002F\u002Fx.com\u002Fattentionmech\u002Fstatus\u002F1905886861245259857)\n- [Running with custom model](https:\u002F\u002Fx.com\u002Fattentionmech\u002Fstatus\u002F1906172982294376755)\n- [Panel selection](https:\u002F\u002Fx.com\u002Fattentionmech\u002Fstatus\u002F1906304032798339124)\n- [Running in Colab notebook](https:\u002F\u002Fx.com\u002Fattentionmech\u002Fstatus\u002F1906657159355789593)\n\n> **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:\u002F\u002Fgithub.com\u002Fattentionmech\u002Fmav\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:\u002F\u002Fx.com\u002Fattentionmech\u002Fstatus\u002F1905018536042570084\">tweet\u003C\u002Fa>\n\n## ⭐ Star History\n\n[![Star History Chart](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fattentionmech_mav_readme_770074260898.png)](https:\u002F\u002Fwww.star-history.com\u002F#attentionmech\u002Fmav&Timeline)\n\n","\u003Cdiv align=\"center\">\n  \u003Cimg width=\"500\" height=\"200\" alt=\"MAV Logo\" src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fattentionmech_mav_readme_ca8ce9daac6a.png\" \u002F>\n\u003C\u002Fdiv>\n\u003Cbr>\n\u003Cdiv align=\"center\">\n  \u003Ca href=\"https:\u002F\u002Fpypi.org\u002Fproject\u002Fopenmav\u002F\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fpypi\u002Fv\u002Fopenmav.svg\" alt=\"PyPI\">\u003C\u002Fa>\n  \u003Ca href=\"https:\u002F\u002Fpypi.org\u002Fproject\u002Fopenmav\u002F\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fpypi\u002Fpyversions\u002Fopenmav\" alt=\"Python Versions\">\u003C\u002Fa>\n  \u003Ca href=\"https:\u002F\u002Fpypi.org\u002Fproject\u002Fopenmav\u002F\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fpypi\u002Fdm\u002Fopenmav\" alt=\"PyPI - Downloads\">\u003C\u002Fa>\n  \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fattentionmech\u002Fmav\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fstars\u002Fattentionmech\u002Fmav\" alt=\"GitHub Repo stars\">\u003C\u002Fa>\n  \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fattentionmech\u002Fmav\u002Factions\u002Fworkflows\u002Ftest.yml\">\u003Cimg src=\"https:\u002F\u002Fgithub.com\u002Fattentionmech\u002Fmav\u002Factions\u002Fworkflows\u002Ftest.yml\u002Fbadge.svg\" alt=\"Build Status\">\u003C\u002Fa>\n  \u003Ca href=\"https:\u002F\u002Fpypi.org\u002Fproject\u002Fopenmav\u002F\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fpypi\u002Fl\u002Fopenmav\" alt=\"License\">\u003C\u002Fa>\n\u003C\u002Fdiv>\n\n# MAV - 模型活动可视化工具\n\n> **在大型语言模型生成文本时，可视化其内部运作过程**\n\n\u003Cdiv align=\"center\">\n  \u003Cimg width=\"100%\" alt=\"MAV 演示\" src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fattentionmech_mav_readme_ecd145d7b8f9.png\" \u002F>\n\u003C\u002Fdiv>\n\n## 🚀 快速入门\n\n### 方法 1：使用 `uv`（推荐）\n\n```sh\n# 使用 PyPI 包运行\nuv run --with openmav mav\n\n# 或直接从 GitHub 运行\nuv run --with git+https:\u002F\u002Fgithub.com\u002Fattentionmech\u002Fmav mav --model gpt2 --prompt \"hello mello\"\n```\n\n**注意**：您可以将 `gpt2` 替换为任何其他与 transformers 兼容的 Hugging Face 模型：\n\n- `HuggingFaceTB\u002FSmolLM-135M`\n- `gpt2-medium`\n- `gpt2-large`\n- `meta-llama\u002FLlama-3.2-1B`\n\n对于受限制的仓库，请确保您已执行 `huggingface-cli login`，并且您的环境具有访问权限。\n\n\n### 方法 2：使用 `pip`\n\n1. 设置并激活虚拟环境\n2. 安装包：\n   ```sh\n   # 从 PyPI\n   pip install openmav\n   \n   # 或从 GitHub\n   pip install git+https:\u002F\u002Fgithub.com\u002Fattentionmech\u002Fmav\n   ```\n3. 运行可视化工具：\n   ```sh\n   mav --model gpt2 --prompt \"hello mello\"\n   ```\n4. 或在代码中导入：\n   ```python\n   from openmav.mav import MAV\n   MAV(\"gpt2\", \"Hello\")\n   ```\n\n### 方法 3：本地开发\n\n1. 克隆仓库：\n   ```sh\n   git clone https:\u002F\u002Fgithub.com\u002Fattentionmech\u002Fmav\n   cd mav\n   ```\n2. 设置并激活虚拟环境\n3. 以开发模式安装：\n   ```sh\n   pip install .\n   ```\n4. 运行可视化工具：\n   ```sh\n   mav --model gpt2 --prompt \"hello mello\"\n   ```\n\n### 方法 4：Jupyter Notebook\u002FColab\n\n\u003Ca href=\"https:\u002F\u002Fcolab.research.google.com\u002Fgist\u002Fattentionmech\u002F507312c98a6f49f420ec539c301dcb2d\u002Fopenmav.ipynb\" target=\"_parent\">\u003Cimg src=\"https:\u002F\u002Fcolab.research.google.com\u002Fassets\u002Fcolab-badge.svg\" alt=\"在 Colab 中打开\"\u002F>\u003C\u002Fa>\n\n## 📚 文档与教程\n\n### 文档\n\n请参阅 [documentation.md](documentation.md) 文件以获取详细信息。\n\n### 教程\n\n#### 自定义插件开发\n\u003Ca href=\"https:\u002F\u002Fcolab.research.google.com\u002Fgist\u002Fattentionmech\u002F56062b4f6112c793b2c9360ee5a7dfb9\u002Fopenmav.ipynb\" target=\"_parent\">\u003Cimg src=\"https:\u002F\u002Fcolab.research.google.com\u002Fassets\u002Fcolab-badge.svg\" alt=\"编写自定义插件面板\"\u002F>\u003C\u002Fa>\n\n#### 高级用法示例\n\n```sh\n# 使用训练循环和自定义模型运行 MAV\nuv run examples\u002Ftest_vis_train_loop.py\n\n# 使用自定义面板配置运行\nuv run --with git+https:\u002F\u002Fgithub.com\u002Fattentionmech\u002Fmav 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## 🎥 演示视频\n\n- [基础插件](https:\u002F\u002Fx.com\u002Fattentionmech\u002Fstatus\u002F1906769030540824963)\n- [交互模式](https:\u002F\u002Fx.com\u002Fattentionmech\u002Fstatus\u002F1905732784314081511)\n- [限制字符数](https:\u002F\u002Fx.com\u002Fattentionmech\u002Fstatus\u002F1905760510445850709)\n- [带温度采样的示例](https:\u002F\u002Fx.com\u002Fattentionmech\u002Fstatus\u002F1905886861245259857)\n- [使用自定义模型运行](https:\u002F\u002Fx.com\u002Fattentionmech\u002Fstatus\u002F1906172982294376755)\n- [面板选择](https:\u002F\u002Fx.com\u002Fattentionmech\u002Fstatus\u002F1906304032798339124)\n- [在 Colab 笔记本中运行](https:\u002F\u002Fx.com\u002Fattentionmech\u002Fstatus\u002F1906657159355789593)\n\n> **注意**：请通过命令行帮助探索更多选项，因为许多采样参数都已公开。\n\n## 👥 贡献\n\n克隆仓库并以开发模式安装包：\n\n```sh\ngit clone https:\u002F\u002Fgithub.com\u002Fattentionmech\u002Fmav\ncd mav\n\n# 使用 uv（推荐）\nuv sync\n\n# 或使用 pip\npip install -e .\n```\n\n## 📝 引用 \n\n```\n@article{attentionmech2025openmav,\n  title={OpenMAV: 模型活动可视化工具},\n  author={attentionmech},\n  year={2025}\n}\n```\n\n\n## 🧠 小知识\n\n该项目起源于一次简单的终端 UI 循环测试中的一个小推文： \u003Ca href=\"https:\u002F\u002Fx.com\u002Fattentionmech\u002Fstatus\u002F1905018536042570084\">推文\u003C\u002Fa>\n\n## ⭐ 星标历史\n\n[![星标历史图](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fattentionmech_mav_readme_770074260898.png)](https:\u002F\u002Fwww.star-history.com\u002F#attentionmech\u002Fmav&Timeline)","# MAV 快速上手指南\n\nMAV (Model Activity Visualiser) 是一个用于可视化大型语言模型（LLM）在生成文本时内部工作机制的开源工具。它能在终端中实时展示模型的注意力机制、预测概率等内部状态。\n\n## 环境准备\n\n*   **操作系统**：Linux, macOS, Windows\n*   **Python 版本**：3.8 及以上\n*   **前置依赖**：\n    *   推荐安装 [`uv`](https:\u002F\u002Fgithub.com\u002Fastral-sh\u002Fuv) 以获得最快的安装和运行体验。\n    *   若使用受限模型（如 Llama 系列），需提前运行 `huggingface-cli login` 完成认证。\n\n## 安装步骤\n\n你可以选择以下任意一种方式进行安装：\n\n### 方法一：使用 `uv`（推荐，无需预先安装）\n\n直接使用 `uv` 运行 PyPI 包或 GitHub 源码，无需手动创建虚拟环境：\n\n```sh\n# 直接运行 PyPI 版本\nuv run --with openmav mav\n\n# 或直接运行 GitHub 最新版本并指定参数\nuv run --with git+https:\u002F\u002Fgithub.com\u002Fattentionmech\u002Fmav mav --model gpt2 --prompt \"hello mello\"\n```\n\n### 方法二：使用 `pip` 安装\n\n1.  创建并激活虚拟环境。\n2.  执行安装命令：\n\n```sh\n# 从 PyPI 安装\npip install openmav\n\n# 或从 GitHub 安装\npip install git+https:\u002F\u002Fgithub.com\u002Fattentionmech\u002Fmav\n```\n\n### 方法三：本地开发模式\n\n```sh\ngit clone https:\u002F\u002Fgithub.com\u002Fattentionmech\u002Fmav\ncd mav\npip install -e .\n```\n\n## 基本使用\n\n安装完成后，可通过命令行或 Python 代码启动可视化界面。\n\n### 1. 命令行启动\n\n最简单的用法是指定模型和提示词：\n\n```sh\nmav --model gpt2 --prompt \"hello mello\"\n```\n\n**支持的模型**：\n你可以将 `gpt2` 替换为任何兼容 Hugging Face `transformers` 的模型，例如：\n*   `HuggingFaceTB\u002FSmolLM-135M`\n*   `gpt2-medium`\n*   `meta-llama\u002FLlama-3.2-1B`\n\n### 2. Python 代码调用\n\n也可以在脚本或 Jupyter Notebook 中直接导入使用：\n\n```python\nfrom openmav.mav import MAV\n\n# 初始化并运行\nMAV(\"gpt2\", \"Hello\")\n```\n\n### 3. 高级用法示例\n\n自定义面板布局、刷新率和生成长度：\n\n```sh\nmav \\\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> **提示**：运行 `mav --help` 可查看完整的命令行参数列表，包括温度采样（temperature）等更多控制选项。","某大模型算法工程师正在调试一个基于 Llama-3 的垂直领域问答模型，发现模型在回答专业问题时经常产生看似合理但事实错误的“幻觉”，急需定位内部注意力机制的异常。\n\n### 没有 mav 时\n- **黑盒调试困难**：只能依赖最终的文本输出猜测错误原因，无法直观看到模型生成每个字时内部各层的具体激活状态。\n- **注意力分析低效**：需手动编写复杂的 Matplotlib 代码提取并绘制注意力矩阵，耗时且难以动态观察生成过程中的变化。\n- **熵值监控缺失**：难以实时量化模型在特定 token 上的预测不确定性（熵），无法判断模型是“自信地犯错”还是“犹豫不决”。\n- **多面板对比繁琐**：若想同时对比“生成文本”、“注意力热力图”和“顶层预测概率”，需要切换多个窗口或日志文件，上下文割裂严重。\n\n### 使用 mav 后\n- **内部运作可视化**：mav 能实时渲染模型生成文本时的内部活动，工程师可直接观察到错误答案产生瞬间，特定注意力头是否错误聚焦了无关上下文。\n- **动态交互诊断**：通过 mav 的交互式界面，无需重写代码即可动态调整提示词，即时观察注意力分布随输入变化的流动过程，快速锁定异常层。\n- **不确定性量化**：mav 内置的注意力熵（attention_entropy）面板直接以条形图展示预测置信度，帮助工程师识别出模型高熵值的“高风险”生成时刻。\n- **多维信息同屏**：mav 支持自定义面板布局，将生成文本、注意力权重和顶层预测概率并排显示，让开发者在同一视野下完成因果关联分析。\n\nmav 将大模型从不可知的黑盒转变为透明的玻璃盒，让开发者能像查看发动机仪表盘一样，实时诊断并优化模型的生成逻辑。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fattentionmech_mav_ecd145d7.gif","attentionmech","https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002Fattentionmech_1fc5a668.png",null,"https:\u002F\u002Fgithub.com\u002Fattentionmech",[77],{"name":78,"color":79,"percentage":80},"Python","#3572A5",100,521,42,"2026-04-14T13:23:59","MIT",1,"未说明",{"notes":88,"python":89,"dependencies":90},"该工具主要用于可视化 Hugging Face transformers 库兼容的模型（如 gpt2, Llama-3.2 等）。若使用受限访问的模型仓库，需预先运行 'huggingface-cli login' 进行认证。支持通过 uv 或 pip 安装，也可在 Google Colab 中直接运行。","3.8+",[91,92],"transformers","huggingface_hub",[35,14],[95,96,97],"large-language-models","machine-learning","visualization","2026-03-27T02:49:30.150509","2026-04-18T03:34:43.776944",[101,106,111],{"id":102,"question_zh":103,"answer_zh":104,"source_url":105},38826,"MAV 是否支持通过 Ollama 托管的本地模型？","目前不支持。Ollama 没有以库可以直接加载的方式暴露模型，且不使用 Hugging Face Transformers 接口，因此无法直接集成到 MAV 中。","https:\u002F\u002Fgithub.com\u002Fattentionmech\u002Fmav\u002Fissues\u002F102",{"id":107,"question_zh":108,"answer_zh":109,"source_url":110},38827,"输出分布面板（output distribution panel）显示的数值不正确怎么办？","该问题已在版本 0.0.11 中通过暂时禁用该面板来处理。维护者表示需要进一步调试才能修复，建议暂时不要使用该面板功能。","https:\u002F\u002Fgithub.com\u002Fattentionmech\u002Fmav\u002Fissues\u002F76",{"id":112,"question_zh":113,"answer_zh":114,"source_url":115},38828,"项目是否会从 setup.py 迁移到 pyproject.toml？","是的，维护者同意迁移。只要符合社区标准且能正常工作，项目欢迎切换到 pyproject.toml，社区成员可以提交相关的 PR 来实现这一变更。","https:\u002F\u002Fgithub.com\u002Fattentionmech\u002Fmav\u002Fissues\u002F69",[]]