AGENT SKILL

vlm-r1

Use VLM-R1 for multimodal GRPO training, JSONL reward/data design, VLM module extension, REC/OVD evaluation, and Ascend inference deployment.

License 许可
Apache-2.0
最近更新
2026-09-03
Stars
★ 351
Forks
27

01 前言 Front Matter

name
vlm-r1
license
Apache 2.0
metadata
{ "disco-role": "operating" }
description
Use VLM-R1 for multimodal GRPO training, JSONL reward/data design, VLM module extension, REC/OVD evaluation, and Ascend inference deployment.
disable-model-invocation
true

02 资源文件 5

03 SKILL.md 正文

VLM-R1

Use this repo skill when the user is working with VLM-R1, the nested open-r1 multimodal package, R1-style VLM GRPO post-training, REC/OVD bbox rewards, Qwen2/2.5-VL or InternVL GRPO launches, VLM module integration, VLM-R1 evaluation scripts, or Huawei Ascend VLM-R1 OVD deployment.

This skill is self-contained operating guidance. Do not route future agents back to this source checkout's README, scripts, examples, or docs; use the bundled sub-skills, references, and scripts here.

Before acting

  1. Read references/repo-provenance.md when checking whether this skill matches a target checkout or deciding whether to refresh it.
  2. Read references/installation-and-environment.md before installing or debugging the package.
  3. Run scripts/check_vlm_r1_environment.py for safe import/backend probes when the user already has an environment.
  4. Read references/troubleshooting.md for cross-cutting import, CUDA, DeepSpeed, GLM, data path, and unsupported-backend issues.

Route by task

User task Read
Build, audit, or adapt GRPO training commands; choose LoRA/freeze/DeepSpeed/multi-node flags; create dry-run launch commands. sub-skills/training-workflows/SKILL.md
Validate VLM-R1 JSONL rows, image-root mapping, answer formats, reward methods, or bbox/text reward behavior. sub-skills/data-and-rewards/SKILL.md
Add a new VLM backend or debug Qwen2VL, InternVL, GLM, processor inputs, freeze keywords, or custom reward hooks. sub-skills/model-modules/SKILL.md
Adapt REC/OVD evaluation, score saved bbox predictions, or explain Qwen/InternVL/baseline evaluation differences. sub-skills/evaluation/SKILL.md
Run VLM-R1 OVD on Huawei Ascend using vllm-ascend or XLLM server/offline/client templates. sub-skills/ascend-inference/SKILL.md

Minimal public setup model

VLM-R1 is a source-oriented repository with a nested Python distribution named open-r1 and import package open_r1. Typical users install from a VLM-R1 source checkout that contains the multimodal package root, then launch GRPO with torchrun against the open_r1.grpo_jsonl training entrypoint or an editable package script.

Safe initial checks in a prepared Python environment:

python -m pip check
python -c "import open_r1; import open_r1.configs; print('open_r1 import ok')"
python -c "import torch; print('cuda', torch.cuda.is_available(), 'devices', torch.cuda.device_count())"

Important caveats:

  • Full GRPO training and model evaluation require large VLM checkpoints, datasets/images, CUDA GPUs, and often FlashAttention/DeepSpeed-compatible CUDA tooling.
  • The source inspected for this skill had two import hazards: grpo_jsonl.py uses a non-package utils.math import path, and glm_module.py references Glm4vForConditionalGeneration, which is not present in the pinned transformers==4.49.0 stack. Treat GLM as unverified until the environment is repaired and smoke-tested.
  • Ascend deployment recipes are hardware-specific. This skill preserves vllm-ascend and XLLM command templates but does not claim NPU verification.

Common workflow shape

  1. Confirm the user's target: training, data/reward validation, module extension, evaluation, or serving.
  2. Load the matching sub-skill rather than using root-level memory.
  3. Prefer bundled scripts for dry-runs, validators, command rendering, and offline scoring.
  4. For expensive workflows, run safe checks first: script --help, dry-run command rendering, JSONL validation, package import checks, CUDA/NPU visibility probes.
  5. Only execute full training, model loading, server startup, downloads, or benchmark runs after the user confirms the required hardware, data, model paths, credentials, runtime, and budget.

Useful bundled scripts

04 同仓库更多 Skills

VectorSpaceLab
VectorSpaceLab/AREX-Skill

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.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

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.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

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.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

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.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

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.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

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).

★ 351