AGENT SKILL

image-architectures

Routes vit-pytorch 2D image classification backbones, architecture-family selection, constructor shape constraints, and image-only variant troubleshooting.

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

01 前言 Front Matter

name
image-architectures
license
MIT
metadata
{ "disco-role": "operating" }
description
Routes vit-pytorch 2D image classification backbones, architecture-family selection, constructor shape constraints, and image-only variant troubleshooting.
disable-model-invocation
true

02 资源文件 3

03 SKILL.md 正文

image-architectures

Use this sub-skill when the user wants a vit-pytorch model that consumes a regular image tensor shaped (batch, channels, height, width) and returns classification logits, or when they need to choose among the 2D architecture zoo.

Route here for

  • Baseline image classifiers: ViT, SimpleViT, DeepViT, CaiT, T2TViT, and CCT.
  • Multi-scale or hierarchical 2D image classifiers: CrossViT, PiT, LeViT, CvT, TwinsSVT, RegionViT, CrossFormer, ScalableViT, SepViT, MaxViT, NesT, MobileViT, XCiT, JetViT, and ViT-5.
  • Image-only variants: patch dropout, patch merger, small-dataset SPT/LSA, QK-norm, relative projected position bias, specialized CLS, value residual, KEEL post-LN, local/rotary/normalized/look/detection-pooling variants, and simple_flash_attn_vit as a PyTorch SDPA-backed image classifier.
  • Practical tasks such as selecting a small-memory backbone for 32x32 or 64x64 tensors, repairing image_size / patch_size divisibility errors, choosing pool='cls' vs pool='mean', and keeping README-style examples small enough for CPU smoke checks.

Route elsewhere

  • Variable-resolution image lists, grouped NaViT packing, nested tensors, 1D/3D/N-D tensors, medical/video tensors, or ViViT: route to variable-shapes-video.
  • Distillation, MAE/SimMIM/MPP/MP3/DINO/EsViT and other loss/pretraining/adaptation wrappers: route to pretraining-and-adaptation.
  • Attention maps, embeddings, hook wrappers, external efficient/custom transformer injection, and Recorder/Extractor usage: route to introspection-and-customization.

First steps for future agents

  1. Confirm the input is a fixed-size 4D image batch and the desired output is logits. If the user has variable image sizes, videos, patch-token outputs, or training losses, stop and route as above.
  2. Read references/model-overview.md to pick a family. Start with ViT / SimpleViT / CCT for baselines, use hierarchical families only when the user needs local windows, convolutional stems, mobile efficiency, or multi-scale structure.
  3. Keep constructors tiny until the shape works. For 32x32 or 64x64 tests, use dimensions like dim=32, depth=1, heads=2, dim_head=16, mlp_dim=64, and small num_classes; do not copy large README dimensions unless the user is explicitly benchmarking.
  4. Check shape constraints before instantiating: image_size and patch_size must divide exactly for patch-based families; many hierarchical/window families also require input feature-map sizes divisible by their window or stage settings.
  5. For classifier heads, set a positive num_classes. In base ViT-style classes, pool='cls' and pool='mean' are the valid pooling choices when that argument exists; many SimpleViT-style and hierarchical classes hard-code mean/global pooling and do not accept pool.
  6. If a constructor or forward pass fails, read references/troubleshooting.md before changing families.
  7. Use the bundled smoke helper for safe CPU checks: python scripts/smoke_image_architectures.py --case quick. It uses reduced random tensors, asserts logits shapes, and never downloads data.

Bundled runtime files

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