AGENT SKILL

open-flamingo

Use OpenFlamingo for vision-language model initialization, image-conditioned generation, distributed training, benchmark evaluation, RICES, MMC4/WebDataset conversion, and VQA-style result preparation.

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

01 前言 Front Matter

name
open-flamingo
license
MIT
metadata
{ "disco-role": "operating" }
description
Use OpenFlamingo for vision-language model initialization, image-conditioned generation, distributed training, benchmark evaluation, RICES, MMC4/WebDataset conversion, and VQA-style result preparation.
disable-model-invocation
true

02 资源文件 5

03 SKILL.md 正文

OpenFlamingo repo skill

Use this skill when a task involves the OpenFlamingo (open_flamingo) package, Flamingo-style vision-language models, OpenCLIP vision encoders plus causal language models, interleaved image/text prompts, training on LAION/MMC4, benchmark evaluation, RICES feature caches, or OpenFlamingo data-preparation utilities.

Do not treat this skill as proof that a full model, dataset, or benchmark run already succeeded. Full generation, training, RICES, and evaluation require caller-provided checkpoints, datasets, cache/network permission, hardware, and time budget. The bundled scripts are safe preflight helpers and command builders unless the user explicitly asks to execute a generated command.

Install and environment preflight

  1. Install the package for the intended workflow:
    • model usage: pip install open-flamingo
    • training: install the package with training requirements
    • evaluation: install the package with evaluation requirements and ensure scikit-learn is present
  2. Read model zoo and compatibility before selecting released checkpoints, dependency pins, or offline cache behavior.
  3. Run scripts/check_open_flamingo_env.py for a safe import/signature/entrypoint check. It does not instantiate models or download assets.
  4. If package layout or dependency versions differ substantially from repo provenance, refresh this skill before relying on detailed commands.

Route by task

User task Read this
Initialize create_model_and_transforms, load checkpoints, prepare <image> prompts, run forward()/generate(), or debug vision_x and media cache behavior model-usage
Build or troubleshoot OpenFlamingo training/fine-tuning commands, DDP/FSDP, LAION/MMC4 shard inputs, checkpoints, precision, or W&B training
Configure benchmark evaluation, supported dataset paths, EvalModel, metrics, result JSON, or RICES feature caches evaluation
Convert/validate MMC4/WebDataset data, check LAION/MMC4 schemas, or fill VQAv2/VizWiz test-dev result files data-preparation
Diagnose install/import/dependency/cache/backend problems before choosing a workflow cross-cutting troubleshooting

High-value identifiers

  • Public import: from open_flamingo import create_model_and_transforms, Flamingo
  • Package version in this snapshot: open_flamingo 2.0.1
  • Core model API: create_model_and_transforms(...) -> (model, image_processor, tokenizer)
  • Special tokens: <image> and <|endofchunk|>
  • Model media tensor: vision_x shaped B x T_img x F x C x H x W; OpenFlamingo supports F=1
  • Training data families: LAION image/text WebDataset shards and MMC4 interleaved JSON/base64 WebDataset shards
  • Evaluation families: COCO, Flickr30K, VQAv2, OK-VQA, TextVQA, VizWiz, ImageNet, Hateful Memes

Safe helpers bundled with this skill

Workflow guardrails

  • Do not hand-run full training/evaluation/generation until the user provides local data/checkpoints or authorizes downloads and runtime cost.
  • Prefer local cache paths and use_local_files=True for offline model initialization tasks.
  • For evaluation, install requirements-eval.txt or add scikit-learn if evaluate.py fails on sklearn.metrics.
  • If PyTorch imports but Transformers says PyTorch is unavailable, check the torch/Transformers compatibility note in model zoo and compatibility.
  • Use the bundled training/evaluation wrappers instead of checkout-relative script paths; they locate the installed package and fix OpenFlamingo's local import quirks.
  • For VQA test-dev submissions, local accuracy may be unavailable without private annotations; use data-preparation to format complete submission files.

Provenance and routing metadata

  • Read repo provenance when checking staleness or before refreshing the skill.
  • references/repo-routing-metadata.json records the structured router placement for managed repo-skill import. This production run intentionally did not import the skill because the user requested no import.

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