AGENT SKILL

paddlevit

Guide PaddleViT computer-vision workflows for transformer and MLP image classification, object detection, semantic segmentation, DINO self-supervision, GANs, configuration, distributed/AMP execution, and Paddle deployment with explicit data, backend, and checkpoint boundaries.

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

01 前言 Front Matter

name
paddlevit
license
Apache 2.0
metadata
{ "disco-role": "operating" }
description
Guide PaddleViT computer-vision workflows for transformer and MLP image classification, object detection, semantic segmentation, DINO self-supervision, GANs, configuration, distributed/AMP execution, and Paddle deployment with explicit data, backend, and checkpoint boundaries.
disable-model-invocation
true

02 资源文件 7

03 SKILL.md 正文

PaddleViT

Use this skill when a task names PaddleViT/PPViT, its standalone model folders, PaddlePaddle vision transformers, or a workflow that matches one of its classification, detection, segmentation, self-supervised, GAN, or export surfaces. PaddleViT is a collection of source-rooted projects, not one installable Python package: each model folder commonly has its own config.py, model module, dataset code, and entry script.

Start with a bounded plan

Before writing a command, record:

  1. task family and exact model directory;
  2. operation: inspect, configure, train, evaluate, predict, export, or port;
  3. YAML config, recursive BASE files, data root/split, checkpoint prefix, and output directory;
  4. expected device (cpu, one CUDA device, or distributed CUDA), budget, and whether downloads or long training are permitted;
  5. preprocessing (channel order, resize/crop, normalization) and expected output shape/metric.

Run the read-only environment probe before attributing failures to a model:

python scripts/check_paddlevit_environment.py --help
python scripts/check_paddlevit_environment.py --json

Install PaddlePaddle using the official wheel that matches the host and CUDA runtime. The repository documents PaddlePaddle 2.1-era APIs; current releases may need a per-model smoke or a small compatibility patch. Add yacs and pyyaml for the shared configuration pattern. Segmentation additionally uses OpenCV, SciPy, and cityscapesScripts; COCO detection uses pycocotools; GAN LSUN workflows use lmdb. Do not install every optional dependency or download weights/data merely to inspect a config.

Route by user intent

  • Classification: ViT, DeiT, Swin, VOLO, CSwin, PVTv2, BEiT, mobile/MLP/Conv/Rep families, MAE fine-tuning, ImageNet-style data, and facial-expression Swin.
  • Detection: DETR, Swin/PVTv2 detection, COCO layout, transforms, matching, RPN/RoI/FPN, train/eval and post-process.
  • Segmentation: SETR, UperNet, DPT, Segmenter, Trans2Seg, SegFormer, TopFormer, dataset layouts, demo and mIoU validation.
  • Self-supervised: DINO multi-crop teacher/student training, checkpoint/resume, AMP and multi-GPU boundaries.
  • Generative: TransGAN, Styleformer, CIFAR/STL10/CelebA/LSUN-LMDB data and FID/PSNR/SSIM evaluation.
  • Deployment and operations: config precedence, environment diagnosis, AMP/distributed launch, static export, Paddle Inference, prediction, quantization and optional weight port.

Read model-catalog.md when a request does not name a model family. Read configuration.md when YAML, CLI overrides, source-root imports, or checkpoint paths are involved. Read troubleshooting.md before retrying an import, backend, data, export, or checkpoint failure.

Source-root discipline

Run one family in one fresh process. Put only the selected model directory (and its documented sibling utilities) on PYTHONPATH; many folders contain bare modules named config, datasets, utils, or models. Never combine several model directories in one interpreter and assume imports are unambiguous. Generated helper scripts are source-independent and must not be used as proof that a source model's current API is compatible.

Evidence and safety gates

A config parse, dependency import, or tiny CPU forward does not prove CUDA, AMP, distributed, dataset, checkpoint, or benchmark behavior. For GPU claims, run a tiny operation on the requested CUDA device. For a real metric, require a real compatible split and checkpoint. Treat training, multi-scale/slide segmentation, COCO evaluation, DINO ImageNet pretraining, GAN FID, multi-GPU launch, export, quantization, and cross-framework porting as explicit operations with an approved output path and stop condition.

Do not overwrite checkpoints, delete demo output trees, mutate a dataset, or fetch external weights/data without explicit authorization. Prefer a new output prefix and read-only preflight. Record the source commit and effective config in any downstream experiment handoff; consult repo-provenance.md before deciding whether a checkout is stale.

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