minimind-v
Routes MiniMind-V tiny vision-language model setup, data validation, architecture/API inspection, inference/WebUI, training, and checkpoint conversion workflows.
- License 许可
- Apache-2.0
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- minimind-v
- license
- Apache 2.0
- metadata
- { "disco-role": "operating" }
- description
- Routes MiniMind-V tiny vision-language model setup, data validation, architecture/API inspection, inference/WebUI, training, and checkpoint conversion workflows.
- disable-model-invocation
- true
02 资源文件 5
- 参考文档references/installation-and-environment.md4.4 KB
- 参考文档references/repo-provenance.md2.0 KB
- 参考文档references/repo-routing-metadata.json546 B
- 参考文档references/troubleshooting.md4.2 KB
- 脚本scripts/check_minimind_v_environment.py8.1 KB
03 SKILL.md 正文
MiniMind-V Repo Skill
Use this skill when a task concerns MiniMind-V, the compact PyTorch vision-language model repository built around a MiniMind language backbone plus a frozen SigLIP2 vision encoder.
This skill is for operating MiniMind-V workflows in a user's own checkout or exported model directory. It is self-contained: use the bundled references and safe helpers here instead of reopening the repository used to generate the skill.
Route here for
- Preparing MiniMind-V resources: dependencies, tokenizer files, SigLIP2, native
.pthweights, Transformers exports, ALLaVA-style parquet data, or sample image folders. - Explaining MiniMind-V model internals:
VLMConfig,MiniMindVLM, 64 visual tokens,<|image_pad|>, dense/MoE choices, projector behavior, or generation semantics. - Planning or checking command-line image QA inference and optional Gradio WebUI serving.
- Planning Pretrain/SFT runs, DDP launch, freeze policy, checkpoint/resume behavior, or training command construction.
- Converting native MiniMind-V checkpoints to Transformers format, inspecting export directories, or explaining reverse conversion limits.
Route elsewhere
- General LLM/VLM theory without MiniMind-V-specific APIs, files, checkpoints, or data layout.
- Downloading large datasets/model weights as an unattended action; ask for explicit approval and budget first.
- Running long training, launching a public listener, or executing untrusted
trust_remote_code=Trueloads without user approval. - Editing MiniMind-V source code as a maintainer task unless the user is working in a checkout and asks for repo maintenance.
Minimal setup and import check
From a MiniMind-V checkout, install only the dependency subset needed for the selected workflow. For general use the project documents:
pip install -r requirements.txt
Install torch/torchvision separately for the host backend because the repository comments those lines out. A lightweight source/API check that does not load weights is:
python - <<'PY'
from model.model_vlm import VLMConfig
cfg = VLMConfig()
print(cfg.model_type, cfg.image_special_token, cfg.image_token_len)
PY
Use scripts/check_minimind_v_environment.py for a broader read-only preflight before running model, data, training, serving, or export commands.
First-step checklist
- Identify the user's task family: resources/data, architecture/API, inference/WebUI, training, or conversion.
- If the task touches local files, ask which MiniMind-V checkout or export directory the user wants to inspect. Use relative project paths in commands.
- Prefer bundled safe helpers before expensive or stateful actions:
scripts/check_minimind_v_environment.pyfor cross-cutting dependency/resource checks.- sub-skill helpers for parquet validation, API inspection, inference preflight, WebUI model scanning, training command building, or Transformers export inspection.
- Treat full generation, training, WebUI launch, network downloads, and checkpoint conversion as explicit user actions, not routine verification.
- Keep resource acquisition separate from training/inference/conversion plans.
Sub-skill routing
| User intent | Read |
|---|---|
Dependency/resource layout, tokenizer/SigLIP2/model/data placement, parquet schema, image bytes, <image> expansion, data validation |
data-and-resources |
MiniMindVLM, VLMConfig, MiniMindConfig, projector, pixel tensor shapes, cache/generate behavior, dense vs MoE architecture |
model-architecture-and-api |
eval_vlm.py planning, native .pth vs Transformers inference, image QA smoke checks, WebUI scanner/serving decisions |
inference-and-serving |
Pretrain/SFT planning, freeze_llm, DDP, bf16/fp16, SwanLab/W&B logging, output names, checkpoint resume |
training |
Native .pth to Transformers export, export layout inspection, config.json/tokenizer metadata, reverse conversion limits |
model-export-and-format-conversion |
Repo-level references and helpers
- Read
references/installation-and-environment.mdbefore planning installs or backend checks. - Read
references/troubleshooting.mdfor cross-cutting failures that span multiple workflows. - Read
references/repo-provenance.mdbefore deciding whether this skill matches a current MiniMind-V checkout or needs refresh. - Import metadata for
repo-skills-routerlives inreferences/repo-routing-metadata.json.
Core facts to preserve
- MiniMind-V is a script-style repository, not an installable Python distribution with package metadata.
- The default VLM uses a MiniMind language backbone with
hidden_size=768,num_hidden_layers=8, optional MoE, and a frozen SigLIP2 P32 256x256 vision encoder. - One image is represented by 64 consecutive
<|image_pad|>tokens by default, matching SigLIP2's 8x8 patch-token output. - Native weights use names such as
out/llm_768.pth,out/pretrain_vlm_768.pth,out/sft_vlm_768.pth, with_moeadded for MoE variants. - Full training and quality inference require external model weights, SigLIP2 resources, parquet data, and a suitable torch backend; do not treat source import success as proof those resources exist.
04 同仓库更多 Skills
passnet-triton-opt
Make a single PassNet Triton kernel fast AND numerically faithful: performance model (when a replacement can win at all), block/grid/warp tuning, autotune policy, launch overhead, and per-op numeric recipes to pass the dtype baseline tolerances. Use when a pass matches and is correct but speedup below expected, or when correctness fails by small numeric margins.
passnet-solve
END-TO-END playbook for solving one PassNet sample: analyze the computation graphs, decide the optimization strategy (what to fuse, what to replace, what to leave alone), drive the iteration loop, and maximize the sample score. This is the ENTRY skill — invoke it first for any PassNet optimization task; it tells you when to use passnet-pattern-fusion, passnet-triton-opt and passnet-feedback.
passnet-skill
PassNet GPU kernel optimization via compiler passes. Design and implement Triton-based optimization passes, create pass files under ./pass_dir/, self-evaluate with pass_evaluator, and iterate to maximize GPU speedup.
passnet-pattern-fusion
Author PassNet pass files: write patterns that actually MATCH the FX graph, pick fusion regions (which ops to absorb into one Triton kernel), and structure multi-pass submissions with the mandatory shared-dispatch architecture. Use when creating or fixing pattern()/replacement_args()/replacement_func() files, when a pass "failed to match", or when deciding how to fuse multiple kernels/ops.
passnet-orchestrate
Round/batch planning and decision support for PassNet graph optimization. Use for multi-sample triage, worker allocation, eval-budget policy, and post-eval keep/revert decisions. For solving one concrete sample end to end, use passnet-solve as the entry skill; consult this skill only when you need broader planning or a specific decision gate.
passnet-feedback
Fast, deterministic feedback for PassNet work: pre-flight pattern/match verification WITHOUT burning a GPU evaluation, per-node bottleneck analysis of a sample's graphs, and eval-log parsing into per-variant status + estimated score + failure classification. Use BEFORE every GPU evaluation (check_pattern), at the START of a sample (analyze_graph), and AFTER every evaluation (parse_eval_log).