Generated banner for Tao Train Dinov3
Generated logo for Tao Train Dinov3

Tao Train Dinov3

NVIDIAOfficialCreated by NVIDIA Corporation

  • Skill
  • Tool integration
  • Data and AI
  • Apache-2.0
  • Medium risk

From the author

DINOv3 continual self-supervised pre-training. Domain-adapts public DINOv3 ViT backbones on unlabeled images via teacher-student self-distillation (DINO + iBOT + KoLeo, optional Gram anchoring) and converts the EMA teacher into a timm-format backbone for downstream tasks. Trigger phrases include "train DINOv3", "DINOv3 SSL", "domain-adapt a foundation backbone", "continual pretraining", "self-supervised finetune DINOv3".
— the description by NVIDIA Corporation

AutoGineer summary

Written by AutoGineer from the skill’s own files, not by the author

The tao-train-dinov3 skill provides a workflow for domain-adapting DINOv3 vision transformer backbones using self-supervised learning on unlabeled image data. It employs teacher-student self-distillation techniques, including DINO, iBOT, and KoLeo objectives, with optional Gram anchoring. The skill supports full training or parameter-efficient fine-tuning via LoRA, and includes utilities to convert, export, and run inference with trained teacher checkpoints.

What it does

  • Performs continual self-supervised pre-training on unlabeled image datasets.
  • Supports teacher-student self-distillation using DINO, iBOT, and KoLeo objectives.
  • Enables parameter-efficient fine-tuning using LoRA adapters.
  • Provides tools to convert, export, and perform inference with trained teacher checkpoints.
  • Supports AutoML for automated hyperparameter optimization.
  • Allows for high-resolution training configurations.

When to use it

  • When you need to adapt a pre-trained DINOv3 backbone to a specific domain using unlabeled data.
  • When you want to improve representation quality for downstream tasks like classification, detection, or segmentation.
  • When you need to perform continual learning on a foundation model.
  • When you require a standardized workflow to export or convert DINOv3 models for deployment.

Advantages

  • Leverages advanced self-supervised objectives for robust feature learning.
  • Supports LoRA for efficient adaptation without full parameter updates.
  • Includes built-in support for AutoML to simplify hyperparameter tuning.
  • Provides clear separation between training, evaluation, and deployment artifacts.
  • Compatible with standard timm-format backbones.

Usage examples

“Train a DINOv3 backbone on my unlabeled dataset.”
The agent initiates a training run using the specified configuration, applying DINO/iBOT objectives to adapt the backbone to the provided images.
“Export my trained DINOv3 teacher checkpoint for deployment.”
The agent processes the selected teacher checkpoint and converts it into the required format for downstream inference.

Install

  1. Download the skill as a ZIP:

    https://autogineer.com/agent-skills/nvidia/tao-train-dinov3/download
  2. Unzip it into the cross-client skills folder of your project:

    mkdir -p .agents/skills && unzip tao-train-dinov3.zip -d .agents/skills

Documentation by NVIDIA Corporation

DINOv3

Standalone install? If this session was not initialized by the TAO skill bank plugin, run the tao-setup skill first.

Use this skill to continue self-supervised training of a DINOv3 backbone on unlabeled images, then convert, export, or run inference with a trained teacher checkpoint.

Quick Start (docker run)

Docker-native launch — no TAO SDK and no Python on the host. Use the local Docker/platform skill instead when it gives a stricter environment-specific command (non-root UID mapping, cache redirects, remote daemons).

TAO_PYT_IMAGE_DEFAULT=nvcr.io/nvidia/tao/tao-toolkit:7.3.0-pyt  # versions-key: images.tao_toolkit.pyt
TAO_PYT_IMAGE="${TAO_PYT_IMAGE:-$TAO_PYT_IMAGE_DEFAULT}"
RUN_ROOT="${RUN_ROOT:-$PWD}"
DOCKER_COMMON=(
  --rm --gpus all --shm-size=8g
  --shm-size=8g
  --ulimit memlock=-1
  --ulimit stack=67108864
  -v "$RUN_ROOT/data:/data:ro"
  -v "$RUN_ROOT/specs:/specs:ro"
  -v "$RUN_ROOT/results:/results"
)

