core-models
Use this repo skill for Swin Transformer model construction, architecture inspection, tensor-shape checks, and CPU model smoke tests across Swin V1, Swin V2, Swin-MLP, and SimMIM encoder variants.
- License 许可
- MIT
- 最近更新
- 2026-10-08
- Stars
- ★ 11
- Forks
- 3
01 前言 Front Matter
- name
- core-models
- license
- MIT
- metadata
- { "disco-role": "operating" }
- description
- Use this repo skill for Swin Transformer model construction, architecture inspection, tensor-shape checks, and CPU model smoke tests across Swin V1, Swin V2, Swin-MLP, and SimMIM encoder variants.
- disable-model-invocation
- true
02 资源文件 3
- 参考文档references/api-reference.md3.2 KB
- 参考文档references/model-construction.md1.9 KB
- 参考文档references/troubleshooting.md1.6 KB
03 SKILL.md 正文
core-models
Use this sub-skill when the task is about the model classes themselves: which constructor to use, how build_model dispatches on MODEL.TYPE, which config fields control architecture shape, how window partitioning works, or how to run a small CPU smoke check without touching the training loops.
What this sub-skill covers
build_model(config, is_pretrain=False)dispatch forswin,swinv2,swin_moe, andswin_mlp.SwinTransformer,SwinTransformerV2, andSwinMLPsignatures and the config fields they read.- SimMIM encoder construction through
models/simmim.pywhen the question is about the encoder object or a tiny reconstruction smoke. - Window helper behavior: partition/reverse shapes, shifted windows, and why image size and window size must be compatible.
- CPU-only sanity checks: instantiate a small model, count parameters, and run a minimal forward pass.
What it does not cover
- ImageNet folder/zip/22K data-layout problems: use
data-and-checkpoints. - Training, fine-tuning, evaluation, throughput, DDP, or AMP command composition: use
training-eval-cli. - SimMIM end-to-end scripts and checkpoint remapping details: use
simmim-workflows. - MoE/Tutel/Apex/fused CUDA questions: use
moe-and-acceleration.
Typical user triggers
- "Which config should I use for SwinV2-Tiny?"
- "What does
MODEL.TYPEneed for Swin-MLP?" - "Why does my image/window size break the model constructor?"
- "How can I build a tiny CPU smoke test for
build_model?" - "What is the difference between Swin V1 and Swin V2 position bias behavior?"
Core workflow
- Read the config family map in
references/model-construction.md. - Confirm the model family from
MODEL.TYPEand the config file path. - Check the relevant constructor signature in
references/api-reference.md. - If the request is about safe inspection, run
scripts/smoke_model_build.pywith a repo checkout and a small config override. - If the request is about a constructor error, read
references/troubleshooting.mdfor the shape mismatch or optional-backend warning.
Safe checks
- Building a tiny CPU model is safe when
DATA.IMG_SIZE,MODEL.*.WINDOW_SIZE, and the stage depths are reduced consistently. - The helper script does not download weights or start distributed training.
- Optional fused window-process warnings are expected when the CUDA extension is missing; they are not baseline failures.
Related references and scripts
- Read
references/api-reference.mdfor verified signatures and the key architecture fields. - Read
references/model-construction.mdwhen choosing a config family or reducing a config for smoke tests. - Read
references/troubleshooting.mdfor common constructor and shape errors. - Run
scripts/smoke_model_build.pywhen you want a tiny CPU construction check.
04 同仓库更多 Skills
obsidian-clipper-template-creator
Guide for creating templates for the Obsidian Web Clipper. Use when you want to create a new clipping template, understand available variables, or format clipped content.
obsidian-clipper-template-creator
Guide for creating templates for the Obsidian Web Clipper. Use when you want to create a new clipping template, understand available variables, or format clipped content.
python-api
Programmatic Object-Detection-Metrics API guidance for BoundingBox, BoundingBoxes, Evaluator, enums, coordinate conversion, AP/mAP semantics, and source-style import diagnostics.
file-evaluation
Folder-based PASCAL VOC AP/mAP evaluation from ground-truth and detection text files.
object-detection-metrics
Guides legacy Object-Detection-Metrics PASCAL VOC AP/mAP evaluation from detection text folders and direct Python API classes.
nx-workspace-patterns
Configure and optimize Nx monorepo workspaces. Use when setting up Nx, configuring project boundaries, optimizing build caching, or implementing affected commands.