[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6PKAJDGWX7GXT4MWY3Q6618":3,"skill-same:01M6PKAJDGWX7GXT4MWY3Q6618":125},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":23,"publishedAt":44,"linkOnly":45,"markdownContent":46,"markdownBody":47,"frontMatter":48,"refName":60,"commitSha":61,"skillDirectory":62,"forksCount":14,"repositoryHtmlUrl":63,"repositoryHomepageUrl":6,"ownerHtmlUrl":64,"ownerBlogUrl":65,"ownerDescription":6,"updatedAt":66,"install":67,"resources":80},"01M6PKAJDGWX7GXT4MWY3Q6618","tao-finetune-cosmos-embed",null,"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\".","headmktlucca-ui\u002Fneuroads-lp","headmktlucca-ui","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F247379838?v=4","01M6PDVAV6M1W96D1SR1PDF8CS","NeuroAds","01M6PDVAZ4P281GNDKD45CYTF5",0,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fheadmktlucca-ui\u002Fneuroads-lp\u002Fblob\u002Fmain\u002F.agent\u002Fskills\u002Ftao-finetune-cosmos-embed\u002FSKILL.md",[18],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000016","图像与多媒体","SCENARIO","使用场景",[24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43],"tao finetune cosmos embed","tao","embed","finetune","cosmos","export","text-to-video","embedding","token","vision","run","read","text","Bash","Video","tuning","deduplication","NVIDIA","multimodal","search","2026-11-10 10:12:30",false,"---\nname: tao-finetune-cosmos-embed\ndescription: >-\n  Cosmos-Embed1 video-text embedding for text-to-video retrieval, video-to-video search, semantic deduplication, and\n  fine-tuning. Use when the user asks to \"fine-tune Cosmos-Embed1\", \"run cosmos-embed inference\", \"export Cosmos-Embed1\",\n  \"embed videos\", or \"search videos with text\".\nlicense: Apache-2.0\ncompatibility: Requires docker + nvidia-container-toolkit, the published Cosmos-Embed TAO container from versions.yaml, and a HuggingFace token when downloading pretrained `nvidia\u002FCosmos-Embed1-*` weights.\nmetadata:\n  author: NVIDIA Corporation\n  version: \"0.1.0\"\nallowed-tools: Read Bash\ntags:\n- video\n- vision-language\n- vlm\n- multimodal\n- retrieval\n- embedding\n- cosmos\n- fine-tuning\n---\n\n# Cosmos-Embed\n\nCosmos-Embed1 is a joint video-text embedder for text-to-video retrieval, video-to-video search, zero-shot\u002FkNN classification, and semantic deduplication. The packaged CLI is `cosmos-embed1` and supports `train`, `evaluate`, `inference`, and `export`.\n\nContainer image and per-action commands are in `references\u002Fskill_info.yaml`. Compact starting specs are in `references\u002Fspec_template_*.yaml`.\n\n## Train Action Policy\n\nThis model is AutoML-enabled at the model layer. Before handling any train-stage request, read `references\u002Fskill_info.yaml` and resolve the run override from either an explicit `automl_policy` value or the user's workflow request. Treat phrases like \"turn off AutoML\", \"disable AutoML\", \"no HPO\", or \"plain training\" as `automl_policy: off` for this run only; otherwise default to `auto`. When `automl_policy: auto`, `automl_enabled: true`, and both `schemas\u002Ftrain.schema.json` and `references\u002Fspec_template_train.yaml` are packaged, route the train action through `tao-skill-bank:tao-run-automl` by default with this model's `skill_dir`. Preserve workflow\u002Fapplication overrides for datasets, specs, output directories, GPU\u002Fplatform settings, parent checkpoints, and `automl_policy`. Use direct model training only when `automl_policy: off` or the packaged train schema\u002Ftemplate is missing; in the missing-schema case, report that AutoML is enabled but not runnable for this model until schemas are generated.\n\nNon-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.\n\n## Quick Start\n\nUse the published Cosmos-Embed container declared by `references\u002Fskill_info.yaml`\nand resolved through `versions.yaml`. Do not build from the private\nCosmos-Embed1 source tree for normal skill use; build from source only when\ndeveloping the container itself.\n\n```bash\nTAO_SKILL_BANK_PATH=\"${TAO_SKILL_BANK_PATH:-$PWD}\"\nCOSMOS_EMBED_IMAGE=\"${COSMOS_EMBED_IMAGE:-$(\n  python \"$TAO_SKILL_BANK_PATH\u002Fscripts\u002Fresolve_tao_image.py\" \\\n    --skill-bank \"$TAO_SKILL_BANK_PATH\" \\\n    --model cosmos-embed \\\n    --action train \\\n    --format json |\n  python -c 'import json,sys; print(json.load(sys.stdin)[\"image\"])'\n)}\"\ndocker pull \"$COSMOS_EMBED_IMAGE\"\n```\n\nExpected local workspace layout:\n\n```text\nworkspace\u002F\n├── data\u002F\n│   ├── msrvtt_test_1k.json\n│   └── video\u002F\n│       ├── video7020.mp4\n│       └── ...\n├── model\u002F\n│   └── Cosmos-Embed1-224p\u002F        # optional if using HF repo id\n├── specs\u002F\n│   ├── train.yaml\n│   ├── evaluate.yaml\n│   ├── inference.yaml\n│   ├── export_onnx.yaml\n│   └── export_hf.yaml\n└── results\u002F\n```\n\nUse these Docker options for all actions unless the local Docker\u002Fplatform skill gives a stricter environment-specific command:\n\n```bash\nTAO_SKILL_BANK_PATH=\"${TAO_SKILL_BANK_PATH:-$PWD}\"\nCOSMOS_EMBED_IMAGE=\"${COSMOS_EMBED_IMAGE:-$(\n  python \"$TAO_SKILL_BANK_PATH\u002Fscripts\u002Fresolve_tao_image.py\" \\\n    --skill-bank \"$TAO_SKILL_BANK_PATH\" \\\n    --model cosmos-embed \\\n    --action train \\\n    --format json |\n  python -c 'import json,sys; print(json.load(sys.stdin)[\"image\"])'\n)}\"\nRUN_ROOT=\"${RUN_ROOT:-$PWD}\"\nDOCKER_COMMON=(\n  --rm --gpus all --ipc=host --network=host\n  --shm-size=64g\n  --ulimit memlock=-1\n  --ulimit stack=67108864\n  -e HF_TOKEN\n  -v \"$RUN_ROOT\u002Fdata:\u002Fdata:ro\"\n  -v \"$RUN_ROOT\u002Fmodel:\u002Fmodel\"\n  -v \"$RUN_ROOT\u002Fspecs:\u002Fspecs:ro\"\n  -v \"$RUN_ROOT\u002Fresults:\u002Fresults\"\n)\n```\n\nTrain:\n\n```bash\ndocker run \"${DOCKER_COMMON[@]}\" \"$COSMOS_EMBED_IMAGE\" \\\n  cosmos-embed1 train -e \u002Fspecs\u002Ftrain.yaml results_dir=\u002Fresults\n```\n\nEvaluate:\n\n```bash\ndocker run \"${DOCKER_COMMON[@]}\" \"$COSMOS_EMBED_IMAGE\" \\\n  cosmos-embed1 evaluate -e \u002Fspecs\u002Fevaluate.yaml results_dir=\u002Fresults\n```\n\nInference:\n\n```bash\ndocker run \"${DOCKER_COMMON[@]}\" \"$COSMOS_EMBED_IMAGE\" \\\n  cosmos-embed1 inference -e \u002Fspecs\u002Finference.yaml \\\n  'inference.query.input_texts=[\"a man is singing on stage\"]' \\\n  inference.k=5 \\\n  results_dir=\u002Fresults\n```\n\nExport ONNX:\n\n```bash\ndocker run \"${DOCKER_COMMON[@]}\" \"$COSMOS_EMBED_IMAGE\" \\\n  cosmos-embed1 export -e \u002Fspecs\u002Fexport_onnx.yaml \\\n  export.checkpoint=\u002Fresults\u002Ftrain\u002Fcosmos_embed1_model_latest.pth \\\n  export.onnx_file=\u002Fresults\u002Fexport\u002Fcosmos_embed1_combined.onnx \\\n  results_dir=\u002Fresults\n```\n\nExport HuggingFace format:\n\n```bash\ndocker run \"${DOCKER_COMMON[@]}\" \"$COSMOS_EMBED_IMAGE\" \\\n  cosmos-embed1 export -e \u002Fspecs\u002Fexport_hf.yaml \\\n  export.checkpoint=\u002Fresults\u002Ftrain\u002Fcosmos_embed1_model_latest.pth \\\n  export.hf_output_dir=\u002Fresults\u002Fexport_hf\u002Fcosmos_embed1_hf \\\n  results_dir=\u002Fresults\n```\n\n## Smoke Overrides\n\nFor a small functional check, keep the same specs and override the expensive knobs:\n\n```bash\ntrain.max_iter=1\ntrain.validation_iter=2\ntrain.checkpoint_iter=1\ntrain.optim.optim=adamw\ndataset.train_dataset.batch_size=1\ndataset.val_dataset.batch_size=1\ndataset.train_dataset.workers=0\ndataset.val_dataset.workers=0\n```\n\nIf no local Cosmos-Embed1 pretrained checkpoint or HuggingFace token is available, set `model.pretrained_model_path=null` for a plumbing-only smoke train. The model quality is meaningless in that mode, but the train\u002Fevaluate\u002Finference\u002Fexport action paths can still be exercised.\n\nFor evaluation and inference smoke tests on a tiny subset:\n\n```bash\nevaluate.callbacks.embedding_visualization=false\nevaluate.callbacks.max_eval_samples=8\ndataset.test_dataset.batch_size=1\ndataset.test_dataset.workers=0\ninference.k=2\ndataset.inference_dataset.batch_size=1\ndataset.inference_dataset.workers=0\n```\n\n## Data Format\n\nThe MSR-VTT path expects a local video glob and a JSON metadata file:\n\n```yaml\ndataset:\n  train_dataset:\n    dataset_type: msrvtt\n    mp4_urls: \u002Fdata\u002Fvideo\u002F*.mp4\n    metadata: \u002Fdata\u002Fmsrvtt_test_1k.json\n```\n\nList-format metadata rows must include at least `video` and `caption`:\n\n```json\n{\"video_id\": \"video7020\", \"video\": \"video7020.mp4\", \"caption\": \"a woman creating a fondant baby and flower\"}\n```\n\nThe dataset loader derives the video id from the local `.mp4` filename and filters to videos present in the metadata. If a run finds zero videos, check that `mp4_urls` points to a container-local glob and that metadata `video` names match the filenames.\n\n## Model Weights\n\n- Local HF directory: mount it under `\u002Fmodel` and set `model.pretrained_model_path=\u002Fmodel\u002FCosmos-Embed1-224p`.\n- HuggingFace repo: set `model.pretrained_model_path=nvidia\u002FCosmos-Embed1-224p` and pass `HF_TOKEN` if access is gated.\n- Fine-tuned checkpoint: downstream actions default to `\u002Fresults\u002Ftrain\u002Fcosmos_embed1_model_latest.pth`.\n\nVariants:\n\n| Variant | Resolution | Frames | Embedding dim |\n|---|---:|---:|---:|\n| `Cosmos-Embed1-224p` | 224 x 224 | 8 | 256 |\n| `Cosmos-Embed1-336p` | 336 x 336 | 8 | 768 |\n| `Cosmos-Embed1-448p` | 448 x 448 | 8 | 768 |\n\nKeep `model.network.embed_dim`, `model.input_hw`, and `model.network.spatial_resolution` aligned with the selected variant.\n\n## Important Parameters\n\n| Parameter | Notes |\n|---|---|\n| `train.num_gpus` | `1` for single GPU, `>1` auto-launches `torchrun`, `-1` auto-detects visible GPUs. |\n| `train.max_iter` | Main training length. Use `1` only for smoke testing. |\n| `train.optim.optim` | `fused_adamw` is faster when available; `adamw` is safer for smoke and portability. |\n| `model.lora.enabled` | Enables LoRA. Set `model.network.visual_encoder.transformer_engine=false` when LoRA is on. |\n| `model.lora.lora_rank` | LoRA rank. Start with `8`; try `4`, `8`, or `16` for manual or AutoML-style sweeps. |\n| `model.lora.lora_alpha` | LoRA scaling factor. Start with `16`; keep near `2 * lora_rank` unless experiments show otherwise. |\n| `model.lora.lora_dropout` | LoRA dropout. Start with `0.1`; sweep `0.0`, `0.05`, and `0.1` for small datasets. |\n| `model.lora.bias` | Bias policy: `none`, `all`, or `lora_only`. Keep `none` unless intentionally training biases. |\n| `model.lora.use_rslora` \u002F `use_dora` | Optional LoRA variants. Enable one at a time and record the setting with the checkpoint. |\n| `model.lora.target_modules` | Optional module-name patterns for LoRA injection. Leave empty for the default ViT + Q-Former attention\u002FMLP targets. |\n| `model.lora.modules_to_save` | Optional modules to keep fully trainable alongside LoRA. Leave empty unless preserving a task-specific head. |\n| `evaluate.load_dataset_pkl` \u002F `save_dataset_pkl` | Cache evaluation embeddings. |\n| `inference.load_dataset_pkl` \u002F `save_dataset_pkl` | Cache the search database for repeated retrieval. |\n| `export.mode` | `video`, `text`, `combined`, or `huggingface`. |\n| `export.on_cpu` | Recommended for export to avoid device mismatch issues. |\n\n### LoRA and AutoML Notes\n\nFor parameter-efficient fine-tuning, set `model.lora.enabled=true` and keep\n`model.network.visual_encoder.transformer_engine=false`; TAO Core's\nCosmos-Embed1 config notes that PEFT cannot inject adapters into Transformer\nEngine layers. Treat the LoRA fields above as the first candidate parameters\nfor manual tuning or AutoML-style search before unfreezing larger model blocks.\nAvoid changing `target_modules` or `modules_to_save` unless the user explicitly\nneeds custom adapter placement.\n\n## S3 Staging\n\nThe Cosmos-Embed1 CLI consumes local paths and Python globs, not raw `s3:\u002F\u002F...\u002F*.mp4` URIs. For S3-backed runs, first stage a subset or full dataset to the execution host\u002Fcontainer filesystem, then use local paths such as `\u002Fdata\u002Fvideo\u002F*.mp4` in the spec.\n\nRecommended S3 layout for staged MSR-VTT data:\n\n```text\ns3:\u002F\u002Fbucket\u002Fpath\u002Fcosmos-embed\u002Fmsrvtt-subset\u002F\n├── msrvtt_test_1k.json\n└── video\u002F\n    ├── video7020.mp4\n    └── ...\n```\n\nAfter downloading\u002Fsyncing that prefix into the mounted `data\u002F` directory, use the same Docker commands above.\n\n## Outputs\n\n```text\nresults\u002F\n├── train\u002F\n│   ├── cosmos_embed1_model_latest.pth\n│   ├── cosmos_embed1_model_\u003Citer>.pth\n│   └── experiment.yaml\n├── evaluate\u002F\n│   ├── metrics.json\n│   └── experiment.yaml\n├── inference\u002F\n│   ├── results.json\n│   └── experiment.yaml\n├── export\u002F\n│   ├── cosmos_embed1_combined.onnx\n│   └── export_config.yaml\n└── export_hf\u002F\n    └── cosmos_embed1_hf\u002F\n```\n\n## Known Pitfalls\n\n| Symptom | Cause | Fix |\n|---|---|---|\n| `MSRVTTDataset: 0 videos found` | `mp4_urls` is not a local glob or metadata filenames do not match videos. | Mount data into the container and set `mp4_urls=\u002Fdata\u002Fvideo\u002F*.mp4`. |\n| HF download\u002Fauth failure | Missing or invalid `HF_TOKEN`, or model agreement not accepted. | Accept the model terms and pass `-e HF_TOKEN`. |\n| LoRA injection failure | Transformer Engine visual encoder is enabled. | Set `model.network.visual_encoder.transformer_engine=false`. |\n| ONNX\u002FHF export complains about missing components | Export checkpoint is partial or adapter-only. | Use a full checkpoint or configure pretrained visual\u002Ftext sources before export. |\n| CUDA OOM | Batch\u002Fresolution too high for the GPU. | Reduce batch size, use 224p, enable LoRA, or use more GPUs. |\n","# Cosmos-Embed\n\nCosmos-Embed1 is a joint video-text embedder for text-to-video retrieval, video-to-video search, zero-shot\u002FkNN classification, and semantic deduplication. The packaged CLI is `cosmos-embed1` and supports `train`, `evaluate`, `inference`, and `export`.\n\nContainer image and per-action commands are in `references\u002Fskill_info.yaml`. Compact starting specs are in `references\u002Fspec_template_*.yaml`.\n\n## Train Action Policy\n\nThis model is AutoML-enabled at the model layer. Before handling any train-stage request, read `references\u002Fskill_info.yaml` and resolve the run override from either an explicit `automl_policy` value or the user's workflow request. Treat phrases like \"turn off AutoML\", \"disable AutoML\", \"no HPO\", or \"plain training\" as `automl_policy: off` for this run only; otherwise default to `auto`. When `automl_policy: auto`, `automl_enabled: true`, and both `schemas\u002Ftrain.schema.json` and `references\u002Fspec_template_train.yaml` are packaged, route the train action through `tao-skill-bank:tao-run-automl` by default with this model's `skill_dir`. Preserve workflow\u002Fapplication overrides for datasets, specs, output directories, GPU\u002Fplatform settings, parent checkpoints, and `automl_policy`. Use direct model training only when `automl_policy: off` or the packaged train schema\u002Ftemplate is missing; in the missing-schema case, report that AutoML is enabled but not runnable for this model until schemas are generated.\n\nNon-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.\n\n## Quick Start\n\nUse the published Cosmos-Embed container declared by `references\u002Fskill_info.yaml`\nand resolved through `versions.yaml`. Do not build from the private\nCosmos-Embed1 source tree for normal skill use; build from source only when\ndeveloping the container itself.\n\n```bash\nTAO_SKILL_BANK_PATH=\"${TAO_SKILL_BANK_PATH:-$PWD}\"\nCOSMOS_EMBED_IMAGE=\"${COSMOS_EMBED_IMAGE:-$(\n  python \"$TAO_SKILL_BANK_PATH\u002Fscripts\u002Fresolve_tao_image.py\" \\\n    --skill-bank \"$TAO_SKILL_BANK_PATH\" \\\n    --model cosmos-embed \\\n    --action train \\\n    --format json |\n  python -c 'import json,sys; print(json.load(sys.stdin)[\"image\"])'\n)}\"\ndocker pull \"$COSMOS_EMBED_IMAGE\"\n```\n\nExpected local workspace layout:\n\n```text\nworkspace\u002F\n├── data\u002F\n│   ├── msrvtt_test_1k.json\n│   └── video\u002F\n│       ├── video7020.mp4\n│       └── ...\n├── model\u002F\n│   └── Cosmos-Embed1-224p\u002F        # optional if using HF repo id\n├── specs\u002F\n│   ├── train.yaml\n│   ├── evaluate.yaml\n│   ├── inference.yaml\n│   ├── export_onnx.yaml\n│   └── export_hf.yaml\n└── results\u002F\n```\n\nUse these Docker options for all actions unless the local Docker\u002Fplatform skill gives a stricter environment-specific command:\n\n```bash\nTAO_SKILL_BANK_PATH=\"${TAO_SKILL_BANK_PATH:-$PWD}\"\nCOSMOS_EMBED_IMAGE=\"${COSMOS_EMBED_IMAGE:-$(\n  python \"$TAO_SKILL_BANK_PATH\u002Fscripts\u002Fresolve_tao_image.py\" \\\n    --skill-bank \"$TAO_SKILL_BANK_PATH\" \\\n    --model cosmos-embed \\\n    --action train \\\n    --format json |\n  python -c 'import json,sys; print(json.load(sys.stdin)[\"image\"])'\n)}\"\nRUN_ROOT=\"${RUN_ROOT:-$PWD}\"\nDOCKER_COMMON=(\n  --rm --gpus all --ipc=host --network=host\n  --shm-size=64g\n  --ulimit memlock=-1\n  --ulimit stack=67108864\n  -e HF_TOKEN\n  -v \"$RUN_ROOT\u002Fdata:\u002Fdata:ro\"\n  -v \"$RUN_ROOT\u002Fmodel:\u002Fmodel\"\n  -v \"$RUN_ROOT\u002Fspecs:\u002Fspecs:ro\"\n  -v \"$RUN_ROOT\u002Fresults:\u002Fresults\"\n)\n```\n\nTrain:\n\n```bash\ndocker run \"${DOCKER_COMMON[@]}\" \"$COSMOS_EMBED_IMAGE\" \\\n  cosmos-embed1 train -e \u002Fspecs\u002Ftrain.yaml results_dir=\u002Fresults\n```\n\nEvaluate:\n\n```bash\ndocker run \"${DOCKER_COMMON[@]}\" \"$COSMOS_EMBED_IMAGE\" \\\n  cosmos-embed1 evaluate -e \u002Fspecs\u002Fevaluate.yaml results_dir=\u002Fresults\n```\n\nInference:\n\n```bash\ndocker run \"${DOCKER_COMMON[@]}\" \"$COSMOS_EMBED_IMAGE\" \\\n  cosmos-embed1 inference -e \u002Fspecs\u002Finference.yaml \\\n  'inference.query.input_texts=[\"a man is singing on stage\"]' \\\n  inference.k=5 \\\n  results_dir=\u002Fresults\n```\n\nExport ONNX:\n\n```bash\ndocker run \"${DOCKER_COMMON[@]}\" \"$COSMOS_EMBED_IMAGE\" \\\n  cosmos-embed1 export -e \u002Fspecs\u002Fexport_onnx.yaml \\\n  export.checkpoint=\u002Fresults\u002Ftrain\u002Fcosmos_embed1_model_latest.pth \\\n  export.onnx_file=\u002Fresults\u002Fexport\u002Fcosmos_embed1_combined.onnx \\\n  results_dir=\u002Fresults\n```\n\nExport HuggingFace format:\n\n```bash\ndocker run \"${DOCKER_COMMON[@]}\" \"$COSMOS_EMBED_IMAGE\" \\\n  cosmos-embed1 export -e \u002Fspecs\u002Fexport_hf.yaml \\\n  export.checkpoint=\u002Fresults\u002Ftrain\u002Fcosmos_embed1_model_latest.pth \\\n  export.hf_output_dir=\u002Fresults\u002Fexport_hf\u002Fcosmos_embed1_hf \\\n  results_dir=\u002Fresults\n```\n\n## Smoke Overrides\n\nFor a small functional check, keep the same specs and override the expensive knobs:\n\n```bash\ntrain.max_iter=1\ntrain.validation_iter=2\ntrain.checkpoint_iter=1\ntrain.optim.optim=adamw\ndataset.train_dataset.batch_size=1\ndataset.val_dataset.batch_size=1\ndataset.train_dataset.workers=0\ndataset.val_dataset.workers=0\n```\n\nIf no local Cosmos-Embed1 pretrained checkpoint or HuggingFace token is available, set `model.pretrained_model_path=null` for a plumbing-only smoke train. The model quality is meaningless in that mode, but the train\u002Fevaluate\u002Finference\u002Fexport action paths can still be exercised.\n\nFor evaluation and inference smoke tests on a tiny subset:\n\n```bash\nevaluate.callbacks.embedding_visualization=false\nevaluate.callbacks.max_eval_samples=8\ndataset.test_dataset.batch_size=1\ndataset.test_dataset.workers=0\ninference.k=2\ndataset.inference_dataset.batch_size=1\ndataset.inference_dataset.workers=0\n```\n\n## Data Format\n\nThe MSR-VTT path expects a local video glob and a JSON metadata file:\n\n```yaml\ndataset:\n  train_dataset:\n    dataset_type: msrvtt\n    mp4_urls: \u002Fdata\u002Fvideo\u002F*.mp4\n    metadata: \u002Fdata\u002Fmsrvtt_test_1k.json\n```\n\nList-format metadata rows must include at least `video` and `caption`:\n\n```json\n{\"video_id\": \"video7020\", \"video\": \"video7020.mp4\", \"caption\": \"a woman creating a fondant baby and flower\"}\n```\n\nThe dataset loader derives the video id from the local `.mp4` filename and filters to videos present in the metadata. If a run finds zero videos, check that `mp4_urls` points to a container-local glob and that metadata `video` names match the filenames.\n\n## Model Weights\n\n- Local HF directory: mount it under `\u002Fmodel` and set `model.pretrained_model_path=\u002Fmodel\u002FCosmos-Embed1-224p`.\n- HuggingFace repo: set `model.pretrained_model_path=nvidia\u002FCosmos-Embed1-224p` and pass `HF_TOKEN` if access is gated.\n- Fine-tuned checkpoint: downstream actions default to `\u002Fresults\u002Ftrain\u002Fcosmos_embed1_model_latest.pth`.\n\nVariants:\n\n| Variant | Resolution | Frames | Embedding dim |\n|---|---:|---:|---:|\n| `Cosmos-Embed1-224p` | 224 x 224 | 8 | 256 |\n| `Cosmos-Embed1-336p` | 336 x 336 | 8 | 768 |\n| `Cosmos-Embed1-448p` | 448 x 448 | 8 | 768 |\n\nKeep `model.network.embed_dim`, `model.input_hw`, and `model.network.spatial_resolution` aligned with the selected variant.\n\n## Important Parameters\n\n| Parameter | Notes |\n|---|---|\n| `train.num_gpus` | `1` for single GPU, `>1` auto-launches `torchrun`, `-1` auto-detects visible GPUs. |\n| `train.max_iter` | Main training length. Use `1` only for smoke testing. |\n| `train.optim.optim` | `fused_adamw` is faster when available; `adamw` is safer for smoke and portability. |\n| `model.lora.enabled` | Enables LoRA. Set `model.network.visual_encoder.transformer_engine=false` when LoRA is on. |\n| `model.lora.lora_rank` | LoRA rank. Start with `8`; try `4`, `8`, or `16` for manual or AutoML-style sweeps. |\n| `model.lora.lora_alpha` | LoRA scaling factor. Start with `16`; keep near `2 * lora_rank` unless experiments show otherwise. |\n| `model.lora.lora_dropout` | LoRA dropout. Start with `0.1`; sweep `0.0`, `0.05`, and `0.1` for small datasets. |\n| `model.lora.bias` | Bias policy: `none`, `all`, or `lora_only`. Keep `none` unless intentionally training biases. |\n| `model.lora.use_rslora` \u002F `use_dora` | Optional LoRA variants. Enable one at a time and record the setting with the checkpoint. |\n| `model.lora.target_modules` | Optional module-name patterns for LoRA injection. Leave empty for the default ViT + Q-Former attention\u002FMLP targets. |\n| `model.lora.modules_to_save` | Optional modules to keep fully trainable alongside LoRA. Leave empty unless preserving a task-specific head. |\n| `evaluate.load_dataset_pkl` \u002F `save_dataset_pkl` | Cache evaluation embeddings. |\n| `inference.load_dataset_pkl` \u002F `save_dataset_pkl` | Cache the search database for repeated retrieval. |\n| `export.mode` | `video`, `text`, `combined`, or `huggingface`. |\n| `export.on_cpu` | Recommended for export to avoid device mismatch issues. |\n\n### LoRA and AutoML Notes\n\nFor parameter-efficient fine-tuning, set `model.lora.enabled=true` and keep\n`model.network.visual_encoder.transformer_engine=false`; TAO Core's\nCosmos-Embed1 config notes that PEFT cannot inject adapters into Transformer\nEngine layers. Treat the LoRA fields above as the first candidate parameters\nfor manual tuning or AutoML-style search before unfreezing larger model blocks.\nAvoid changing `target_modules` or `modules_to_save` unless the user explicitly\nneeds custom adapter placement.\n\n## S3 Staging\n\nThe Cosmos-Embed1 CLI consumes local paths and Python globs, not raw `s3:\u002F\u002F...\u002F*.mp4` URIs. For S3-backed runs, first stage a subset or full dataset to the execution host\u002Fcontainer filesystem, then use local paths such as `\u002Fdata\u002Fvideo\u002F*.mp4` in the spec.\n\nRecommended S3 layout for staged MSR-VTT data:\n\n```text\ns3:\u002F\u002Fbucket\u002Fpath\u002Fcosmos-embed\u002Fmsrvtt-subset\u002F\n├── msrvtt_test_1k.json\n└── video\u002F\n    ├── video7020.mp4\n    └── ...\n```\n\nAfter downloading\u002Fsyncing that prefix into the mounted `data\u002F` directory, use the same Docker commands above.\n\n## Outputs\n\n```text\nresults\u002F\n├── train\u002F\n│   ├── cosmos_embed1_model_latest.pth\n│   ├── cosmos_embed1_model_\u003Citer>.pth\n│   └── experiment.yaml\n├── evaluate\u002F\n│   ├── metrics.json\n│   └── experiment.yaml\n├── inference\u002F\n│   ├── results.json\n│   └── experiment.yaml\n├── export\u002F\n│   ├── cosmos_embed1_combined.onnx\n│   └── export_config.yaml\n└── export_hf\u002F\n    └── cosmos_embed1_hf\u002F\n```\n\n## Known Pitfalls\n\n| Symptom | Cause | Fix |\n|---|---|---|\n| `MSRVTTDataset: 0 videos found` | `mp4_urls` is not a local glob or metadata filenames do not match videos. | Mount data into the container and set `mp4_urls=\u002Fdata\u002Fvideo\u002F*.mp4`. |\n| HF download\u002Fauth failure | Missing or invalid `HF_TOKEN`, or model agreement not accepted. | Accept the model terms and pass `-e HF_TOKEN`. |\n| LoRA injection failure | Transformer Engine visual encoder is enabled. | Set `model.network.visual_encoder.transformer_engine=false`. |\n| ONNX\u002FHF export complains about missing components | Export checkpoint is partial or adapter-only. | Use a full checkpoint or configure pretrained visual\u002Ftext sources before export. |\n| CUDA OOM | Batch\u002Fresolution too high for the GPU. | Reduce batch size, use 224p, enable LoRA, or use more GPUs. |\n",{"name":5,"tags":49,"license":15,"metadata":55,"description":7,"allowed-tools":58,"compatibility":59},[50,51,52,42,53,31,28,54],"video","vision-language","vlm","retrieval","fine-tuning",{"author":56,"version":57},"NVIDIA Corporation","0.1.0","Read Bash","Requires docker + nvidia-container-toolkit, the published Cosmos-Embed TAO container from versions.yaml, and a HuggingFace token when downloading pretrained `nvidia\u002FCosmos-Embed1-*` weights.","main","7a940b8e5af16c95e5c190a524421d32fc7445a9",".agent\u002Fskills\u002Ftao-finetune-cosmos-embed","https:\u002F\u002Fgithub.com\u002Fheadmktlucca-ui\u002Fneuroads-lp","https:\u002F\u002Fgithub.com\u002Fheadmktlucca-ui","https:\u002F\u002Fneuroads.com.br","2026-08-12 00:42:44",{"source":8,"skillName":5,"commands":68,"prompt":78,"zipAvailable":79},[69,72,75],{"tool":70,"command":71},"npx","npx skills add headmktlucca-ui\u002Fneuroads-lp --skill tao-finetune-cosmos-embed",{"tool":73,"command":74},"bunx","bunx skills add headmktlucca-ui\u002Fneuroads-lp --skill tao-finetune-cosmos-embed",{"tool":76,"command":77},"pnpm","pnpm dlx skills add headmktlucca-ui\u002Fneuroads-lp --skill tao-finetune-cosmos-embed","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fheadmktlucca-ui\u002Fneuroads-lp\u002Fblob\u002Fmain\u002F.agent\u002Fskills\u002Ftao-finetune-cosmos-embed\u002FSKILL.md",true,[81,87,91,95,99,103,107,111,115,119],{"path":82,"resourceType":83,"resourceTypeDesc":84,"sizeBytes":85,"sourceHtmlUrl":86},"BENCHMARK.md","REFERENCE","参考文档",4387,"https:\u002F\u002Fgithub.com\u002Fheadmktlucca-ui\u002Fneuroads-lp\u002Fblob\u002Fmain\u002F.agent\u002Fskills\u002Ftao-finetune-cosmos-embed\u002FBENCHMARK.md",{"path":88,"resourceType":83,"resourceTypeDesc":84,"sizeBytes":89,"sourceHtmlUrl":90},"evals\u002Fevals.json",787,"https:\u002F\u002Fgithub.com\u002Fheadmktlucca-ui\u002Fneuroads-lp\u002Fblob\u002Fmain\u002F.agent\u002Fskills\u002Ftao-finetune-cosmos-embed\u002Fevals\u002Fevals.json",{"path":92,"resourceType":83,"resourceTypeDesc":84,"sizeBytes":93,"sourceHtmlUrl":94},"references\u002Fskill_info.yaml",2515,"https:\u002F\u002Fgithub.com\u002Fheadmktlucca-ui\u002Fneuroads-lp\u002Fblob\u002Fmain\u002F.agent\u002Fskills\u002Ftao-finetune-cosmos-embed\u002Freferences\u002Fskill_info.yaml",{"path":96,"resourceType":83,"resourceTypeDesc":84,"sizeBytes":97,"sourceHtmlUrl":98},"references\u002Fspec_template_evaluate.yaml",1201,"https:\u002F\u002Fgithub.com\u002Fheadmktlucca-ui\u002Fneuroads-lp\u002Fblob\u002Fmain\u002F.agent\u002Fskills\u002Ftao-finetune-cosmos-embed\u002Freferences\u002Fspec_template_evaluate.yaml",{"path":100,"resourceType":83,"resourceTypeDesc":84,"sizeBytes":101,"sourceHtmlUrl":102},"references\u002Fspec_template_export_hf.yaml",775,"https:\u002F\u002Fgithub.com\u002Fheadmktlucca-ui\u002Fneuroads-lp\u002Fblob\u002Fmain\u002F.agent\u002Fskills\u002Ftao-finetune-cosmos-embed\u002Freferences\u002Fspec_template_export_hf.yaml",{"path":104,"resourceType":83,"resourceTypeDesc":84,"sizeBytes":105,"sourceHtmlUrl":106},"references\u002Fspec_template_export_onnx.yaml",847,"https:\u002F\u002Fgithub.com\u002Fheadmktlucca-ui\u002Fneuroads-lp\u002Fblob\u002Fmain\u002F.agent\u002Fskills\u002Ftao-finetune-cosmos-embed\u002Freferences\u002Fspec_template_export_onnx.yaml",{"path":108,"resourceType":83,"resourceTypeDesc":84,"sizeBytes":109,"sourceHtmlUrl":110},"references\u002Fspec_template_inference.yaml",1156,"https:\u002F\u002Fgithub.com\u002Fheadmktlucca-ui\u002Fneuroads-lp\u002Fblob\u002Fmain\u002F.agent\u002Fskills\u002Ftao-finetune-cosmos-embed\u002Freferences\u002Fspec_template_inference.yaml",{"path":112,"resourceType":83,"resourceTypeDesc":84,"sizeBytes":113,"sourceHtmlUrl":114},"references\u002Fspec_template_train.yaml",2261,"https:\u002F\u002Fgithub.com\u002Fheadmktlucca-ui\u002Fneuroads-lp\u002Fblob\u002Fmain\u002F.agent\u002Fskills\u002Ftao-finetune-cosmos-embed\u002Freferences\u002Fspec_template_train.yaml",{"path":116,"resourceType":83,"resourceTypeDesc":84,"sizeBytes":117,"sourceHtmlUrl":118},"skill-card.md",4089,"https:\u002F\u002Fgithub.com\u002Fheadmktlucca-ui\u002Fneuroads-lp\u002Fblob\u002Fmain\u002F.agent\u002Fskills\u002Ftao-finetune-cosmos-embed\u002Fskill-card.md",{"path":120,"resourceType":121,"resourceTypeDesc":122,"sizeBytes":123,"sourceHtmlUrl":124},"skill.oms.sig","OTHER","其他",6113,"https:\u002F\u002Fgithub.com\u002Fheadmktlucca-ui\u002Fneuroads-lp\u002Fblob\u002Fmain\u002F.agent\u002Fskills\u002Ftao-finetune-cosmos-embed\u002Fskill.oms.sig",[126,151,176,202,220,255],{"skillNo":127,"name":128,"nameZh":6,"description":129,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":130,"licenseFileUrl":6,"sourceHtmlUrl":131,"categories":132,"keywords":139,"publishedAt":44},"01M6PTDCZTXTGSTX4RFK901YSZ","xunit-skill","Generates xUnit.net tests in C#. Covers Fact\u002FTheory, constructor injection, IClassFixture, and FluentAssertions. Use when user mentions \"xUnit\", \"[Fact]\", \"[Theory]\", \"Assert.Equal\", \"C# xUnit\". Triggers on: \"xUnit\", \"[Fact]\", \"[Theory]\", \"Assert.Equal C#\", \"xUnit.net\".","MIT","https:\u002F\u002Fgithub.com\u002Fheadmktlucca-ui\u002Fneuroads-lp\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fxunit-skill\u002FSKILL.md",[133,136],{"categoryNo":134,"categoryName":135,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000008","测试与质量",{"categoryNo":137,"categoryName":138,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000023","Skill与智能体开发",[140,141,142,143,144,145,146,147,148,149,150],"xunit","xunit skill","testing","injection","user","use","tests","triggers","unit","unit-testing","C#",{"skillNo":152,"name":153,"nameZh":6,"description":154,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":130,"licenseFileUrl":6,"sourceHtmlUrl":155,"categories":156,"keywords":159,"publishedAt":44},"01M6PTCB59ZTG5FTMWGPYEMMBP","xcuitest-skill","Generates XCUITest UI tests for iOS\u002FiPadOS apps in Swift. Apple's native testing framework for reliable, fast UI automation. Supports local simulators and TestMu AI cloud real devices. Use when user mentions \"XCUITest\", \"XCTest\", \"iOS UI test\", \"Swift test\", \"XCUIApplication\". Triggers on: \"XCUITest\", \"XCTest UI\", \"iOS UI test\", \"Swift UI test\", \"XCUIApplication\", \"TestMu\".","https:\u002F\u002Fgithub.com\u002Fheadmktlucca-ui\u002Fneuroads-lp\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fxcuitest-skill\u002FSKILL.md",[157,158],{"categoryNo":134,"categoryName":135,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":137,"categoryName":138,"taxonomyType":21,"taxonomyTypeDesc":22},[160,161,142,162,163,164,165,166,145,167,168,169,170,171,146,147,172,173,174,175],"xcuitest","xcuitest skill","automation","test","testing framework","ios","devices","mobile","mobile-testing","ui test","local","apple","apps","native","for","objective",{"skillNo":177,"name":178,"nameZh":6,"description":179,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":130,"licenseFileUrl":6,"sourceHtmlUrl":180,"categories":181,"keywords":186,"publishedAt":44},"01M6PTATMNTY9NF4J7KSR76YK6","world-builder","Create and manage generative game zones for Dorothy's Pokemon-style world. Use this skill when creating, updating, or designing game worlds via MCP tools.","https:\u002F\u002Fgithub.com\u002Fheadmktlucca-ui\u002Fneuroads-lp\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fworld-builder\u002FSKILL.md",[182,185],{"categoryNo":183,"categoryName":184,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000015","视觉设计",{"categoryNo":137,"categoryName":138,"taxonomyType":21,"taxonomyTypeDesc":22},[187,188,189,190,191,192,193,194,145,195,196,197,198,199,200,174,201],"builder","world","world builder","MCP","create","mcp tools","Tools","game","pokemon","manage","style","via","theme","zone","generative",{"skillNo":203,"name":204,"nameZh":6,"description":205,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":130,"licenseFileUrl":6,"sourceHtmlUrl":206,"categories":207,"keywords":210,"publishedAt":44},"01M6PT9Z92JTSQEHE1QR0NNW5F","webdriverio-skill","Generates WebdriverIO (WDIO) automation tests in JavaScript or TypeScript. Supports local and TestMu AI cloud. Use when user mentions \"WebdriverIO\", \"WDIO\", \"wdio.conf\", \"browser.url\", \"$\", \"$$\". Triggers on: \"WebdriverIO\", \"WDIO\", \"wdio\", \"browser.$\".","https:\u002F\u002Fgithub.com\u002Fheadmktlucca-ui\u002Fneuroads-lp\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fwebdriverio-skill\u002FSKILL.md",[208,209],{"categoryNo":134,"categoryName":135,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":137,"categoryName":138,"taxonomyType":21,"taxonomyTypeDesc":22},[211,142,212,162,213,214,215,216,144,145,217,170,146,147,218,219],"webdriverio skill","typescript","javascript","browser","cloud","e2e","e2e-testing","URL","conf",{"skillNo":221,"name":222,"nameZh":6,"description":223,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":130,"licenseFileUrl":6,"sourceHtmlUrl":224,"categories":225,"keywords":235,"publishedAt":44},"01M6PT9NVK36ZWCQ69YXK3FR4K","web-design-guidelines","Web platform design and accessibility guidelines. Use when building web interfaces, auditing accessibility, implementing responsive layouts, or reviewing web UI code. Triggers on tasks involving HTML, CSS, web components, WCAG compliance, responsive design, or web performance.","https:\u002F\u002Fgithub.com\u002Fheadmktlucca-ui\u002Fneuroads-lp\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fweb\u002FSKILL.md",[226,229,230],{"categoryNo":227,"categoryName":228,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000009","前端开发",{"categoryNo":183,"categoryName":184,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":231,"categoryName":232,"taxonomyType":233,"taxonomyTypeDesc":234},"01JBSEEDCAT000000000000032","设计师","PROFESSION","适用职业",[236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,147,254],"design","web","guidelines","web design guidelines","web design","css","performance","components","web components","tasks","code","web performance","ui","platform design","html","responsive design","responsive","platform","implementing",{"skillNo":256,"name":257,"nameZh":6,"description":258,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":130,"licenseFileUrl":6,"sourceHtmlUrl":259,"categories":260,"keywords":263,"publishedAt":44},"01M6PT9A3JKRE3X34276F2FW5R","watchos-design-guidelines","Apple Human Interface Guidelines for Apple Watch. Use when building watchOS apps, complications, or workout features. Triggers on tasks involving Watch UI, Digital Crown, glanceable interfaces, or wrist-based interactions.","https:\u002F\u002Fgithub.com\u002Fheadmktlucca-ui\u002Fneuroads-lp\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fwatchos\u002FSKILL.md",[261,262],{"categoryNo":183,"categoryName":184,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":231,"categoryName":232,"taxonomyType":233,"taxonomyTypeDesc":234},[236,238,264,245,248,145,265,266,171,253,267,147,172,268,174,269,270],"watchos design guidelines","workout","human","watch","interface","platform-design","features"]