Train:

docker run "${DOCKER_COMMON[@]}" "$TAO_PYT_IMAGE" \
  dinov3 train -e /specs/train.yaml

Inference:

docker run "${DOCKER_COMMON[@]}" "$TAO_PYT_IMAGE" \
  dinov3 inference -e /specs/inference.yaml

Export:

docker run "${DOCKER_COMMON[@]}" "$TAO_PYT_IMAGE" \
  dinov3 export -e /specs/export.yaml

Convert:

docker run "${DOCKER_COMMON[@]}" "$TAO_PYT_IMAGE" \
  dinov3 convert -e /specs/convert.yaml

Every action takes its spec with -e; results_dir is set in the spec or overridden on the command line. Mount any pretrained-weights directory the spec references, and keep every in-container path consistent across actions.

Configuration

Use schemas/<action>.schema.json for supported fields, defaults, ranges, and options. Start from the matching references/spec_template_<action>.yaml.

Training is AutoML-enabled. Read references/skill_info.yaml and resolve an explicit automl_policy or user request before training. Default to automl_policy: on; requests such as "disable AutoML", "no HPO", or "plain training" mean off for that run. When it is on and the train schema and template are packaged, route training through tao-skill-bank:tao-run-automl. Use direct training only when the policy is off or those files are missing, and report the missing-file limitation. Non-train actions remain in this skill.

Treat train_loss as an optimization signal; use downstream evaluation when selecting a checkpoint for deployment.

For method background or tuning ideas, optionally read:

  • references/dinov3-method.md

  • references/dinov3-recipes.md

Core workflow

  1. Obtain a compatible DINOv3 checkpoint in timm or TAO format.

  2. Point dataset.train_dataset.images_dir to a directory of unlabeled images.

  3. Configure the backbone, training scale, and output location.

  4. Run training and evaluate useful teacher checkpoints on data representative of the downstream task.

  5. Use the selected teacher checkpoint with convert, export, or inference.

Provide either train.pretrained_model_path for a new run or train.resume_training_checkpoint_path to resume an existing run.

Essential fields

PurposeSpec field
Training imagesdataset.train_dataset.images_dir
Initial weightstrain.pretrained_model_path
Resume checkpointtrain.resume_training_checkpoint_path
Backbonemodel.backbone.teacher_type, model.backbone.student_type
Training scaledataset.batch_size, train.num_gpus, train.num_nodes
Output directoryresults_dir
Conversion inputconvert.checkpoint
Export inputexport.checkpoint
Inference inputsinference.checkpoint, dataset.test_dataset.images_dir

Example train settings:

model:
  backbone:
    teacher_type: vit_b
    student_type: vit_b
    rope_theta: 100.0
dataset:
  train_dataset:
    images_dir: /path/to/unlabeled/images
  batch_size: 16
train:
  pretrained_model_path: /path/to/dinov3/weights
  num_epochs: 10
  num_gpus: 1

Supported image extensions include jpg, jpeg, png, ppm, bmp, pgm, tif, tiff, and webp. Keep evaluation data separate from training data when measuring downstream quality.

Every dataset.*.images_dir value must be an extracted image folder. Managed archive-backed sources use runtime: extracted_folder, which unpacks the source before injecting the directory into the spec. For direct Docker or TAO CLI runs, extract .tar, .tar.gz, .tgz, or .zip inputs before launch.

Checkpoints

FileUse
model_epoch_*_step_*.pthResume training, or export its EMA teacher
teacher_epoch_*_step_*.pthConvert, export, inference, or downstream evaluation
student_epoch_*_step_*.pthDiagnostics

