AGENT SKILL

llava

Guides LLaVA vision-language model inference, serving, training, fine-tuning, evaluation, benchmark conversion, checkpoint utilities, and troubleshooting.

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

01 前言 Front Matter

name
llava
license
Apache 2.0
metadata
{ "disco-role": "operating" }
description
Guides LLaVA vision-language model inference, serving, training, fine-tuning, evaluation, benchmark conversion, checkpoint utilities, and troubleshooting.
disable-model-invocation
true

02 资源文件 6

03 SKILL.md 正文

LLaVA Repo Skill

Use this skill when a task involves the LLaVA package: Large Language and Vision Assistant, visual instruction tuning, image-question chat, multimodal model workers, LLaVA fine-tuning, LoRA/QLoRA, LLaVA benchmark evaluation, or checkpoint utilities.

This skill is self-contained for operating the public llava package. Do not rely on a source checkout being present. Use the bundled references and scripts here instead of reopening original repository docs or scripts.

First checks

  1. Confirm the package and backend with scripts/check_install.py:
python scripts/check_install.py --require-cuda
  1. For installation and dependency pin notes, read references/install-and-compatibility.md.
  2. For model families, checkpoint types, and license reminders, read references/model-overview.md.
  3. For repository staleness checks, read references/repo-provenance.md.

Route by task

User task Read
Run one image prompt, inspect load_pretrained_model, choose conversation mode, launch CLI, controller, worker, or Gradio UI sub-skills/chat-and-serve/SKILL.md
Prepare custom training JSON, choose pretrain/fine-tune/LoRA/QLoRA commands, validate image paths, pick DeepSpeed config, merge LoRA, apply deltas, consolidate checkpoints sub-skills/train-and-finetune/SKILL.md
Evaluate custom VQA data, run benchmark-style inference, chunk across GPUs, validate question/answer JSONL, convert submissions, understand GPT/OpenAI judge caveats sub-skills/evaluate-and-benchmark/SKILL.md

Common operating rules

  • Actual LLaVA generation, model workers, benchmark inference, and training are GPU-centered workflows. CPU checks can verify imports, parsers, data conversion, and JSON validation, but they do not validate generation quality or CUDA memory behavior.
  • The package metadata pins core runtime versions tightly, including torch==2.1.2, torchvision==0.16.2, transformers==4.37.2, tokenizers==0.15.1, and accelerate==0.21.0. Treat unpinned upgrades as a likely source of import errors.
  • The training extra adds DeepSpeed, Ninja, and W&B. Optional acceleration paths such as FlashAttention, xFormers, SGLang, MPS, Intel dGPU/CPU, and OpenAI-based judging need separate installation or credentials and are not covered by a basic install check.
  • Prefer python -m llava... module invocations for public package workflows. If a bundled helper prints a command, review it before running because model downloads, datasets, GPU memory, ports, and credentials may still be required.
  • Keep data paths, checkpoint paths, and output directories explicit. Many original examples assumed repository-local folders; this generated skill uses placeholders and bundled validators instead.

Minimal public install sketch

conda create -n llava python=3.10 -y
conda activate llava
pip install --upgrade pip
pip install -e .
# For training workflows only:
pip install -e ".[train]"
# Optional, hardware-specific acceleration when you choose to use it:
# pip install flash-attn --no-build-isolation

If you are not in a source checkout, install the published package or a pinned VCS/archive build that matches the provenance baseline in references/repo-provenance.md. Do not copy private environment paths into user-facing outputs.

Troubleshooting map

Before making claims

Run the nearest bundled diagnostic or validator before telling a user that an environment, data file, benchmark output, or command is ready. If a requested workflow needs a large checkpoint, dataset download, external judge, long training run, or unavailable hardware, state the limitation explicitly and provide the safe preparation steps instead of fabricating a pass.

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