AGENT SKILL

qwen-vl-series-finetune

Route Qwen-VL-series multimodal fine-tuning, preference training, classification, adapter merge, and Gradio serving tasks.

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

01 前言 Front Matter

name
qwen-vl-series-finetune
license
Apache 2.0
metadata
{ "disco-role": "operating" }
description
Route Qwen-VL-series multimodal fine-tuning, preference training, classification, adapter merge, and Gradio serving tasks.
disable-model-invocation
true

02 资源文件 52

03 SKILL.md 正文

Qwen-VL Series Finetune

Use this repo skill for the public Qwen-VL-series training repo that fine-tunes Qwen2-VL, Qwen2.5-VL, Qwen3-VL, and Qwen3.5 multimodal models with Hugging Face, DeepSpeed, PEFT, TRL, and Liger.

This skill is a router, not a monolithic manual. Start here, then follow the sub-skill that matches the user request.

What this skill covers

  • Multimodal dataset preparation and validation for SFT, DPO, GRPO, and classification.
  • Supervised fine-tuning, including full finetuning, LoRA, vision LoRA, video training, and evaluation during training.
  • Preference training with DPO and GRPO, including reasoning fields and Liger GRPO options.
  • Sequence classification training, custom heads, class-imbalance losses, and early stopping.
  • Adapter merging and Gradio inference for merged or adapter-backed models.

Route map

  • sub-skills/data-and-multimodal/ — build or validate JSON datasets, image/video path handling, token formatting, and reasoning fields.
  • sub-skills/sft-training/ — full SFT, LoRA/QLoRA, vision LoRA, video finetuning, and DeepSpeed launch planning.
  • sub-skills/preference-training/ — DPO and GRPO workflows, reward functions, and reasoning-aware preference data.
  • sub-skills/classification-training/ — sequence classification labels, losses, metrics, and early stopping.
  • sub-skills/serving-and-adapters/ — LoRA merge, model loading, and Gradio inference.

Read first

  • references/install.md for install and inspection-environment guidance.
  • references/bundled-runtime.md for the bundled src/ tree, DeepSpeed configs, and executable training/merge/serving helpers.
  • references/workflow-map.md for the fastest path from user request to sub-skill.
  • references/data-formats.md for shared JSON schemas and media/routing rules.
  • references/cli-reference.md for the main entry points and key flags.
  • references/model-compatibility.md for model-family and backend caveats.
  • references/troubleshooting.md for the most common setup and runtime failures.

Minimal environment check

Before any CUDA-heavy task, run the bundled diagnostic:

  • scripts/check_environment.py

Use it to confirm package imports, CUDA visibility, and optional serving dependencies without downloading weights or datasets.

Operating rules

  • Keep runtime paths inside this skill tree; do not point future agents back to the source checkout.
  • Use the bundled src/ entrypoints and DeepSpeed configs here; command helpers run from the skill root and set PYTHONPATH=src.
  • Use the bundled scripts and references here instead of the original repo launch scripts.
  • Treat CPU help/import checks as valid only for parser, schema, and pure-Python utilities.
  • Treat actual training, multimodal generation, Gradio serving, and adapter merge as CUDA workflows.
  • For Qwen3.5, prefer --disable_flash_attn2 True unless the user explicitly needs another backend.
  • For video workflows, prefer the PyAV/FFmpeg path documented in the references and treat fps/nframes as mutually exclusive.

Good first questions

If the user asks for something broad, ask which workflow they want:

  • data preparation or validation
  • supervised finetuning
  • DPO or GRPO
  • classification training
  • merge or serve

If the user already named one of those workflows, jump directly to that sub-skill.

Provenance and router metadata

  • references/repo-provenance.md records the source checkout state.
  • references/repo-routing-metadata.json records the managed router placement used by import tooling.

Safe default

If the user asks for a command, prefer a dry-run or command-builder script first, then the execution command after the data, model, and backend assumptions are explicit.

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