AGENT SKILL

architecture-api

Inspect and modify D-FINE architecture, registry, YAMLConfig, model components, deploy mode, and API behavior.

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

01 前言 Front Matter

name
architecture-api
license
Apache 2.0
metadata
{ "disco-role": "operating" }
description
Inspect and modify D-FINE architecture, registry, YAMLConfig, model components, deploy mode, and API behavior.
disable-model-invocation
true

02 资源文件 4

03 SKILL.md 正文

D-FINE Architecture and API Router

Use this sub-skill when a task is about D-FINE internals rather than just running a training or inference command: YAML registry construction, component names in configs, model assembly, D-FINE decoder behavior, deploy mode, criterion/postprocessor APIs, checkpoint shape mismatches, or adding a custom component.

Route here for

  • Explaining how YAMLConfig, GLOBAL_CONFIG, register(), and create() turn YAML type names into Python objects.
  • Inspecting model components such as DFINE, HGNetv2, HybridEncoder, DFINETransformer, DFINECriterion, HungarianMatcher, and DFINEPostProcessor.
  • Diagnosing The module ... is not registered, Missing inject config, invalid type entries, or component channel/stride mismatches.
  • Understanding deploy-mode conversion before ONNX export or inference.
  • Planning code changes for a new backbone, encoder, decoder, criterion, matcher, postprocessor, optimizer, transform, dataset, or evaluator.
  • Checking a config/model safely with scripts/inspect_dfine_model.py before long training or export.

Route away

First actions

  1. Read references/api-reference.md for verified signatures, registry semantics, and component relationships.
  2. Read references/model-architecture.md when the task asks about D-FINE, FDR/GO-LSD-related knobs, model sizes, deploy mode, or component responsibilities.
  3. Run python scripts/inspect_dfine_model.py --repo-root <d-fine-checkout> --config <config.yml> --build-model for a safe import/config/model probe. Add --allow-pretrained only when the user wants pretrained backbone lookup/download behavior.
  4. For errors, use references/troubleshooting.md before editing code or config.

Safety and evidence rules

  • Disable HGNetv2 pretrained lookup for inspection unless the user explicitly wants to test pretrained weight availability.
  • Treat config keys and registered class names as case-sensitive.
  • Prefer inspecting config construction and parameter counts before attempting a dummy forward; full forward, training, or evaluation can be slow and data/backend dependent.
  • When adding a component, update both the Python registration/import path and the YAML type/injection references that select it.

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