For export, prefer a selected stripped teacher_epoch_*_step_*.pth. Export also accepts a selected full model_epoch_*_step_*.pth and deterministically selects and logs teacher.backbone. Inference requires a stripped teacher checkpoint. Do not substitute dinov3_model_latest.pth without evaluating that milestone.

Training loss does not directly measure downstream representation quality. When possible, compare candidate teacher checkpoints using metrics relevant to the target task.

For convert, export, and inference, copy the training-time backbone configuration into the action spec, including rope_theta. Stripped checkpoints do not restore the RoPE frequency base, so falling back to the default can change the trained model's behavior.

Key options

  • model.backbone.teacher_type and student_type support vit_s, vit_s_plus, vit_b, vit_l, vit_h_plus, and vit_7b.

  • When model.distill.enable: false, the teacher and student backbone types must match.

  • model.backbone.rope_theta controls the rotary frequency base. It defaults to 100.0 and is tunable; changing it alters positional encoding, so evaluate the resulting checkpoint for the intended task.

  • model.centering_method supports sinkhorn and softmax.

  • model.gram.* controls optional Gram anchoring.

  • model.lora.* enables parameter-efficient continual pre-training. The default targets the attention qkv and proj projections; num_last_blocks: 0 adapts every transformer block.

  • model.preservation.* adds CLS-token MSE and cosine losses against the frozen anchor teacher. It is recommended with LoRA when global embedding quality matters.

  • train.log_every_n_steps controls step-level loss visibility and defaults to 1, so short smoke runs emit component and preservation losses.

  • train.precision defaults to 16-mixed; choose precision based on hardware and measured quality.

  • train.use_custom_attention: false uses native attention when custom attention is unavailable.

  • Crop and export dimensions need to be divisible by model.backbone.patch_size.

Distributed training

For iterative GRIT or multi-task weakness mining from an unlabeled pool followed by DINOv3 SSL retraining, use the related tao-run-dinov3-ssl-deft application. Ordinary pretraining and fine-tuning remain in this model skill.

Use train.num_gpus, train.gpu_ids, train.num_nodes, and train.distributed_strategy. Start with auto; use ddp or fsdp when appropriate for the selected backbone, resolution, and available memory.

Common issues

  • Checkpoint load failure: verify that the checkpoint is DINOv3 and that its backbone matches the configured teacher and student types.

  • No images found or archive rejected: pass an extracted image folder to dataset.*.images_dir, not an archive file.

  • Out of memory: reduce batch size or image resolution, or use a sharded distributed strategy.

  • Custom-attention failure: set train.use_custom_attention: false.

  • Deterministic-backward failure: xformers memory-efficient attention does not provide a deterministic backward kernel; use train.cudnn.deterministic: false.

  • Grid-size error: choose crop and export dimensions divisible by the patch size.

  • Unexpected inference keys: use a stripped teacher_epoch_*_step_*.pth checkpoint.

  • Full-checkpoint export: a selected model_epoch_*_step_*.pth is supported; export selects and logs its EMA teacher.backbone.

  • Resume mismatch: the SSL dataloader is not step-resumable, so resume from an epoch/checkpoint boundary when reproducibility matters.

Files

