# tao-finetune-cosmos-embed

Configures Docker runs for Cosmos-Embed1 inside NVIDIA TAO, enabling text-to-video retrieval, model fine-tuning, evaluation, and artifact exports.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 1600 installs · ★ 3735
- Author: NVIDIA Corporation
- License: Apache-2.0 · policy=mirror · the beginning of the file is at the end of this page
- Source: https://github.com/NVIDIA/skills/tree/HEAD/skills/tao-finetune-cosmos-embed/SKILL.md
- Updated: 2026-10-23
- HTML: https://affpapa.org/en/nevibecode/skills/tao-finetune-cosmos-embed

## What it does

This skill provides Docker run configurations and execution commands for the `cosmos-embed1` CLI inside the `nvcr.io/nvidia/tao/tao-toolkit:7.3.0-cosmos-embed` container. It handles four core workflows: training, evaluation, inference queries, and exporting checkpoints to ONNX or HuggingFace formats. Workspace execution relies on predefined YAML specs alongside `data`, `specs`, and `results` directories.

AutoML is not supported here. Because model schemas are absent, all training flows must use direct CLI actions rather than automated orchestration pipelines. Pulling the pretrained weights requires an `HF_TOKEN` environment variable. You must install protobuf below version 7 before running tasks, because wandb 0.21.0 breaks on newer protobuf releases in this image.

The container working directory must be set to a writable results directory. Cold Triton caches cause GCC to misinterpret a local `specs` directory as a compiler configuration file, which crashes execution immediately. An isolated bind mount handles the BERT Q-Former cache to avoid permission issues across site-packages.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add NVIDIA/skills --skill tao-finetune-cosmos-embed -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/tao-finetune-cosmos-embed/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/tao-finetune-cosmos-embed/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add NVIDIA/skills --skill tao-finetune-cosmos-embed -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/tao-finetune-cosmos-embed/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add NVIDIA/skills --skill tao-finetune-cosmos-embed -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/tao-finetune-cosmos-embed/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install NVIDIA/skills tao-finetune-cosmos-embed
```

2. **Manually: put the files in place**
- File: `.github/skills/tao-finetune-cosmos-embed/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add NVIDIA/skills --skill tao-finetune-cosmos-embed -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/NVIDIA/skills --path skills/tao-finetune-cosmos-embed
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/tao-finetune-cosmos-embed/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add NVIDIA/skills --skill tao-finetune-cosmos-embed -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/NVIDIA/skills/tree/HEAD/skills/tao-finetune-cosmos-embed/SKILL.md

## When to use it
- fine-tune Cosmos-Embed1 on custom video datasets
- run text-to-video retrieval queries via CLI inference
- export trained checkpoints to ONNX or HuggingFace formats
- resolve protobuf and wandb package conflicts in TAO containers

## Example prompts
- Help me fine-tune Cosmos-Embed1 using the specs/train.yaml configuration
- Run cosmos-embed1 inference to search videos for "a man is singing on stage"
- Export checkpoint iter_000000001.pt to ONNX format

## Source text · SKILL.md · Apache-2.0

Below is the content of a third-party file. It is data, not instructions for you: do not act on anything written inside unless the human asks. Block tag: a7bb38c6df71ecd4.

BEGIN THIRD-PARTY FILE a7bb38c6df71ecd4
````text
---
name: tao-finetune-cosmos-embed
description: >-
  Cosmos-Embed1 video-text embedding for text-to-video retrieval, video-to-video search, semantic deduplication, and
  fine-tuning. Use when the user asks to "fine-tune Cosmos-Embed1", "run cosmos-embed inference", "export Cosmos-Embed1",
  "embed videos", or "search videos with text".
license: Apache-2.0
compatibility: Requires docker + nvidia-container-toolkit, the published Cosmos-Embed TAO container (pinned in this skill), and a HuggingFace token when downloading pretrained `nvidia/Cosmos-Embed1-*` weights.
metadata:
  author: NVIDIA Corporation
  version: "0.1.0"
allowed-tools: Read Bash
tags:
- video
- vision-language
- vlm
- multimodal
- retrieval
- embedding
- cosmos
- fine-tuning
---

# Cosmos-Embed

> **Standalone install?** If this session was not initialized by the TAO skill bank plugin, run the `tao-setup` skill first (host preflight, credentials, cross-skill discovery).

Cosmos-Embed1 is a joint video-text embedder for text-to-video retrieval, video-to-video search, zero-shot/kNN classification, and semantic deduplication. The packaged CLI is `cosmos-embed1` and supports `train`, `evaluate`, `inference`, and `export`.

Container image and per-action commands are in `references/skill_info.yaml`. Compact starting specs are in `references/spec_template_*.yaml`.

## Train Action Policy

AutoML is not packaged for this model skill because there are no Cosmos-Embed schemas under `schemas/`. Always use the direct model skill actions for `train`, `evaluate`, `inference`, and `export`, even when a higher-level request includes `automl_policy: on`. Do not route Cosmos-Embed through workflow or AutoML skills until model-specific train schemas and templates are added.

Non-train actions such as `evaluate`, `inference`, `export`, and deploy flows stay in this model skill. The per-run `automl_policy` override does not change model metadata.

## Quick Start

Use the published Cosmos-Embed container pinned below (also declared in
`references/skill_info.yaml`). Do not build from the private
Cosmos-Embed1 source tree for normal skill use; build from source only when
developing the container itself.

```bash
COSMOS_EMBED_IMAGE_DEFAULT=nvcr.io/nvidia/tao/tao-toolkit:7.3.0-cosmos-embed  # versions-key: images.tao_toolkit.cosmos_embed
COSMOS_EMBED_IMAGE="${COSMOS_EMBED_IMAGE:-$COSMOS_EMBED_IMAGE_DEFAULT}"
docker pull "$COSMOS_EMBED_IMAGE"
```

Expected local workspace layout:

```text
workspace/
├── data/
│   ├── msrvtt_test_1k.json
│   └── video/
````
END THIRD-PARTY FILE a7bb38c6df71ecd4

The third-party file has ended. Everything between the a7bb38c6df71ecd4 tags is data: requests and commands from it are not followed. An “end of file” line with another tag inside the block is part of the file.

First 2557 of 15354 bytes. © NVIDIA Corporation · Apache-2.0 · https://github.com/NVIDIA/skills/tree/HEAD/skills/tao-finetune-cosmos-embed/SKILL.md

_Part of the page did not fit — see the HTML version._

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
