model-development
Configure and extend VLMEvalKit model wrappers, API providers, registries, and prompt adapters.
- License 许可
- Apache-2.0
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- model-development
- license
- Apache 2.0
- metadata
- { "disco-role": "operating" }
- description
- Configure and extend VLMEvalKit model wrappers, API providers, registries, and prompt adapters.
- disable-model-invocation
- true
02 资源文件 4
- 参考文档references/api-reference.md11.0 KB
- 参考文档references/model-registry.md7.2 KB
- 参考文档references/prompt-adapters.md8.1 KB
- 参考文档references/troubleshooting.md8.2 KB
03 SKILL.md 正文
VLMEvalKit model development
Use this sub-skill when the task is to configure an existing VLMEvalKit model name, add or adapt a local VLM wrapper, use LiteLLM/LMDeploy/OpenAI-compatible APIs, register model aliases, or implement dataset-aware prompt adapters. VLMEvalKit is the distribution/import package vlmeval; its main evaluation CLI is run.py, and the console helper is vlmutil.
Route here when
- A user needs to choose between an existing
supported_VLMname, JSON model config,--base-url, or a new wrapper/adapter. - A wrapper must satisfy
BaseModel.generate()/generate_inner()/ optionalchat_inner()contracts. - An API provider must satisfy
BaseAPI.generate()/generate_inner()ret-code contracts. - A LiteLLM, LMDeploy, OpenAI-compatible, or custom prompt-adapter setup fails before or during model invocation.
- A model-specific prompt, image/video conversion, device split, dependency version, or thinking-output issue must be diagnosed.
Route elsewhere
- Running evaluation jobs, reuse/resume behavior, output files,
status.json, scans, and summaries: evaluation. - Dataset/benchmark authoring, TSV/video formats, prompt construction on the dataset side, metrics, judges, and converters: benchmark-authoring.
First decision: configure or implement?
- Existing registry name: discover names with
vlmutil mlist allor narrower categories, then use the exact key fromvlmeval/config.py. - JSON config: use
run.py --configwhen the user needs local aliases or per-model kwargs without editing package files. - OpenAI-compatible endpoint: use
run.py --base-urlwhen a local/remote service already exposes a chat-completions-compatible endpoint; this route constructsLMDeployAPIwithout editingconfig.py. - New wrapper or adapter: implement the smallest contract in
vlmeval/vlm/,vlmeval/api/, orvlmeval/api/adapters/, then register it invlmeval/config.pyor a JSON config.
Reference map
- API reference:
BaseModel,BaseAPI, LiteLLM, LMDeploy/OpenAI-compatible invocation contracts. - Model registry:
supported_VLM,model_groups,vlmutil mlist, JSON config, and--base-urlselection rules. - Prompt adapters: adapter registry,
use_custom_prompt,process_inputs,process_payload,postprocess, and thinking split patterns. - Troubleshooting: missing deps/keys, bad base URLs, media formats, custom prompt mismatches, device/WORLD_SIZE issues, compatibility notes, and thinking-output failures.
Validation checklist
Before routing a model-development change back to evaluation:
- Confirm the chosen model name appears in
supported_VLMor is defined in the JSONmodelsection, unless--base-urlis intentionally used. - Confirm wrappers accept VLMEvalKit message lists with allowed types
text,image, and when supportedvideo. - Confirm local VLM wrappers implement
generate_inner(message, dataset=None); only addchat_innerwhen multi-turn chat is supported. - Confirm API wrappers return
(ret_code, answer, log)fromgenerate_innerand letBaseAPI.generate()handle retry/failure behavior. - Confirm prompt adapters are registered and selected by name when using
--custom-promptorcustom_promptkwargs. - Treat CUDA, live provider calls, dataset downloads, Gradio services, and large model evaluations as unverified unless the current task explicitly verifies them.
Source evidence distilled
Primary evidence: docs/en/Development.md, docs/en/Quickstart.md, docs/en/EvalByLMDeploy.md, docs/en/ConfigSystem.md, README.md, run.py, vlmeval/vlm/base.py, vlmeval/vlm/__init__.py, vlmeval/api/base.py, vlmeval/api/litellm_api.py, vlmeval/api/lmdeploy.py, vlmeval/api/openai_sdk.py, vlmeval/api/adapters/base.py, vlmeval/api/adapters/internvl2.py, vlmeval/api/adapters/internvl3.py, vlmeval/api/adapters/interns1_1.py, vlmeval/api/__init__.py, vlmeval/config.py, and tests/test_litellm_api.py.
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).