LICENSE

Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.


                                 Apache License
                           Version 2.0, January 2004
                        http://www.apache.org/licenses/

   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION

   1. Definitions.

      "License" shall mean the terms and conditions for use, reproduction,
      and distribution as defined by Sections 1 through 9 of this document.

      "Licensor" shall mean the copyright owner or entity authorized by
      the copyright owner that is granting the License.

      "Legal Entity" shall mean the union of the acting entity and all
      other entities that control, are controlled by, or are under common
      control with that entity. For the purposes of this definition,
      "control" means (i) the power, direct or indirect, to cause the
      direction or management of such entity, whether by contract or
      otherwise, or (ii) ownership of fifty percent (50%) or more of the
      outstanding shares, or (iii) beneficial ownership of such entity.

      "You" (or "Your") shall mean an individual or Legal Entity
      exercising permissions granted by this License.

      "Source" form shall mean the preferred form for making modifications,
      including but not limited to software source code, documentation
      source, and configuration files.

      "Object" form shall mean any form resulting from mechanical
      transformation or translation of a Source form, including but
      not limited to compiled object code, generated documentation,
      and conversions to other media types.

      "Work" shall mean the work of authorship, whether in Source or
      Object form, made available under the License, as indicated by a
      copyright notice that is included in or attached to the work
      (an example is provided in the Appendix below).

      "Derivative Works" shall mean any work, whether in Source or Object
      form, that is based on (or derived from) the Work and for which the
      editorial revisions, annotations, elaborations, or other modifications
      represent, as a whole, an original work of authorship. For the purposes
      of this License, Derivative Works shall not include works that remain
      separable from, or merely link (or bind by name) to the interfaces of,
      the Work and Derivative Works thereof.

      "Contribution" shall mean any work of authorship, including
      the original version of the Work and any modifications or additions
      to that Work or Derivative Works thereof, that is intentionally
      submitted to Licensor for inclusion in the Work by the copyright owner
      or by an individual or Legal Entity authorized to submit on behalf of
      the copyright owner. For the purposes of this definition, "submitted"
      means any form of electronic, verbal, or written communication sent
      to the Licensor or its representatives, including but not limited to
      communication on electronic mailing lists, source code control systems,
      and issue tracking systems that are managed by, or on behalf of, the
      Licensor for the purpose of discussing and improving the Work, but
      excluding communication that is conspicuously marked or otherwise
      designated in writing by the copyright owner as "Not a Contribution."

      "Contributor" shall mean Licensor and any individual or Legal Entity
      on behalf of whom a Contribution has been received by Licensor and
      subsequently incorporated within the Work.

   2. Grant of Copyright License. Subject to the terms and conditions of
      this License, each Contributor hereby grants to You a perpetual,
      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
      copyright license to reproduce, prepare Derivative Works of,
      publicly display, publicly perform, sublicense, and distribute the
      Work and such Derivative Works in Source or Object form.

   3. Grant of Patent License. Subject to the terms and conditions of
      this License, each Contributor hereby grants to You a perpetual,
      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
      (except as stated in this section) patent license to make, have made,
      use, offer to sell, sell, import, and otherwise transfer the Work,
      where such license applies only to those patent claims licensable
      by such Contributor that are necessarily infringed by their
      Contribution(s) alone or by combination of their Contribution(s)
      with the Work to which such Contribution(s) was submitted. If You
      institute patent litigation against any entity (including a
      cross-claim or counterclaim in a lawsuit) alleging that the Work
      or a Contribution incorporated within the Work constitutes direct
      or contributory patent infringement, then any patent licenses
      granted to You under this License for that Work shall terminate
      as of the date such litigation is filed.

   4. Redistribution. You may reproduce and distribute copies of the
      Work or Derivative Works thereof in any medium, with or without
      modifications, and in Source or Object form, provided that You
      meet the following conditions:

      (a) You must give any other recipients of the Work or
          Derivative Works a copy of this License; and

      (b) You must cause any modified files to carry prominent notices
          stating that You changed the files; and

      (c) You must retain, in the Source form of any Derivative Works
          that You distribute, all copyright, patent, trademark, and
          attribution notices from the Source form of the Work,
          excluding those notices that do not pertain to any part of
          the Derivative Works; and

      (d) If the Work includes a "NOTICE" text file as part of its
          distribution, then any Derivative Works that You distribute must
          include a readable copy of the attribution notices contained
          within such NOTICE file, excluding those notices that do not
          pertain to any part of the Derivative Works, in at least one
          of the following places: within a NOTICE text file distributed
          as part of the Derivative Works; within the Source form or
          documentation, if provided along with the Derivative Works; or,
          within a display generated by the Derivative Works, if and
          wherever such third-party notices normally appear. The contents
          of the NOTICE file are for informational purposes only and
          do not modify the License. You may add Your own attribution
          notices within Derivative Works that You distribute, alongside
          or as an addendum to the NOTICE text from the Work, provided
          that such additional attribution notices cannot be construed
          as modifying the License.

      You may add Your own copyright statement to Your modifications and
      may provide additional or different license terms and conditions
      for use, reproduction, or distribution of Your modifications, or
      for any such Derivative Works as a whole, provided Your use,
      reproduction, and distribution of the Work otherwise complies with
      the conditions stated in this License.

   5. Submission of Contributions. Unless You explicitly state otherwise,
      any Contribution intentionally submitted for inclusion in the Work
      by You to the Licensor shall be under the terms and conditions of
      this License, without any additional terms or conditions.
      Notwithstanding the above, nothing herein shall supersede or modify
      the terms of any separate license agreement you may have executed
      with Licensor regarding such Contributions.

   6. Trademarks. This License does not grant permission to use the trade
      names, trademarks, service marks, or product names of the Licensor,
      except as required for reasonable and customary use in describing the
      origin of the Work and reproducing the content of the NOTICE file.

   7. Disclaimer of Warranty. Unless required by applicable law or
      agreed to in writing, Licensor provides the Work (and each
      Contributor provides its Contributions) on an "AS IS" BASIS,
      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
      implied, including, without limitation, any warranties or conditions
      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
      PARTICULAR PURPOSE. You are solely responsible for determining the
      appropriateness of using or redistributing the Work and assume any
      risks associated with Your exercise of permissions under this License.

   8. Limitation of Liability. In no event and under no legal theory,
      whether in tort (including negligence), contract, or otherwise,
      unless required by applicable law (such as deliberate and grossly
      negligent acts) or agreed to in writing, shall any Contributor be
      liable to You for damages, including any direct, indirect, special,
      incidental, or consequential damages of any character arising as a
      result of this License or out of the use or inability to use the
      Work (including but not limited to damages for loss of goodwill,
      work stoppage, computer failure or malfunction, or any and all
      other commercial damages or losses), even if such Contributor
      has been advised of the possibility of such damages.

   9. Accepting Warranty or Additional Liability. While redistributing
      the Work or Derivative Works thereof, You may choose to offer,
      and charge a fee for, acceptance of support, warranty, indemnity,
      or other liability obligations and/or rights consistent with this
      License. However, in accepting such obligations, You may act only
      on Your own behalf and on Your sole responsibility, not on behalf
      of any other Contributor, and only if You agree to indemnify,
      defend, and hold each Contributor harmless for any liability
      incurred by, or claims asserted against, such Contributor by reason
      of your accepting any such warranty or additional liability.

   END OF TERMS AND CONDITIONS

   APPENDIX: How to apply the Apache License to your work.

      To apply the Apache License to your work, attach the following
      boilerplate notice, with the fields enclosed by brackets "[]"
      replaced with your own identifying information. (Don't include
      the brackets!)  The text should be enclosed in the appropriate
      comment syntax for the file format. We also recommend that a
      file or class name and description of purpose be included on the
      same "printed page" as the copyright notice for easier
      identification within third-party archives.

   Copyright [yyyy] [name of copyright owner]

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.

Requirements and compatibility

Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta

“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.

Needs: Declares allowed tools, Needs a command-line tool

The author says: Requires docker + nvidia-container-toolkit.

Security

What our scanner noticed· Medium risk

  • Large base64-encoded blobs

A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.

Attribution and licence

Created by
NVIDIA Corporation
Publisher
NVIDIA (Official)
Source
NVIDIA/skills · skills/tao-train-dinov3 · commit fce3cca
Licence
Apache License 2.0 (redistribution allowed)
  • LICENSE (added by AutoGineer from LICENSE-APACHE)
  • ATTRIBUTION.md (written by AutoGineer)
Synced

AutoGineer is not affiliated with or endorsed by NVIDIA Corporation or NVIDIA.

Download ZIP

The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download tao-train-dinov3.zip