[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M792D8EAQSNQRSDN9XA90QK3":3,"skill-same:01M792D8EAQSNQRSDN9XA90QK3":71},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":27,"commitSha":28,"skillDirectory":29,"forksCount":30,"repositoryHtmlUrl":31,"repositoryHomepageUrl":6,"ownerHtmlUrl":32,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":33,"install":34,"resources":46},"01M792D8EAQSNQRSDN9XA90QK3","self-supervised",null,"Use for PaddleViT's DINO self-supervised vision-transformer pretraining, multi-crop data contracts, teacher\u002Fstudent configuration, single- or multi-GPU launch planning, checkpoint\u002Fresume handling, and optional PyTorch-to-Paddle weight-porting boundaries.","VectorSpaceLab\u002FAREX-Skill","VectorSpaceLab","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F180637102?v=4","01M7538C5WPSJGWF7KHR4EFZ9F","01M7538C6R2GFP53NPXTCZNBRT",351,"Apache-2.0","https:\u002F\u002Fgithub.com\u002FVectorSpaceLab\u002FAREX-Skill\u002Fblob\u002Fmain\u002Fskills\u002Frepositories\u002Frepo-skills\u002Fpaddlevit\u002Fsub-skills\u002Fself-supervised\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: self-supervised\ndescription: \"Use for PaddleViT's DINO self-supervised vision-transformer\n  pretraining, multi-crop data contracts, teacher\u002Fstudent configuration, single-\n  or multi-GPU launch planning, checkpoint\u002Fresume handling, and optional\n  PyTorch-to-Paddle weight-porting boundaries.\"\ndisable-model-invocation: true\nmetadata:\n  disco-role: operating\nlicense: Apache 2.0\n---\n\n# PaddleViT DINO self-supervised learning\n\nUse this sub-skill when a task names `self_supervised_learning\u002Fdino`, DINO\npretraining, multi-crop augmentation, a DINO teacher\u002Fstudent checkpoint, or\nporting a DINO ViT backbone into Paddle. It is an operating guide for the\nPaddleViT checkout, not a promise that every released script is runnable as-is.\nKeep the source checkout and this skill's evidence boundary explicit.\n\n## Applicability and hard boundaries\n\n- The supported end-to-end data path is the ImageNet2012-style path consumed by\n  `ImageNet2012Dataset`: `DATA.DATA_PATH\u002Ftrain_list.txt` and\n  `DATA.DATA_PATH\u002Fval_list.txt`, with image paths relative to that directory.\n  Each line is `\u003Crelative-image-path> \u003Cinteger-label>`; labels are ignored by\n  DINO but are still required by the dataset reader.\n- Actual DINO training needs `DATA.DATASET=imagenet2012`. The CIFAR branches in\n  `datasets.py` return a single transformed tensor and therefore do not satisfy\n  the multi-crop contract used by `main_*_gpu.py`.\n- One training sample is transformed into two global views at\n  `DATA.IMAGE_SIZE` and `DATA.LOCAL_CROPS_NUMBER` local views at\n  `DATA.SMALL_CROP_IMAGE_SIZE`. Defaults are 2 global + 10 local views, 224\u002F96\n  pixels, global scale `[0.25, 1.0]`, and local scale `[0.05, 0.25]`.\n- The teacher receives only `images[:2]`; the student receives all crops. Crop\n  tensors must be batched, normalized with the configured ImageNet mean\u002Fstd,\n  and grouped by spatial size because `MultiCropWrapper` groups consecutive\n  equal-width crops.\n- This skill does not authorize downloading ImageNet, checkpoints, or external\n  repositories, nor starting benchmark-scale or long-running pretraining.\n  Prefer config checks, import checks, synthetic tensors, and a bounded one-step\n  smoke. State the required dataset, GPU count, wall-time, and output directory\n  before proposing a real run.\n- `torch`, `timm`, and the PyTorch DINO hub model are optional porting\n  dependencies. They are not required for Paddle DINO training and are absent\n  from the inspected environment; do not install or fetch them implicitly.\n\n## Evidence and source map\n\nPrimary evidence is the pinned checkout's\n`self_supervised_learning\u002Fdino\u002F{README.md,config.py,datasets.py,transformer.py,utils.py,main_dino_single_gpu.py,main_dino_multi_gpu.py,run_train_multi.sh}`\nand `self_supervised_learning\u002Fdino\u002Fport_weights\u002Fload_pytorch_weights.py`.\nCross-cutting launch, configuration, AMP, and porting guidance is in\n`docs\u002Fpaddlevit-{config,multi-gpu,amp,port-weights}.md`. The source is an\nolder Paddle implementation (Paddle 2.1-era assumptions); use the bundled\nscripts for bounded checks and treat source defects below as evidence, not as\nsilent corrections.\n\n## Configuration procedure\n\n1. Start from `self_supervised_learning\u002Fdino\u002Fconfigs\u002Fvit_small_patch16_224.yaml`\n   or `vit_base_patch16_224.yaml`; pass it with `-cfg` from the DINO directory.\n   YAML is merged into the defaults in `config.py`, then CLI values override\n   selected fields. Use the same effective config for model construction and\n   record it with the run.\n2. Check the coupled dimensions before launch:\n   `IMAGE_SIZE % PATCH_SIZE == 0`, `SMALL_CROP_IMAGE_SIZE % PATCH_SIZE == 0`,\n   `EMBED_DIM % NUM_HEADS == 0`, positive `OUT_DIM`, two ordered crop-scale\n   bounds in `(0, 1]`, and `LOCAL_CROPS_NUMBER >= 1`. Run\n   `scripts\u002Fcheck_dino_config.py --config \u003Cyaml>`; it is read-only.\n3. Preserve the DINO defaults unless a bounded experiment justifies a change:\n   AdamW, cosine LR\u002Fweight-decay schedules, teacher momentum warming toward 1,\n   teacher temperature warmup, `FREEZE_LAST_LAYER`, and `OUT_DIM=65536`.\n   Note that the README says weight-decay scheduling was not supported in the\n   2022 release, while the current code computes a schedule; verify the actual\n   checkout before relying on that behavior.\n4. Set `DATA.BATCH_SIZE` per GPU, not global batch size. Scale effective batch\n   size and learning rate deliberately when changing GPU count; the source\n   does not automatically apply the documented linear-LR convention.\n5. Treat `MODEL.PRETRAINED` as a backbone\u002Fmodel-state input only after checking\n   the exact state-dict shape and naming. A DINO run needs student\u002Fteacher\u002Fhead\n   compatibility, not merely a classification checkpoint.\n\nSee [references\u002Fconfiguration.md](references\u002Fconfiguration.md) for the field\ncontract and [scripts\u002Fcheck_dino_config.py](scripts\u002Fcheck_dino_config.py) for\nsafe validation.\n\n## Teacher\u002Fstudent and multi-crop procedure\n\nThe intended construction is two ViTs with shared initial state: the student\nuses configured stochastic depth and the teacher is rebuilt with `DROPPATH=0`.\nEach is wrapped by `MultiCropWrapper` and a `DINOHead`; teacher parameters have\n`stop_gradient=True`. The student is optimized; the teacher is updated after\neach step by EMA using `MOMENTUM_TEACHER`'s cosine schedule. `DINOLoss` sharpens\nand centers the teacher output, compares the two teacher global views against\nall nonmatching student views, and maintains a center buffer.\n\nFor a synthetic check, use two `[B,3,32,32]` global tensors and two or more\n`[B,3,16,16]` local tensors with a tiny ViT config. Do not infer ImageNet\naccuracy from this check. Run:\n\n```bash\npython scripts\u002Fdino_model_smoke.py --help\npython scripts\u002Fdino_model_smoke.py --repo-root \u002Fpath\u002Fto\u002FPaddleViT --device cpu\n# On a prepared CUDA host, use --device gpu:0 (no dataset or download).\n```\n\nA successful bounded smoke should show model construction, crop shapes, a\nstudent\u002Fteacher forward, finite DINO logits\u002Floss, and no parameter update on\nthe teacher. If the checkout's wrapper\u002FAPI fails, retain the diagnostic and do\nnot claim training compatibility; do not hide it by downloading PyTorch.\n\n## Launch procedure and backend gates\n\n### Single GPU\n\nUse the single-process entrypoint only after config and smoke checks:\n\n```bash\nCUDA_VISIBLE_DEVICES=0 python main_dino_single_gpu.py \\\n  -cfg=.\u002Fconfigs\u002Fvit_small_patch16_224.yaml \\\n  -dataset=imagenet2012 -batch_size=32 \\\n  -data_path=\u002Fdataset\u002Fimagenet -output=.\u002Foutput -amp\n```\n\n`-batch_size` is per GPU. AMP uses `paddle.amp.auto_cast` and `GradScaler`;\nrepository docs limit FP16 AMP claims to NVIDIA Ampere, Volta, and Turing.\nRequire a CUDA Paddle build and a successful CUDA tensor\u002Flayer smoke before\nusing `-amp`. CPU is suitable for import\u002Ftiny checks only, not this training\nclaim.\n\n### Single-node multi GPU\n\nThe source launcher uses `paddle.distributed.spawn`, initializes one worker per\nvisible GPU, wraps models in `paddle.DataParallel`, uses\n`DistributedBatchSampler`, and all-reduces loss\u002Fcenter statistics. Use an\nexplicit device list and `-ngpus` matching it; a distributed run requires NCCL\nand multiple usable CUDA devices:\n\n```bash\nCUDA_VISIBLE_DEVICES=0,1 python main_dino_multi_gpu.py \\\n  -ngpus=2 -cfg=.\u002Fconfigs\u002Fvit_small_patch16_224.yaml \\\n  -dataset=imagenet2012 -batch_size=16 -data_path=\u002Fdataset\u002Fimagenet -amp\n```\n\nThe repository's `run_train_multi.sh` is an eight-GPU, long-running ImageNet\nlauncher and is reference-only. Do not execute it during skill use. Validate\nworld size, rank, sampler partitioning, and rendezvous in a short controlled\njob before any real run. Do not call one-GPU execution a multi-GPU pass.\n\n### Known source hazards to check before a real launch\n\nThe inspected scripts contain apparent defects that a user must resolve or\npatch in a controlled copy and then re-run the bounded checks for:\n\n- single-GPU `train` returns two values but `main` unpacks three; later code\n  references `local_logger`, `model`, and `scheduler` inconsistently;\n- both entrypoints contain `params_gropus`\u002F`params_groups` inconsistency;\n- pretrain\u002Fresume code references `model` instead of the student\u002Fteacher model;\n- resume and save paths have inconsistent DINO-loss suffixes (`._dino_loss`,\n  `_dino_loss.pdparams`, and `_dino_loss.pdprams`);\n- the config's `MODEL.NORM_LAST_LAYER` is not consistently wired into the\n  hard-coded head construction;\n- `ACCUM_ITER` is accepted but the shown loop still clears and steps every\n  batch.\n\nThese are not permission to perform an unreviewed rewrite. Record the exact\ncheckout, patch, effective config, and smoke result. If the task is only to\ninspect or plan, stop at the hazard report.\n\n## Checkpoints and resume\n\nThe intended save prefix is under `SAVE\u002Ftrain-\u003Ctimestamp>\u002F` and includes a\n`.pdparams` model state, `.pdopt` optimizer state, and a DINO-loss state. The\nteacher is the meaningful exported representation in the multi-GPU saver; the\nsource's suffix typo means you must inspect actual files rather than guessing.\nUse `TRAIN.LAST_EPOCH` consistently with the checkpoint's epoch and preserve\noptimizer state, teacher center, temperature schedule, and effective config.\nA model-only load is not an exact resume. Before resuming, assert that all\nthree expected artifacts exist, compare parameter names\u002Fshapes, and make a\ncopy or use a new output directory. Never overwrite a checkpoint silently.\n\n## Optional PyTorch weight porting\n\n`port_weights\u002Fload_pytorch_weights.py` is a separate, CPU-oriented conversion\nexample. It imports `torch`, loads `facebookresearch\u002Fdino:main` via\n`torch.hub`, maps the ViT backbone names, transposes 2-D linear weights, and\nchecks a batched output with `np.allclose`. It does not establish a full DINO\nstudent\u002Fteacher\u002Fhead conversion or checkpoint resume. Keep this route optional:\nonly use an approved isolated environment with a local PyTorch checkpoint and\nexplicit source\u002Ftarget model specifications. Manually inspect parameters and\nbuffers, preserve non-linear 2-D tensors without transpose, compare batched\noutputs, and save a new `.pdparams`; never fetch a hub model as an implicit\nstep. The current environment has no torch\u002Ftimm, so this path is unverified.\n\n## Recovery and stop conditions\n\n- Missing `train_list.txt` or wrong image-root layout: stop and report the\n  expected layout; do not download or synthesize ImageNet silently.\n- Crop count\u002Fshape mismatch or non-finite loss: stop before long training;\n  verify transform order, `LOCAL_CROPS_NUMBER + 2`, normalization, output\n  dimension, teacher temperature, and model state.\n- CUDA\u002FAMP failure: rerun the CPU import\u002Ftiny smoke, then the CUDA preparation\n  probe; mark GPU-specific behavior blocked if CUDA or the required device\n  is unavailable.\n- Distributed hang or unequal ranks: terminate the bounded job, check visible\n  devices, `-ngpus`, NCCL\u002Frendezvous, and sampler\u002Fworld-size setup. Do not\n  retry indefinitely.\n- Checkpoint mismatch: start a new output directory and use a shape\u002Fname report;\n  do not force-load incompatible heads or silently discard the teacher center.\n\n## Difficult synthetic usability cases\n\n1. **Crop-contract and teacher-EMA case:** build a tiny ViT with two 32x32\n   global views and three 16x16 local views, run one finite DINO step, assert\n   teacher outputs use two views, student outputs use five, teacher parameters\n   remain gradient-free, and EMA changes the teacher without changing crop\n   counts. No filesystem dataset or network may be used.\n2. **Resume\u002Fport boundary case:** provide a temporary checkpoint prefix with a\n   model state, optimizer state, and deliberately misspelled loss suffix, then\n   ask the agent to diagnose whether it is an exact resume and to produce a\n   non-destructive repair plan. Separately provide a fake PyTorch state mapping\n   with one transposed linear tensor; the expected result is a blocked optional\n   port report when torch is unavailable, not an install or hub download.\n\n## Handoff checklist\n\nReport the source commit, effective YAML\u002FCLI overrides, dataset layout check,\nbackend\u002Fdevice probe, smoke command and result, launch mode, per-GPU batch,\nAMP\u002Fdistributed assumptions, checkpoint prefix and suffixes, patches applied (if\nany), and unresolved source hazards. Do not claim ImageNet pretraining or\nmulti-GPU success from a synthetic smoke.\n\n## Bundled references\n\n- [workflows.md](references\u002Fworkflows.md) — bounded checks, launch templates,\n  checkpoint flow, and backend boundaries.\n- [configuration.md](references\u002Fconfiguration.md) — effective fields and\n  invariants.\n- [troubleshooting.md](references\u002Ftroubleshooting.md) — source-specific\n  failures and recovery decisions.\n","# PaddleViT DINO self-supervised learning\n\nUse this sub-skill when a task names `self_supervised_learning\u002Fdino`, DINO\npretraining, multi-crop augmentation, a DINO teacher\u002Fstudent checkpoint, or\nporting a DINO ViT backbone into Paddle. It is an operating guide for the\nPaddleViT checkout, not a promise that every released script is runnable as-is.\nKeep the source checkout and this skill's evidence boundary explicit.\n\n## Applicability and hard boundaries\n\n- The supported end-to-end data path is the ImageNet2012-style path consumed by\n  `ImageNet2012Dataset`: `DATA.DATA_PATH\u002Ftrain_list.txt` and\n  `DATA.DATA_PATH\u002Fval_list.txt`, with image paths relative to that directory.\n  Each line is `\u003Crelative-image-path> \u003Cinteger-label>`; labels are ignored by\n  DINO but are still required by the dataset reader.\n- Actual DINO training needs `DATA.DATASET=imagenet2012`. The CIFAR branches in\n  `datasets.py` return a single transformed tensor and therefore do not satisfy\n  the multi-crop contract used by `main_*_gpu.py`.\n- One training sample is transformed into two global views at\n  `DATA.IMAGE_SIZE` and `DATA.LOCAL_CROPS_NUMBER` local views at\n  `DATA.SMALL_CROP_IMAGE_SIZE`. Defaults are 2 global + 10 local views, 224\u002F96\n  pixels, global scale `[0.25, 1.0]`, and local scale `[0.05, 0.25]`.\n- The teacher receives only `images[:2]`; the student receives all crops. Crop\n  tensors must be batched, normalized with the configured ImageNet mean\u002Fstd,\n  and grouped by spatial size because `MultiCropWrapper` groups consecutive\n  equal-width crops.\n- This skill does not authorize downloading ImageNet, checkpoints, or external\n  repositories, nor starting benchmark-scale or long-running pretraining.\n  Prefer config checks, import checks, synthetic tensors, and a bounded one-step\n  smoke. State the required dataset, GPU count, wall-time, and output directory\n  before proposing a real run.\n- `torch`, `timm`, and the PyTorch DINO hub model are optional porting\n  dependencies. They are not required for Paddle DINO training and are absent\n  from the inspected environment; do not install or fetch them implicitly.\n\n## Evidence and source map\n\nPrimary evidence is the pinned checkout's\n`self_supervised_learning\u002Fdino\u002F{README.md,config.py,datasets.py,transformer.py,utils.py,main_dino_single_gpu.py,main_dino_multi_gpu.py,run_train_multi.sh}`\nand `self_supervised_learning\u002Fdino\u002Fport_weights\u002Fload_pytorch_weights.py`.\nCross-cutting launch, configuration, AMP, and porting guidance is in\n`docs\u002Fpaddlevit-{config,multi-gpu,amp,port-weights}.md`. The source is an\nolder Paddle implementation (Paddle 2.1-era assumptions); use the bundled\nscripts for bounded checks and treat source defects below as evidence, not as\nsilent corrections.\n\n## Configuration procedure\n\n1. Start from `self_supervised_learning\u002Fdino\u002Fconfigs\u002Fvit_small_patch16_224.yaml`\n   or `vit_base_patch16_224.yaml`; pass it with `-cfg` from the DINO directory.\n   YAML is merged into the defaults in `config.py`, then CLI values override\n   selected fields. Use the same effective config for model construction and\n   record it with the run.\n2. Check the coupled dimensions before launch:\n   `IMAGE_SIZE % PATCH_SIZE == 0`, `SMALL_CROP_IMAGE_SIZE % PATCH_SIZE == 0`,\n   `EMBED_DIM % NUM_HEADS == 0`, positive `OUT_DIM`, two ordered crop-scale\n   bounds in `(0, 1]`, and `LOCAL_CROPS_NUMBER >= 1`. Run\n   `scripts\u002Fcheck_dino_config.py --config \u003Cyaml>`; it is read-only.\n3. Preserve the DINO defaults unless a bounded experiment justifies a change:\n   AdamW, cosine LR\u002Fweight-decay schedules, teacher momentum warming toward 1,\n   teacher temperature warmup, `FREEZE_LAST_LAYER`, and `OUT_DIM=65536`.\n   Note that the README says weight-decay scheduling was not supported in the\n   2022 release, while the current code computes a schedule; verify the actual\n   checkout before relying on that behavior.\n4. Set `DATA.BATCH_SIZE` per GPU, not global batch size. Scale effective batch\n   size and learning rate deliberately when changing GPU count; the source\n   does not automatically apply the documented linear-LR convention.\n5. Treat `MODEL.PRETRAINED` as a backbone\u002Fmodel-state input only after checking\n   the exact state-dict shape and naming. A DINO run needs student\u002Fteacher\u002Fhead\n   compatibility, not merely a classification checkpoint.\n\nSee [references\u002Fconfiguration.md](references\u002Fconfiguration.md) for the field\ncontract and [scripts\u002Fcheck_dino_config.py](scripts\u002Fcheck_dino_config.py) for\nsafe validation.\n\n## Teacher\u002Fstudent and multi-crop procedure\n\nThe intended construction is two ViTs with shared initial state: the student\nuses configured stochastic depth and the teacher is rebuilt with `DROPPATH=0`.\nEach is wrapped by `MultiCropWrapper` and a `DINOHead`; teacher parameters have\n`stop_gradient=True`. The student is optimized; the teacher is updated after\neach step by EMA using `MOMENTUM_TEACHER`'s cosine schedule. `DINOLoss` sharpens\nand centers the teacher output, compares the two teacher global views against\nall nonmatching student views, and maintains a center buffer.\n\nFor a synthetic check, use two `[B,3,32,32]` global tensors and two or more\n`[B,3,16,16]` local tensors with a tiny ViT config. Do not infer ImageNet\naccuracy from this check. Run:\n\n```bash\npython scripts\u002Fdino_model_smoke.py --help\npython scripts\u002Fdino_model_smoke.py --repo-root \u002Fpath\u002Fto\u002FPaddleViT --device cpu\n# On a prepared CUDA host, use --device gpu:0 (no dataset or download).\n```\n\nA successful bounded smoke should show model construction, crop shapes, a\nstudent\u002Fteacher forward, finite DINO logits\u002Floss, and no parameter update on\nthe teacher. If the checkout's wrapper\u002FAPI fails, retain the diagnostic and do\nnot claim training compatibility; do not hide it by downloading PyTorch.\n\n## Launch procedure and backend gates\n\n### Single GPU\n\nUse the single-process entrypoint only after config and smoke checks:\n\n```bash\nCUDA_VISIBLE_DEVICES=0 python main_dino_single_gpu.py \\\n  -cfg=.\u002Fconfigs\u002Fvit_small_patch16_224.yaml \\\n  -dataset=imagenet2012 -batch_size=32 \\\n  -data_path=\u002Fdataset\u002Fimagenet -output=.\u002Foutput -amp\n```\n\n`-batch_size` is per GPU. AMP uses `paddle.amp.auto_cast` and `GradScaler`;\nrepository docs limit FP16 AMP claims to NVIDIA Ampere, Volta, and Turing.\nRequire a CUDA Paddle build and a successful CUDA tensor\u002Flayer smoke before\nusing `-amp`. CPU is suitable for import\u002Ftiny checks only, not this training\nclaim.\n\n### Single-node multi GPU\n\nThe source launcher uses `paddle.distributed.spawn`, initializes one worker per\nvisible GPU, wraps models in `paddle.DataParallel`, uses\n`DistributedBatchSampler`, and all-reduces loss\u002Fcenter statistics. Use an\nexplicit device list and `-ngpus` matching it; a distributed run requires NCCL\nand multiple usable CUDA devices:\n\n```bash\nCUDA_VISIBLE_DEVICES=0,1 python main_dino_multi_gpu.py \\\n  -ngpus=2 -cfg=.\u002Fconfigs\u002Fvit_small_patch16_224.yaml \\\n  -dataset=imagenet2012 -batch_size=16 -data_path=\u002Fdataset\u002Fimagenet -amp\n```\n\nThe repository's `run_train_multi.sh` is an eight-GPU, long-running ImageNet\nlauncher and is reference-only. Do not execute it during skill use. Validate\nworld size, rank, sampler partitioning, and rendezvous in a short controlled\njob before any real run. Do not call one-GPU execution a multi-GPU pass.\n\n### Known source hazards to check before a real launch\n\nThe inspected scripts contain apparent defects that a user must resolve or\npatch in a controlled copy and then re-run the bounded checks for:\n\n- single-GPU `train` returns two values but `main` unpacks three; later code\n  references `local_logger`, `model`, and `scheduler` inconsistently;\n- both entrypoints contain `params_gropus`\u002F`params_groups` inconsistency;\n- pretrain\u002Fresume code references `model` instead of the student\u002Fteacher model;\n- resume and save paths have inconsistent DINO-loss suffixes (`._dino_loss`,\n  `_dino_loss.pdparams`, and `_dino_loss.pdprams`);\n- the config's `MODEL.NORM_LAST_LAYER` is not consistently wired into the\n  hard-coded head construction;\n- `ACCUM_ITER` is accepted but the shown loop still clears and steps every\n  batch.\n\nThese are not permission to perform an unreviewed rewrite. Record the exact\ncheckout, patch, effective config, and smoke result. If the task is only to\ninspect or plan, stop at the hazard report.\n\n## Checkpoints and resume\n\nThe intended save prefix is under `SAVE\u002Ftrain-\u003Ctimestamp>\u002F` and includes a\n`.pdparams` model state, `.pdopt` optimizer state, and a DINO-loss state. The\nteacher is the meaningful exported representation in the multi-GPU saver; the\nsource's suffix typo means you must inspect actual files rather than guessing.\nUse `TRAIN.LAST_EPOCH` consistently with the checkpoint's epoch and preserve\noptimizer state, teacher center, temperature schedule, and effective config.\nA model-only load is not an exact resume. Before resuming, assert that all\nthree expected artifacts exist, compare parameter names\u002Fshapes, and make a\ncopy or use a new output directory. Never overwrite a checkpoint silently.\n\n## Optional PyTorch weight porting\n\n`port_weights\u002Fload_pytorch_weights.py` is a separate, CPU-oriented conversion\nexample. It imports `torch`, loads `facebookresearch\u002Fdino:main` via\n`torch.hub`, maps the ViT backbone names, transposes 2-D linear weights, and\nchecks a batched output with `np.allclose`. It does not establish a full DINO\nstudent\u002Fteacher\u002Fhead conversion or checkpoint resume. Keep this route optional:\nonly use an approved isolated environment with a local PyTorch checkpoint and\nexplicit source\u002Ftarget model specifications. Manually inspect parameters and\nbuffers, preserve non-linear 2-D tensors without transpose, compare batched\noutputs, and save a new `.pdparams`; never fetch a hub model as an implicit\nstep. The current environment has no torch\u002Ftimm, so this path is unverified.\n\n## Recovery and stop conditions\n\n- Missing `train_list.txt` or wrong image-root layout: stop and report the\n  expected layout; do not download or synthesize ImageNet silently.\n- Crop count\u002Fshape mismatch or non-finite loss: stop before long training;\n  verify transform order, `LOCAL_CROPS_NUMBER + 2`, normalization, output\n  dimension, teacher temperature, and model state.\n- CUDA\u002FAMP failure: rerun the CPU import\u002Ftiny smoke, then the CUDA preparation\n  probe; mark GPU-specific behavior blocked if CUDA or the required device\n  is unavailable.\n- Distributed hang or unequal ranks: terminate the bounded job, check visible\n  devices, `-ngpus`, NCCL\u002Frendezvous, and sampler\u002Fworld-size setup. Do not\n  retry indefinitely.\n- Checkpoint mismatch: start a new output directory and use a shape\u002Fname report;\n  do not force-load incompatible heads or silently discard the teacher center.\n\n## Difficult synthetic usability cases\n\n1. **Crop-contract and teacher-EMA case:** build a tiny ViT with two 32x32\n   global views and three 16x16 local views, run one finite DINO step, assert\n   teacher outputs use two views, student outputs use five, teacher parameters\n   remain gradient-free, and EMA changes the teacher without changing crop\n   counts. No filesystem dataset or network may be used.\n2. **Resume\u002Fport boundary case:** provide a temporary checkpoint prefix with a\n   model state, optimizer state, and deliberately misspelled loss suffix, then\n   ask the agent to diagnose whether it is an exact resume and to produce a\n   non-destructive repair plan. Separately provide a fake PyTorch state mapping\n   with one transposed linear tensor; the expected result is a blocked optional\n   port report when torch is unavailable, not an install or hub download.\n\n## Handoff checklist\n\nReport the source commit, effective YAML\u002FCLI overrides, dataset layout check,\nbackend\u002Fdevice probe, smoke command and result, launch mode, per-GPU batch,\nAMP\u002Fdistributed assumptions, checkpoint prefix and suffixes, patches applied (if\nany), and unresolved source hazards. Do not claim ImageNet pretraining or\nmulti-GPU success from a synthetic smoke.\n\n## Bundled references\n\n- [workflows.md](references\u002Fworkflows.md) — bounded checks, launch templates,\n  checkpoint flow, and backend boundaries.\n- [configuration.md](references\u002Fconfiguration.md) — effective fields and\n  invariants.\n- [troubleshooting.md](references\u002Ftroubleshooting.md) — source-specific\n  failures and recovery decisions.\n",{"name":5,"license":23,"metadata":24,"description":7,"disable-model-invocation":26},"Apache 2.0",{"disco-role":25},"operating",true,"main","ac3fe1afa80fb9a09775ecfb2b6cc3ba850a2db6","skills\u002Frepositories\u002Frepo-skills\u002Fpaddlevit\u002Fsub-skills\u002Fself-supervised",27,"https:\u002F\u002Fgithub.com\u002FVectorSpaceLab\u002FAREX-Skill","https:\u002F\u002Fgithub.com\u002FVectorSpaceLab","2026-09-03 10:25:21",{"source":8,"skillName":5,"commands":35,"prompt":45,"zipAvailable":26},[36,39,42],{"tool":37,"command":38},"npx","npx skills add VectorSpaceLab\u002FAREX-Skill --skill self-supervised",{"tool":40,"command":41},"bunx","bunx skills add VectorSpaceLab\u002FAREX-Skill --skill self-supervised",{"tool":43,"command":44},"pnpm","pnpm dlx skills add VectorSpaceLab\u002FAREX-Skill --skill self-supervised","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FVectorSpaceLab\u002FAREX-Skill\u002Fblob\u002Fmain\u002Fskills\u002Frepositories\u002Frepo-skills\u002Fpaddlevit\u002Fsub-skills\u002Fself-supervised\u002FSKILL.md",[47,53,57,61,67],{"path":48,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":51,"sourceHtmlUrl":52},"references\u002Fconfiguration.md","REFERENCE","参考文档",5178,"https:\u002F\u002Fgithub.com\u002FVectorSpaceLab\u002FAREX-Skill\u002Fblob\u002Fmain\u002Fskills\u002Frepositories\u002Frepo-skills\u002Fpaddlevit\u002Fsub-skills\u002Fself-supervised\u002Freferences\u002Fconfiguration.md",{"path":54,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":55,"sourceHtmlUrl":56},"references\u002Ftroubleshooting.md",5347,"https:\u002F\u002Fgithub.com\u002FVectorSpaceLab\u002FAREX-Skill\u002Fblob\u002Fmain\u002Fskills\u002Frepositories\u002Frepo-skills\u002Fpaddlevit\u002Fsub-skills\u002Fself-supervised\u002Freferences\u002Ftroubleshooting.md",{"path":58,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":59,"sourceHtmlUrl":60},"references\u002Fworkflows.md",5782,"https:\u002F\u002Fgithub.com\u002FVectorSpaceLab\u002FAREX-Skill\u002Fblob\u002Fmain\u002Fskills\u002Frepositories\u002Frepo-skills\u002Fpaddlevit\u002Fsub-skills\u002Fself-supervised\u002Freferences\u002Fworkflows.md",{"path":62,"resourceType":63,"resourceTypeDesc":64,"sizeBytes":65,"sourceHtmlUrl":66},"scripts\u002Fcheck_dino_config.py","SCRIPT","脚本",7904,"https:\u002F\u002Fgithub.com\u002FVectorSpaceLab\u002FAREX-Skill\u002Fblob\u002Fmain\u002Fskills\u002Frepositories\u002Frepo-skills\u002Fpaddlevit\u002Fsub-skills\u002Fself-supervised\u002Fscripts\u002Fcheck_dino_config.py",{"path":68,"resourceType":63,"resourceTypeDesc":64,"sizeBytes":69,"sourceHtmlUrl":70},"scripts\u002Fdino_model_smoke.py",7365,"https:\u002F\u002Fgithub.com\u002FVectorSpaceLab\u002FAREX-Skill\u002Fblob\u002Fmain\u002Fskills\u002Frepositories\u002Frepo-skills\u002Fpaddlevit\u002Fsub-skills\u002Fself-supervised\u002Fscripts\u002Fdino_model_smoke.py",[72,79,86,93,100,107],{"skillNo":73,"name":74,"nameZh":6,"description":75,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":76,"categories":77,"keywords":78,"publishedAt":18},"01M799NYSH1R3RVAHSM2D88Y84","passnet-triton-opt","Make a single PassNet Triton kernel fast AND numerically faithful: performance model (when a replacement can win at all), block\u002Fgrid\u002Fwarp 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.","https:\u002F\u002Fgithub.com\u002FVectorSpaceLab\u002FAREX-Skill\u002Fblob\u002Fmain\u002Fskills\u002Ftask-oriented\u002FPassNet\u002Fskills\u002Fpassnet-triton-opt\u002FSKILL.md",[],[],{"skillNo":80,"name":81,"nameZh":6,"description":82,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":83,"categories":84,"keywords":85,"publishedAt":18},"01M799NS5APEC0N1FZ7XZVW6BN","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.","https:\u002F\u002Fgithub.com\u002FVectorSpaceLab\u002FAREX-Skill\u002Fblob\u002Fmain\u002Fskills\u002Ftask-oriented\u002FPassNet\u002Fskills\u002Fpassnet-solve\u002FSKILL.md",[],[],{"skillNo":87,"name":88,"nameZh":6,"description":89,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":90,"categories":91,"keywords":92,"publishedAt":18},"01M799NNY9BKSM21V5R7QVTBJX","passnet-skill","PassNet GPU kernel optimization via compiler passes. Design and implement Triton-based optimization passes, create pass files under .\u002Fpass_dir\u002F, self-evaluate with pass_evaluator, and iterate to maximize GPU speedup.","https:\u002F\u002Fgithub.com\u002FVectorSpaceLab\u002FAREX-Skill\u002Fblob\u002Fmain\u002Fskills\u002Ftask-oriented\u002FPassNet\u002Fskills\u002Fpassnet-skill\u002FSKILL.md",[],[],{"skillNo":94,"name":95,"nameZh":6,"description":96,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":97,"categories":98,"keywords":99,"publishedAt":18},"01M799NHH6NP7Z1RK77KGXAN6S","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()\u002Freplacement_args()\u002Freplacement_func() files, when a pass \"failed to match\", or when deciding how to fuse multiple kernels\u002Fops.","https:\u002F\u002Fgithub.com\u002FVectorSpaceLab\u002FAREX-Skill\u002Fblob\u002Fmain\u002Fskills\u002Ftask-oriented\u002FPassNet\u002Fskills\u002Fpassnet-pattern-fusion\u002FSKILL.md",[],[],{"skillNo":101,"name":102,"nameZh":6,"description":103,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":104,"categories":105,"keywords":106,"publishedAt":18},"01M799ND2J4WNC2PGAZ0A06NDF","passnet-orchestrate","Round\u002Fbatch planning and decision support for PassNet graph optimization. Use for multi-sample triage, worker allocation, eval-budget policy, and post-eval keep\u002Frevert 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.","https:\u002F\u002Fgithub.com\u002FVectorSpaceLab\u002FAREX-Skill\u002Fblob\u002Fmain\u002Fskills\u002Ftask-oriented\u002FPassNet\u002Fskills\u002Fpassnet-orchestrate\u002FSKILL.md",[],[],{"skillNo":108,"name":109,"nameZh":6,"description":110,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":111,"categories":112,"keywords":113,"publishedAt":18},"01M799N8SBTMY02ZDG2AZF5ZWE","passnet-feedback","Fast, deterministic feedback for PassNet work: pre-flight pattern\u002Fmatch 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).","https:\u002F\u002Fgithub.com\u002FVectorSpaceLab\u002FAREX-Skill\u002Fblob\u002Fmain\u002Fskills\u002Ftask-oriented\u002FPassNet\u002Fskills\u002Fpassnet-feedback\u002FSKILL.md",[],[]]