alicli commited on
Commit
bc9bbb0
·
verified ·
1 Parent(s): 4a05252

Add InternVideo2-CLIP-anomaly-detection v1.0 (TAO fine-tune, research release)

Browse files

Adds the InternVideo2-CLIP-anomaly-detection v1.0 release files: the TAO `video_clip` fine-tune of OpenGVLab InternVideo2-CLIP-L14 (vision LoRA on the last 12 blocks, frozen MobileCLIP-B-LT text encoder, preservation regularization) trained on the PhysicalAI-Event-Videos train subset, released for non-commercial research under the NVIDIA Internal Scientific Research and Development Model License already set on this repository.

**Contents (19 files, 4.9 GB)**
- `model.safetensors` — fine-tuned weights with the 24 LoRA modules merged (486 tensors, 372,752,643 parameters, FP32, TAO state-dict key names) + `model_config.yaml`.
- `model_epoch_002_step_04011.no_teacher.pth` — TAO checkpoint, LoRA unmerged, teacher/optimizer state removed + `train_experiment.yaml`.
- `onnx_opset23/` — FP32 vision and text towers (opset 23, dynamic batch, `.onnx` + `.onnx.data`), ModelOpt AutoCast FP16 towers for strongly typed TensorRT builds, deploy config, export spec, CLIP BPE tokenizer.
- `README.md` — model card (research release), `MANIFEST.sha256`.

**Verification before upload**
- `model.safetensors` loads `strict=True` into a `peft`-disabled `VideoCLIPPlModel` and reproduces the merged-checkpoint reference embeddings exactly (max abs diff 0).
- FP32 ONNX towers vs the safetensors model on seeded and real-query probes: min cosine 0.99999994, max abs diff 5.7e-7.
- Checkpoint and ONNX SHA-256 values equal the internal v1.0 release manifest.

Accuracy: PhysicalAI-Event-Videos test subset event-only retrieval mAP 63.12% / Hit@1 59.11% / Hit@5 87.04% (base 54.34 / 50.69 / 78.49); Kinetics-400 zero-shot Top-1 69.19% / Top-5 89.64%. Details in the README.

Repository stays private until the release review completes. Contact: Alice Li (alicli@nvidia.com).

.gitattributes CHANGED
@@ -33,3 +33,5 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ onnx_opset23/iv2clip_v1.0_step04011_opset23_text.onnx.data filter=lfs diff=lfs merge=lfs -text
37
+ onnx_opset23/iv2clip_v1.0_step04011_opset23_vision.onnx.data filter=lfs diff=lfs merge=lfs -text
MANIFEST.sha256 ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 981db373f677a511f287c62dc823452267befd07e975c7e01881130e065aa4d9 README.md
2
+ 31992985a49ff1840a2c862e9fee029b57eb37b0eefcde1da09128e927e9dab6 model.safetensors
3
+ 282f74e63df566998249e4ab81ad34343a0f1a12358fc976e4d44d702d7e9070 model_config.yaml
4
+ a7c2b4148a882497d110dc2f5a3d124efb1210303ed59daec9ccb6eb4d073c63 model_epoch_002_step_04011.no_teacher.pth
5
+ a03f526bcf8372cf7516fe95c1d8c6eb4ec4e00b93fa5dd14dd753b838bc645e onnx_opset23/export_spec_v1.0_step04011_separate_opset23.yaml
6
+ b98dd5a682c3ef664382eaa6770ef89809c98e46e5e3809c98994d8331150faf onnx_opset23/iv2clip_v1.0_step04011_opset23_config.yaml
7
+ 6e41fa1c7fb94e6b438375048603f818dc6c6b5ee35f3d7259905905a3760f0b onnx_opset23/iv2clip_v1.0_step04011_opset23_text.autocast_fp16.onnx
8
+ 5e55caf759e88dbb85e37a8e124129070bcca2d57d85fd629aef43ce7954a51e onnx_opset23/iv2clip_v1.0_step04011_opset23_text.onnx
9
+ cacc6493c3a7863c1cd20bfec11600d4f2aeef953849f1cfa9fe87081887787f onnx_opset23/iv2clip_v1.0_step04011_opset23_text.onnx.data
10
+ 9fd691f7c8039210e0fced15865466c65820d09b63988b0174bfe25de299051a onnx_opset23/iv2clip_v1.0_step04011_opset23_tokenizer/merges.txt
11
+ 2cdb3b8331a60c92fc1e55a13e9fd61fd2293c5a51275fdcccd62b780052530e onnx_opset23/iv2clip_v1.0_step04011_opset23_tokenizer/special_tokens_map.json
12
+ 43d4281659ce30b6aca2c7485944b3d73925bb7f87c7234daf3b6b094a6d618c onnx_opset23/iv2clip_v1.0_step04011_opset23_tokenizer/tokenizer.json
13
+ 39bae5313c2da6467866dee758e754d69f0e302a875027b142531cb9c51c7c28 onnx_opset23/iv2clip_v1.0_step04011_opset23_tokenizer/tokenizer_config.json
14
+ 5047b556ce86ccaf6aa22b3ffccfc52d391ea4accdab9c2f2407da5b742d4363 onnx_opset23/iv2clip_v1.0_step04011_opset23_tokenizer/vocab.json
15
+ 141e726ae5dcf0bf7c3f21054e186ce8021410c403f73574e0d3dbb430be38f5 onnx_opset23/iv2clip_v1.0_step04011_opset23_vision.autocast_fp16.onnx
16
+ 63ee64deaef832b9b7ccfd340c809642f7e8285689d1a0f8cd3478527f1fb189 onnx_opset23/iv2clip_v1.0_step04011_opset23_vision.onnx
17
+ 27e70bca3f0ca169e1a6ae41fb3e1cafe6371d746f405ac0498cf54d6fc15f67 onnx_opset23/iv2clip_v1.0_step04011_opset23_vision.onnx.data
18
+ 7f3a5f6117c7226e4e237f432b68ed893e81093c77251a37b7633c0667681a96 train_experiment.yaml
README.md CHANGED
@@ -3,4 +3,315 @@ license: other
3
  license_name: nvidia-internal-scientific-research-and-development-model-license
4
  license_link: >-
5
  https://www.nvidia.com/en-us/agreements/enterprise-software/nvidia-internal-scientific-research-and-development-model-license/
 
 
 
 
 
 
 
 
 
 
 
 
6
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  license_name: nvidia-internal-scientific-research-and-development-model-license
4
  license_link: >-
5
  https://www.nvidia.com/en-us/agreements/enterprise-software/nvidia-internal-scientific-research-and-development-model-license/
6
+ tags:
7
+ - nvidia
8
+ - tao
9
+ - video-text-retrieval
10
+ - video-embeddings
11
+ - physical-ai
12
+ - anomaly-detection
13
+ - lora
14
+ - fine-tuned
15
+ - pytorch
16
+ - onnx
17
+ - tensorrt
18
  ---
19
+
20
+ # Model Overview
21
+
22
+ ### Description
23
+
24
+ InternVideo2-CLIP encodes video clips and text descriptions into a shared embedding space for text-to-video retrieval and zero-shot action classification. This model card describes an NVIDIA Train, Adapt, Optimize (TAO) [`video_clip`](https://docs.nvidia.com/tao/tao-toolkit/latest/text/embedding/video_clip/overview.html) fine-tune of the OpenGVLab InternVideo2-CLIP-L14 model with a MobileCLIP-B text encoder. Fine-tuning uses vision Low-Rank Adaptation (LoRA) and preservation regularization on the **train subset of [NVIDIA PhysicalAI-Event-Videos](https://huggingface.co/datasets/nvidia/PhysicalAI-Event-Videos)**. Retrieval evaluation uses the dataset's **test subset**; Kinetics-400 is reported separately as a general-domain benchmark. This model has been post-trained on the InternVideo2 CLIP-L14 model, and use of the InternVideo2 CLIP-L14 model is governed by Apache 2.0.
25
+
26
+ The model is **released for non-commercial research use only**. The output is an embedding, rather than a generated caption, bounding box, identity, or calibrated event probability. This model is for research and development only.
27
+
28
+ ### License/Terms of Use
29
+
30
+ GOVERNING TERMS: Use of this model is governed by the [NVIDIA Internal Scientific Research and Development Model License](https://www.nvidia.com/en-us/agreements/enterprise-software/nvidia-internal-scientific-research-and-development-model-license/). **Additional Information**: [Apache 2.0](https://huggingface.co/datasets/choosealicense/licenses/blob/main/markdown/apache-2.0.md) for the InternVideo2 CLIP-L14 base model, [Apple Machine Learning Research Model License](https://github.com/apple-aiml-research/ml-mobileclip/blob/main/LICENSE_MODELS) for the MobileCLIP-B-LT text encoder, and [MIT](https://huggingface.co/datasets/choosealicense/licenses/blob/main/markdown/mit.md) for the CLIP tokenizer files. <br>
31
+
32
+ Apple Machine Learning Research Model is licensed under the Apple Machine Learning Research Model License Agreement.
33
+
34
+ ### Deployment Geography
35
+
36
+ Global
37
+
38
+ ### Use Case
39
+
40
+ Intended users are developers evaluating video retrieval and event-search systems for physical-world video collections, including warehouse, retail, traffic, and general activity footage. A text query is compared with video embeddings to rank candidate clips. Zero-shot classification compares video embeddings with prompted action-class descriptions. The model is not for use in commercial products or services.
41
+
42
+ The model is not validated as an autonomous safety decision system. Similarity scores require application-specific evaluation and should not be interpreted as proof that an event occurred.
43
+
44
+ ### Release Date
45
+
46
+ Hugging Face 11/03/2026 via [https://huggingface.co/nvidia/InternVideo2-CLIP-anomaly-detection](https://huggingface.co/nvidia/InternVideo2-CLIP-anomaly-detection) (private until the release review completes). This model is released on Hugging Face only; it is not published on NGC.
47
+
48
+ ## References(s)
49
+
50
+ - [NVIDIA PhysicalAI-Event-Videos](https://huggingface.co/datasets/nvidia/PhysicalAI-Event-Videos): public reference for the training and evaluation subsets and the annotation workflow.
51
+ - [OpenGVLab InternVideo](https://github.com/OpenGVLab/InternVideo): upstream model family and implementation.
52
+ - [InternVideo2 distillation assets](https://huggingface.co/OpenGVLab/InternVideo2_distillation_models): upstream vision and alignment weights.
53
+ - [MobileCLIP](https://github.com/apple-aiml-research/ml-mobileclip): source of the MobileCLIP-B-LT text encoder, licensed under the [Apple Machine Learning Research Model License](https://github.com/apple-aiml-research/ml-mobileclip/blob/main/LICENSE_MODELS) (research-only).
54
+ - [NVIDIA TAO InternVideo2-CLIP (`video_clip`) overview](https://docs.nvidia.com/tao/tao-toolkit/latest/text/embedding/video_clip/overview.html): model description and data input format for the TAO pipeline.
55
+ - [NVIDIA TAO InternVideo2-CLIP training, evaluation, inference, and export guide](https://docs.nvidia.com/tao/tao-toolkit/latest/text/embedding/video_clip/training.html): experiment specification, `train`, `evaluate`, `inference`, and `export` subtasks, and ONNX/TensorRT usage notes.
56
+ - [Using InternVideo2-CLIP embeddings](https://docs.nvidia.com/tao/tao-toolkit/latest/text/embedding/video_clip/applications.html): loading the exported ONNX model and using the embeddings for text-to-video retrieval, zero-shot classification, and anomaly detection.
57
+ - [InternVideo2-CLIP with TAO Deploy](https://docs.nvidia.com/tao/tao-toolkit/latest/text/tao_deploy/video_clip.html): TensorRT engine generation and TensorRT-side evaluation and inference.
58
+ - [NVIDIA TAO PyTorch](https://github.com/NVIDIA/tao_pytorch_backend): TAO model implementation; release-specific compatibility remains to be confirmed.
59
+ - [Kinetics dataset](https://github.com/cvdfoundation/kinetics-dataset): action-recognition evaluation data.
60
+
61
+ ## Model Architecture
62
+
63
+ **Architecture Type:** Transformer.<br>
64
+ **Network Architecture:** InternVideo2-CLIP-L14 vision encoder with a frozen, unmodified Apple MobileCLIP-B-LT text encoder and a shared 512-dimensional embedding space.<br>
65
+ **Base Model:** OpenGVLab InternVideo2-CLIP-L14.<br>
66
+ **Number of model parameters:** Approximately **3.7 × 10^8** (373,342,467, of which 589,824 are LoRA parameters); excludes the preservation teacher and optimizer state.
67
+
68
+ The vision transformer has 24 blocks, 14-pixel spatial patches, a hidden width of 1,024, and 16 attention heads. A visual projection and alignment layer map video features to the text embedding space. The text tower remains frozen during this fine-tune. LoRA targets the `qkv` and `proj` modules in the last 12 vision blocks, with rank 8, alpha 16, and dropout 0.05.
69
+
70
+ The training recipe uses video-text contrastive loss, preservation regularization, bfloat16 (BF16) precision, and AdamW (learning rate 1e-3, cosine schedule, 100 warmup steps) with an effective batch of 64. Training started from the base weights, and the released checkpoint was selected on the validation set described below. The fine-tune was run with the TAO `video_clip` `train` subtask; the experiment-specification format and these recipe fields are documented in the [TAO training guide](https://docs.nvidia.com/tao/tao-toolkit/latest/text/embedding/video_clip/training.html#training-the-model). These training details do not specify deployment hardware requirements.
71
+
72
+ ## Input(s)
73
+
74
+ **Input Type(s):** Video and text; each encoder can be used independently.<br>
75
+ **Input Format(s):** RGB video frames and UTF-8 text strings.<br>
76
+ **Input Parameters:** Video is a temporal sequence of two-dimensional RGB frames; text is a one-dimensional token sequence.
77
+
78
+ **Other Properties Related to Input:**
79
+
80
+ - The measured video protocol samples eight frames uniformly across each supplied clip and resizes each frame to 224 × 224 using bicubic interpolation. Published evaluation clips are already trimmed and receive no second temporal crop.
81
+ - RGB values are converted to floating point in [0, 1] and normalized using mean `(0.485, 0.456, 0.406)` and standard deviation `(0.229, 0.224, 0.225)`.
82
+ - The TAO adapter receives video tensors shaped `[batch, 8, 3, 224, 224]`; the backbone internally permutes them to channel-first video layout.
83
+ - The CLIP tokenizer produces 77-token sequences, including special tokens, with padding/truncation to the context length. Text tensors have shape `[batch, 77]`.
84
+ - Evaluation uses English descriptions. Multilingual quality and alternative frame counts or resolutions have not been established for this checkpoint.
85
+ - Audio is not an input to the evaluated model.
86
+
87
+ ## Output(s)
88
+
89
+ **Output Type(s):** Video embedding and text embedding.<br>
90
+ **Output Format(s):** Floating-point vectors.<br>
91
+ **Output Parameters:** One 512-dimensional vector per video clip or text input; batched shape `[batch, 512]`.<br>
92
+ **Other Properties Related to Output:** The TAO adapter supports L2-normalized outputs. Cosine similarity ranks video-text pairs; it is not a calibrated probability. The retrieval workflow additionally produces rankings and similarity scores.
93
+
94
+ Our AI models are designed and/or optimized to run on NVIDIA GPU-accelerated systems. By leveraging NVIDIA's hardware (e.g. GPU cores) and software frameworks (e.g., CUDA libraries), the model achieves faster training and inference times compared to CPU-only solutions. CPU throughput and cross-hardware equivalence were not measured.
95
+
96
+ ## Software Integration
97
+
98
+ **Runtime Engine(s):** PyTorch through NVIDIA TAO [`video_clip`](https://docs.nvidia.com/tao/tao-toolkit/latest/text/embedding/video_clip/training.html) (accuracy evaluation); TensorRT 10.16 with a strongly typed FP16 ONNX export (performance measurement), deployable through [TAO Deploy](https://docs.nvidia.com/tao/tao-toolkit/latest/text/tao_deploy/video_clip.html). The inspected TAO source includes inference, evaluation, and ONNX export paths. The minimum public TAO release supporting this exact checkpoint is **pending confirmation**.
99
+
100
+ **Supported Hardware Microarchitecture Compatibility:** NVIDIA Ampere (A100) is verified for the reported accuracy evaluation. NVIDIA Hopper (H100), Ada Lovelace (L40S), and Blackwell (RTX PRO 6000 Server Edition, GB300) were measured for TensorRT performance.
101
+
102
+ **Supported Operating System(s):** Linux in the recorded evaluation environment.
103
+
104
+ Integration requires a checkpoint-compatible model configuration, the base assets, tokenizer, and the matching LoRA configuration. The training checkpoint also stores preservation-teacher state; loading or packaging must handle that state consistently. System-level testing with application-specific data is required before deployment.
105
+
106
+ The integration of foundation and fine-tuned models into AI systems requires additional testing using use-case-specific data to ensure safe and effective deployment. Following the V-model methodology, iterative testing and validation at both unit and system levels are essential to mitigate risks, meet technical and functional requirements, and ensure compliance with safety and ethical standards before deployment.
107
+
108
+ ## Model Version(s)
109
+
110
+ | Version | Configuration |
111
+ | --- | --- |
112
+ | **InternVideo2-CLIP-L14 TAO fine-tune v1.0 (research release, non-commercial)** | Vision LoRA on the last 12 blocks, frozen text encoder, preservation regularization |
113
+
114
+ The release is published as the Hugging Face repository `nvidia/InternVideo2-CLIP-anomaly-detection`. The upstream base model below is an evaluation reference, not an additional fine-tuned release variant.
115
+
116
+ The model integrates into an AI system as an embedding encoder: the video tower embeds clips once into a searchable index, the text tower embeds user queries at search time, and the application ranks clips by cosine similarity. Both towers run through TAO `video_clip` inference or as exported ONNX models inside a retrieval or event-search service.
117
+
118
+ ## Training, Testing, and Evaluation Datasets
119
+
120
+ ### Dataset Overview
121
+
122
+ All training data comes from the **train subset of [NVIDIA PhysicalAI-Event-Videos](https://huggingface.co/datasets/nvidia/PhysicalAI-Event-Videos)**. All retrieval testing and evaluation data comes from its **test subset**. Kinetics-400 is a separate general-domain action-classification benchmark.
123
+
124
+ The train subset used for this fine-tune contains **2,743 source videos, 6,059 chunks, and 85,621 caption entries** (counts from the training manifest; caption entries are training pairs, not necessarily unique text strings). The test subset has **393 clips from 166 source videos and 3,040 event queries**; its 3,000 person-attribute-search (PAS) queries are excluded from all domain results reported here. General-domain evaluation uses 19,877 successfully decoded Kinetics-400 validation clips.
125
+
126
+ Checkpoint selection used an earlier relevance revision of the same test gallery; the updated relevance annotations do not constitute a new independent held-out test.
127
+
128
+ ### Training Dataset
129
+
130
+ **Dataset:** [NVIDIA PhysicalAI-Event-Videos](https://huggingface.co/datasets/nvidia/PhysicalAI-Event-Videos), train subset.<br>
131
+ **Data Modality:** Video and English text.<br>
132
+ **Video Training Data Size:** Less than 10,000 hours of fine-tuning video.<br>
133
+ **Text Training Data Size:** Less than a Billion Tokens (85,621 caption entries, each at most 77 tokens).<br>
134
+ **Data Collection Method:** Hybrid: Synthetic, Manually-Collected <br>
135
+ **Labeling Method:** Hybrid: Automated, Manually-Labeled (automated pseudo-labeling produces captions and queries, with human review and correction for a subset of annotations).<br>
136
+
137
+ Training metadata expands selected caption, anomaly, and action query fields into video-text pairs. Legacy dense-caption and scene-caption entries are excluded by this run's selection recipe. The data includes descriptions and footage of human activities, anomalous events, and physical-world scenes, including synthetic and real people.
138
+
139
+ The training manifest has zero media overlap with the test gallery used for checkpoint selection; up to 825 training query strings also appear among the evaluation queries. This is not a comprehensive perceptual-duplicate audit.
140
+
141
+ ### Testing Dataset
142
+
143
+ All retrieval testing data comes from the **test subset of [NVIDIA PhysicalAI-Event-Videos](https://huggingface.co/datasets/nvidia/PhysicalAI-Event-Videos)**. An earlier relevance revision of this gallery was also used for validation and checkpoint selection, so the reported result is not an independent held-out generalization estimate.
144
+
145
+ **Data Modality:** Video and English text.<br>
146
+ **Data Collection Method:** Hybrid: Synthetic, Manually-Collected <br>
147
+ **Labeling Method:** Hybrid: Automated, Manually-Labeled (automated query and relevance annotation with human review and correction) <br>
148
+ **Properties:** 393 trimmed video clips from 166 source videos and 3,040 English natural-language event queries (264 anomaly, 1,369 activity, 64 location, 1,343 precise-moment), each with one or more labeled relevant clips. Content is surveillance-style physical-world footage of everyday human activity and anomalous events, including fights, falls, and theft, in warehouse, retail, street, and indoor scenes. Queries are short English phrases or sentences; no other languages are included.
149
+
150
+ ### Evaluation Dataset
151
+
152
+ All numbers below were measured on the released checkpoint.
153
+
154
+ **Data Collection Method by dataset:**
155
+ - PhysicalAI-Event-Videos test subset: Hybrid: Synthetic, Manually-Collected <br>
156
+ - Kinetics-400: Hybrid: Automated, Manually-Collected <br>
157
+
158
+ **Labeling Method by dataset:**
159
+ - PhysicalAI-Event-Videos test subset: Hybrid: Automated, Manually-Labeled <br>
160
+ - Kinetics-400: Manually-Labeled <br>
161
+
162
+ #### PhysicalAI-Event-Videos test subset — event-only retrieval
163
+
164
+ All retrieval evaluation data comes from the **test subset of [NVIDIA PhysicalAI-Event-Videos](https://huggingface.co/datasets/nvidia/PhysicalAI-Event-Videos)**: **393 clips** and **3,040 English event queries**, comprising 264 anomaly, 1,369 activity, 64 location, and 1,343 precise-moment queries. All rows use the September 16, 2026 relevance revision, released trimmed clips, and eight uniformly sampled frames. IV2CLIP uses 224-pixel inputs, BF16, and batch size four on an A100. The zero-shot Qwen3-VL-Embedding baselines use their model-specific preprocessing and resolution, BF16, and video batch size one. Their text and video instructions are respectively `Represent the user's input for video anomaly retrieval.` and `Represent this video clip for anomaly retrieval.`
165
+
166
+ For each query, all 393 clips are ranked by cosine similarity. **mAP** averages per-query average precision across all labeled relevant clips. **Hit@K** is the fraction of queries with at least one relevant clip in the first K results; it is not multi-relevance Recall@K. All query records, including repeated texts, are scored. PAS results are not reported.
167
+
168
+ | Model | mAP | Hit@1 | Hit@5 |
169
+ | --- | ---: | ---: | ---: |
170
+ | Upstream IV2CLIP-L14 base | 54.34% | 50.69% | 78.49% |
171
+ | **This model (TAO fine-tune)** | **63.12%** | **59.11%** | **87.04%** |
172
+ | Qwen3-VL-Embedding-2B (zero-shot) | 59.67% | 57.40% | 84.67% |
173
+ | Qwen3-VL-Embedding-8B (zero-shot) | 60.58% | 58.03% | 85.26% |
174
+
175
+ | Query category | Queries | mAP | Hit@1 | Hit@5 |
176
+ | --- | ---: | ---: | ---: | ---: |
177
+ | Anomaly | 264 | 67.77% | 75.76% | 95.08% |
178
+ | Activity | 1,369 | 69.32% | 73.70% | 91.23% |
179
+ | Location | 64 | 99.29% | 100.00% | 100.00% |
180
+ | Precise-moment search | 1,343 | 54.16% | 39.02% | 80.57% |
181
+
182
+ Native retrieval metrics were independently recomputed from the saved embeddings and agreed to within 1e-15. AUC is omitted because the pinned native evaluator had a score/label alignment defect.
183
+
184
+ **Protocol limitation:** The result is not an independent held-out generalization estimate, because checkpoint selection used an earlier relevance revision of the same gallery.
185
+
186
+ #### Kinetics-400 — zero-shot action classification
187
+
188
+ Kinetics-400 contains real-world human-action video with human action-class labels. All rows use eight sampled frames, the same 400 class names, the prompt `A video of a person {label}`, and cosine ranking. IV2CLIP uses 224 × 224 inputs; Qwen uses model-specific preprocessing and resolution, with text and video instructions `Represent this action class for matching to a video.` and `Represent this video for action classification.` Of 19,881 available validation clips, 19,877 decoded successfully; four were excluded. Top-K accuracy measures whether the ground-truth action class is among the K highest-scoring prompted classes. These are archived evaluations under the shared protocol, not a single identical model-input pipeline; pretraining overlap with Kinetics-400 cannot be ruled out for the zero-shot models.
189
+
190
+ | Model | Top-1 accuracy | Top-5 accuracy |
191
+ | --- | ---: | ---: |
192
+ | Upstream IV2CLIP-L14 base, recorded same-protocol reference | 70.11% | 89.60% |
193
+ | **This model (TAO fine-tune)** | **69.19%** | **89.64%** |
194
+ | Qwen3-VL-Embedding-2B (zero-shot) | 67.62% | 88.70% |
195
+ | Qwen3-VL-Embedding-8B (zero-shot) | 69.57% | 89.94% |
196
+
197
+ The fine-tune improves the measured domain retrieval score (+8.78 percentage points mAP over the base) while reducing Kinetics-400 Top-1 accuracy by 0.92 percentage points versus the recorded base reference. The Kinetics evaluation used merged LoRA weights (24 modules) on the 19,877 decodable validation clips. It did not retrain the model.
198
+
199
+ ## Inference
200
+
201
+ **Acceleration Engine:** PyTorch (accuracy results); TensorRT 10.16 (performance results) <br>
202
+ **Test Hardware:** <br>
203
+ - NVIDIA Ampere A100
204
+ - NVIDIA Blackwell RTX PRO 6000 Server Edition
205
+ - NVIDIA Hopper H100 80GB HBM3
206
+ - NVIDIA Ada Lovelace L40S
207
+ - NVIDIA Blackwell GB300 (DGX Station)
208
+
209
+ Accuracy results above are from PyTorch; domain retrieval ran on one NVIDIA Ampere A100 GPU, and the distributed Kinetics-400 evaluation ran on multiple NVIDIA Ampere A100 80-GB GPUs, which describes the evaluation setup, not a minimum inference requirement. TensorRT accuracy has not been benchmarked on the evaluation sets.
210
+
211
+ ### NVIDIA Performance Lab (PerLab) TensorRT Performance
212
+
213
+ NVIDIA PerLab measured TensorRT performance (PBR 309421) with `trtexec`, TensorRT 10.16.0.72, CUDA 13.2.51, cuDNN 9.20, driver 595.58.03, and the `nvcr.io/nvidia/tao/tao-toolkit:7.0.1-pyt` container. The engine was built with `--stronglyTyped` from a ModelOpt AutoCast FP16 ONNX export (opset 23, RMSNorm layers kept in FP32) with an identical architecture. Each inference takes an `8 × 3 × 224 × 224` video clip and a 77-token text input on one GPU. The engine is about 0.76 GB.
214
+
215
+ | GPU | Throughput, batch 1 (clips/s) | GPU compute, batch 1 (ms) | Throughput, batch 8 (clips/s) | Throughput, batch 32 (clips/s) | GPU compute, batch 32 (ms) |
216
+ | --- | ---: | ---: | ---: | ---: | ---: |
217
+ | NVIDIA Blackwell RTX PRO 6000 Server Edition | 101.1 | 9.89 | 162.4 | 157.9 | 202.7 |
218
+ | NVIDIA Hopper H100 80GB HBM3 | 152.9 | 6.54 | 249.2 | 257.9 | 124.1 |
219
+ | NVIDIA Ada Lovelace L40S | 79.2 | 12.63 | 85.9 | 83.5 | 383.1 |
220
+ | NVIDIA Blackwell GB300 (DGX Station) | 287.2 | 3.48 | 511.0 | 526.8 | 60.7 |
221
+
222
+ A clip is one video-text pair. GPU compute is the mean `trtexec` GPU compute time per inference call.
223
+
224
+ **Note:** The measured engine combines the vision and text towers in one graph, so every call runs both towers. Deployment can run faster with the towers separated: video clips are embedded once at indexing time with a vision-tower engine, and only the lightweight text tower runs for each query. Separate vision-tower and text-tower ONNX files are provided for this purpose. Separate-tower performance was not measured in PBR 309421.
225
+
226
+ ### Files in this repository
227
+
228
+ Every file is covered by `MANIFEST.sha256` (`sha256sum -c MANIFEST.sha256`). The ONNX files and the two checkpoints encode the same weights: the PyTorch towers rebuilt from `model.safetensors` reproduce the FP32 ONNX embeddings to within 6 × 10⁻⁷ (minimum cosine 0.99999994) on seeded and real-query probes, and `model.safetensors` reproduces the embeddings of `model_epoch_002_step_04011.no_teacher.pth` after LoRA merge exactly.
229
+
230
+ | File | Bytes | SHA-256 (prefix) | Purpose |
231
+ | --- | ---: | --- | --- |
232
+ | `model.safetensors` | 1,491,073,916 | `31992985a49ff184…` | Fine-tuned weights with the 24 vision LoRA modules merged into the base linear layers (486 tensors, 372,752,643 parameters, FP32; TAO `VideoCLIPPlModel` state-dict key names, `peft` disabled). Loads with `model_config.yaml`. |
233
+ | `model_config.yaml` | 1,346 | `282f74e63df56699…` | TAO `video_clip` model block (`peft.enabled: false`) for loading `model.safetensors`. |
234
+ | `model_epoch_002_step_04011.no_teacher.pth` | 1,493,567,543 | `a7c2b4148a882497…` | TAO training checkpoint (epoch 2, step 4,011) with the LoRA adapters unmerged: 534 tensors, preservation-teacher and optimizer state removed. Loads with `train_experiment.yaml` and `regularization.enabled: false`. |
235
+ | `train_experiment.yaml` | 6,153 | `7f3a5f6117c7226e…` | Complete TAO `video_clip` training specification of the fine-tune (paths replaced by placeholders). |
236
+ | `onnx_opset23/iv2clip_v1.0_step04011_opset23_vision.onnx` | 3,914,064 | `63ee64deaef832b9…` | FP32 vision tower, ONNX opset 23, dynamic batch, LoRA merged; 96 fused `RMSNormalization` ops. Keep with its `.onnx.data` file. |
237
+ | `onnx_opset23/iv2clip_v1.0_step04011_opset23_vision.onnx.data` | 1,237,385,216 | `27e70bca3f0ca169…` | External weights of the FP32 vision tower. |
238
+ | `onnx_opset23/iv2clip_v1.0_step04011_opset23_text.onnx` | 1,230,030 | `5e55caf759e88dbb…` | FP32 text tower, ONNX opset 23, dynamic batch. Keep with its `.onnx.data` file. |
239
+ | `onnx_opset23/iv2clip_v1.0_step04011_opset23_text.onnx.data` | 253,755,392 | `cacc6493c3a7863c…` | External weights of the FP32 text tower. |
240
+ | `onnx_opset23/iv2clip_v1.0_step04011_opset23_vision.autocast_fp16.onnx` | 619,141,817 | `141e726ae5dcf0bf…` | Vision tower for FP16 TensorRT deployment (ModelOpt AutoCast: FP16 bulk, `RMSNormalization` kept FP32, FP32 I/O, single file). Build strongly typed. |
241
+ | `onnx_opset23/iv2clip_v1.0_step04011_opset23_text.autocast_fp16.onnx` | 126,946,278 | `6e41fa1c7fb94e6b…` | Text tower for FP16 TensorRT deployment (AutoCast, FP32 I/O, single file). Build strongly typed. |
242
+ | `onnx_opset23/iv2clip_v1.0_step04011_opset23_config.yaml` | 6,588 | `b98dd5a682c3ef66…` | Deploy configuration written by the TAO exporter (`model.init_logit_scale` = 4.544891, i.e. exp = 94.1502; `init_logit_bias` = 0). |
243
+ | `onnx_opset23/export_spec_v1.0_step04011_separate_opset23.yaml` | 6,003 | `a03f526bcf8372cf…` | TAO `video_clip export` specification that produced the ONNX files (separate towers, opset 23, dynamic batch). |
244
+ | `onnx_opset23/iv2clip_v1.0_step04011_opset23_tokenizer/` | 5,030,306 (5 files) | see `MANIFEST.sha256` | Hugging Face tokenizer equivalent to the model's CLIP BPE tokenizer (`openai/clip-vit-large-patch14`, MIT): `tokenizer.json`, `vocab.json`, `merges.txt`, `tokenizer_config.json`, `special_tokens_map.json`. |
245
+
246
+ ### Loading the weights
247
+
248
+ The TAO `video_clip` model constructor needs the upstream base assets referenced in the specification files: the InternVideo2 vision and alignment weights (`model.internvideo2clip_hf_id: OpenGVLab/InternVideo2_distillation_models`, resolved through the Hugging Face cache) and the Apple MobileCLIP-B-LT text-encoder file (`model.text_encoder`, `mobileclip_blt.pt`). Both are subject to their own licenses listed above.
249
+
250
+ ```python
251
+ from omegaconf import OmegaConf
252
+ from safetensors.torch import load_file
253
+ from nvidia_tao_pytorch.config.video_clip.default_config import VideoCLIPExperimentConfig
254
+ from nvidia_tao_pytorch.multimodal.video_clip.model.pl_video_clip_model import VideoCLIPPlModel
255
+
256
+ # merged weights (no LoRA modules)
257
+ cfg = OmegaConf.merge(OmegaConf.structured(VideoCLIPExperimentConfig), OmegaConf.load("model_config.yaml"))
258
+ model = VideoCLIPPlModel(experiment_spec=cfg).eval()
259
+ model.load_state_dict(load_file("model.safetensors"), strict=True)
260
+
261
+ # or the TAO checkpoint with the LoRA adapters still separate
262
+ cfg = OmegaConf.merge(OmegaConf.structured(VideoCLIPExperimentConfig), OmegaConf.load("train_experiment.yaml"))
263
+ cfg.regularization.enabled = False
264
+ model = VideoCLIPPlModel.load_from_checkpoint("model_epoch_002_step_04011.no_teacher.pth", map_location="cpu", experiment_spec=cfg).eval()
265
+ ```
266
+
267
+ ### Using the ONNX towers
268
+
269
+ - Vision tower: input `image` float32 `[B, 8, 3, 224, 224]`; output `image_embedding` float32 `[B, 512]`, L2-normalized. Sample 8 frames uniformly over the clip (`linspace(0, n-1, 8)`), RGB, bicubic resize to 224 × 224, scale to [0, 1], normalize with mean `(0.485, 0.456, 0.406)` and standard deviation `(0.229, 0.224, 0.225)`.
270
+ - Text tower: inputs `input_ids` and `attention_mask`, both int64 `[B, 77]` (the mask is accepted for compatibility and ignored); output `text_embedding` float32 `[B, 512]`, L2-normalized. Tokenize with the bundled tokenizer using `padding="max_length", truncation=True, max_length=77`.
271
+ - The FP32 files also output the constants `logit_scale` (94.1502, already exponentiated) and `logit_bias` (0). Similarity is `logit_scale * (image_embedding · text_embedding) + logit_bias`; ranking only needs the dot product.
272
+ - The opset-23 graphs use the fused `RMSNormalization` operator: onnxruntime 1.23 or newer is required. The AutoCast FP16 files must be built **strongly typed** in TensorRT; a weakly typed `--fp16` build re-lowers the vision RMSNorm to half precision and collapses the vision embeddings.
273
+
274
+ ```bash
275
+ trtexec --onnx=onnx_opset23/iv2clip_v1.0_step04011_opset23_vision.autocast_fp16.onnx --stronglyTyped \
276
+ --minShapes=image:1x8x3x224x224 --optShapes=image:8x8x3x224x224 --maxShapes=image:16x8x3x224x224 \
277
+ --saveEngine=iv2clip_vision_fp16.plan
278
+ trtexec --onnx=onnx_opset23/iv2clip_v1.0_step04011_opset23_text.autocast_fp16.onnx --stronglyTyped \
279
+ --minShapes=input_ids:1x77,attention_mask:1x77 --optShapes=input_ids:8x77,attention_mask:8x77 \
280
+ --maxShapes=input_ids:16x77,attention_mask:16x77 --saveEngine=iv2clip_text_fp16.plan
281
+ ```
282
+
283
+ ### How to use this model
284
+
285
+ Use a TAO installation containing the `video_clip` InternVideo2-CLIP-L14 implementation, the matching base assets and tokenizer, and a complete experiment specification compatible with this checkpoint. The [TAO InternVideo2-CLIP overview](https://docs.nvidia.com/tao/tao-toolkit/latest/text/embedding/video_clip/overview.html) describes the model and data input format; the [training, evaluation, inference, and export guide](https://docs.nvidia.com/tao/tao-toolkit/latest/text/embedding/video_clip/training.html) documents the experiment specification and every subtask below. Set `model.type: internvideo2-clip-l14`, `model.num_frames: 8`, and `model.image_size: 224`, and restore the vision-LoRA configuration described above. The files in this repository are listed under **Files in this repository** above.
286
+
287
+ **Train** ([guide](https://docs.nvidia.com/tao/tao-toolkit/latest/text/embedding/video_clip/training.html#training-the-model)): fine-tune from the base weights with the recipe described under Model Architecture.
288
+
289
+ ```bash
290
+ video_clip train -e /path/to/train.yaml
291
+ ```
292
+
293
+ **Evaluate** ([guide](https://docs.nvidia.com/tao/tao-toolkit/latest/text/embedding/video_clip/training.html#evaluating-the-model)): compute retrieval metrics against a query/gallery set with this checkpoint selected in the evaluation section.
294
+
295
+ ```bash
296
+ video_clip evaluate -e /path/to/evaluate.yaml
297
+ ```
298
+
299
+ **Inference** ([guide](https://docs.nvidia.com/tao/tao-toolkit/latest/text/embedding/video_clip/training.html#running-inference)): use `inference.mode: embeddings` for embedding extraction or `inference.mode: retrieval` for ranked retrieval with the configured query and gallery inputs.
300
+
301
+ ```bash
302
+ video_clip inference -e /path/to/inference.yaml
303
+ ```
304
+
305
+ **Export and deploy** ([export guide](https://docs.nvidia.com/tao/tao-toolkit/latest/text/embedding/video_clip/training.html#exporting-the-model), [TAO Deploy](https://docs.nvidia.com/tao/tao-toolkit/latest/text/tao_deploy/video_clip.html), [using the embeddings](https://docs.nvidia.com/tao/tao-toolkit/latest/text/embedding/video_clip/applications.html)): export the towers to ONNX, build a TensorRT engine and run TensorRT-side evaluation and inference with TAO Deploy, and consume the ONNX embeddings in a retrieval or event-search application. Export and deployment validation must use the same tokenizer, normalization, LoRA weights, and output dimensions as the PyTorch path.
306
+
307
+ ```bash
308
+ video_clip export -e /path/to/export.yaml
309
+ ```
310
+
311
+ ## Ethical Considerations
312
+
313
+ NVIDIA believes Trustworthy AI is a shared responsibility. Developers should evaluate this model against their intended domain and address potential misuse before deployment.
314
+
315
+ Users must have the necessary rights and permissions for input images and video, including content depicting people or containing intellectual property. Embedding extraction does not anonymize source content. Retrieval errors can produce false alarms or missed events; inspect source clips and validate downstream decisions in context. Commercial deployment is not permitted under the Apple MobileCLIP license; it would require a separate Apple commercial license or a replacement text encoder.
316
+
317
+ Please report model quality, risk, security vulnerabilities, or NVIDIA AI concerns through [NVIDIA's reporting channel](https://www.nvidia.com/en-us/support/submit-security-vulnerability/).
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:31992985a49ff1840a2c862e9fee029b57eb37b0eefcde1da09128e927e9dab6
3
+ size 1491073916
model_config.yaml ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Model block for loading model.safetensors (LoRA already merged) into a TAO video_clip VideoCLIPPlModel with peft disabled:
2
+ # cfg = OmegaConf.merge(OmegaConf.structured(VideoCLIPExperimentConfig), OmegaConf.load('model_config.yaml'))
3
+ # pl = VideoCLIPPlModel(experiment_spec=cfg); pl.load_state_dict(safetensors.torch.load_file('model.safetensors'), strict=True)
4
+ # To load model_epoch_002_step_04011.no_teacher.pth instead, use train_experiment.yaml (peft enabled) with regularization.enabled: false.
5
+ model:
6
+ type: internvideo2-clip-l14
7
+ adaptor_name: null
8
+ freeze_vision_encoder: true
9
+ freeze_text_encoder: true
10
+ image_size: 224
11
+ init_logit_scale: 4.605170185988092
12
+ init_logit_bias: 0.0
13
+ canonicalize_text: false
14
+ pretrained_ckpt: null
15
+ internvideo2clip_hf_id: OpenGVLab/InternVideo2_distillation_models
16
+ vision_encoder: null
17
+ text_encoder: /models/mobileclip_blt.pt
18
+ clip_head: null
19
+ num_frames: 8
20
+ use_flash_attn: false
21
+ use_fused_rmsnorm: false
22
+ use_fused_mlp: false
23
+ peft:
24
+ enabled: false
25
+ method: lora
26
+ vision:
27
+ enabled: false
28
+ target_modules:
29
+ - qkv
30
+ - proj
31
+ num_last_blocks: 12
32
+ rank: 8
33
+ alpha: 16
34
+ dropout: 0.05
35
+ text:
36
+ enabled: false
37
+ target_modules:
38
+ - qkv_proj
39
+ - out_proj
40
+ num_last_blocks: 3
41
+ rank: 8
42
+ alpha: 16
43
+ dropout: 0.05
44
+ regularization:
45
+ enabled: false
model_epoch_002_step_04011.no_teacher.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a7c2b4148a882497d110dc2f5a3d124efb1210303ed59daec9ccb6eb4d073c63
3
+ size 1493567543
onnx_opset23/export_spec_v1.0_step04011_separate_opset23.yaml ADDED
@@ -0,0 +1,299 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # TAO video_clip export spec that produced onnx_opset23/*: separate towers, opset 23, dynamic batch, LoRA merged by the exporter.
2
+ model_name: null
3
+ encryption_key: nvidia_tao
4
+ results_dir: /results/export
5
+ wandb:
6
+ enable: false
7
+ project: TAO Toolkit
8
+ entity: ''
9
+ group: ''
10
+ tags:
11
+ - training
12
+ - base-init
13
+ - v5-validation
14
+ - no-rwf
15
+ - 1n8g
16
+ reinit: false
17
+ sync_tensorboard: false
18
+ save_code: false
19
+ name: ''
20
+ run_id: ''
21
+ model:
22
+ type: internvideo2-clip-l14
23
+ adaptor_name: null
24
+ freeze_vision_encoder: true
25
+ freeze_text_encoder: true
26
+ image_size: 224
27
+ init_logit_scale: 4.605170185988092
28
+ init_logit_bias: 0.0
29
+ canonicalize_text: false
30
+ pretrained_ckpt: null
31
+ internvideo2clip_hf_id: OpenGVLab/InternVideo2_distillation_models
32
+ vision_encoder: null
33
+ text_encoder: /models/mobileclip_blt.pt
34
+ clip_head: null
35
+ num_frames: 8
36
+ use_flash_attn: false
37
+ use_fused_rmsnorm: false
38
+ use_fused_mlp: false
39
+ dataset:
40
+ train:
41
+ batch_size: 8
42
+ num_workers: 12
43
+ type: video_text
44
+ video_text:
45
+ metadata: /data/PhysicalAI-Event-Videos/train/labels.json
46
+ format: vadr1_chunks
47
+ data_root: null
48
+ split: train
49
+ path_prefix_mapping: {}
50
+ caption_fields:
51
+ - train_caption
52
+ caption_mode: all
53
+ idx_mode: sample_id
54
+ idx_field: null
55
+ task_type: retrieval
56
+ anomaly_only: false
57
+ num_frames: ${model.num_frames}
58
+ relevance_file: null
59
+ val:
60
+ batch_size: 4
61
+ num_workers: 12
62
+ type: video_text
63
+ video_text:
64
+ metadata: /data/PhysicalAI-Event-Videos/test/labels.json
65
+ format: vadr1_chunks
66
+ data_root: null
67
+ split: test
68
+ path_prefix_mapping: {}
69
+ caption_fields:
70
+ - queries
71
+ - anomaly_queries
72
+ - action_queries
73
+ - dense_caption
74
+ - scene_caption
75
+ caption_mode: first
76
+ idx_mode: sample_id
77
+ idx_field: null
78
+ task_type: retrieval
79
+ anomaly_only: false
80
+ num_frames: ${model.num_frames}
81
+ relevance_file: /data/PhysicalAI-Event-Videos/test/relevance.json
82
+ metrics:
83
+ mode: retrieval
84
+ exclude_categories:
85
+ - Normal
86
+ - Abnormal
87
+ inference:
88
+ batch_size: 16
89
+ num_workers: 8
90
+ type: video_text
91
+ video_text:
92
+ metadata: null
93
+ format: auto
94
+ data_root: null
95
+ split: null
96
+ path_prefix_mapping: {}
97
+ caption_fields:
98
+ - caption
99
+ caption_mode: first
100
+ idx_mode: sample_id
101
+ idx_field: null
102
+ task_type: retrieval
103
+ anomaly_only: false
104
+ num_frames: 8
105
+ relevance_file: null
106
+ augmentation:
107
+ scale:
108
+ - 1.0
109
+ - 1.0
110
+ color_jitter: []
111
+ grayscale: 0.0
112
+ pin_memory: true
113
+ seed: 42
114
+ train:
115
+ num_gpus: 8
116
+ gpu_ids:
117
+ - 0
118
+ - 1
119
+ - 2
120
+ - 3
121
+ - 4
122
+ - 5
123
+ - 6
124
+ - 7
125
+ num_nodes: 1
126
+ seed: 42
127
+ cudnn:
128
+ benchmark: false
129
+ deterministic: true
130
+ num_epochs: 5
131
+ checkpoint_interval: 1
132
+ checkpoint_interval_unit: epoch
133
+ validation_interval: 1
134
+ resume_training_checkpoint_path: null
135
+ results_dir: /results/train
136
+ checkpointer:
137
+ enable_topk: false
138
+ monitor: null
139
+ mode: null
140
+ save_top_k: 1
141
+ filename: model_best_{epoch:03d}
142
+ dirpath: null
143
+ auto_insert_metric_name: false
144
+ optim:
145
+ optimizer_type: adamw
146
+ vision_lr: 0.001
147
+ text_lr: 0.001
148
+ weight_decay: 0.2
149
+ betas:
150
+ - 0.9
151
+ - 0.98
152
+ eps: 1.0e-06
153
+ warmup_steps: 100
154
+ scheduler: cosine
155
+ loss_type: internvideo2_vtc
156
+ precision: bf16
157
+ grad_clip_norm: null
158
+ grad_checkpointing: false
159
+ distributed_strategy: ddp
160
+ pretrained_model_path: null
161
+ val_check_interval: null
162
+ evaluate:
163
+ checkpoint: null
164
+ results_dir: null
165
+ num_gpus: 8
166
+ gpu_ids:
167
+ - 0
168
+ - 1
169
+ - 2
170
+ - 3
171
+ - 4
172
+ - 5
173
+ - 6
174
+ - 7
175
+ batch_size: 4
176
+ num_workers: 12
177
+ video_text:
178
+ metadata: null
179
+ format: auto
180
+ data_root: null
181
+ split: null
182
+ path_prefix_mapping: {}
183
+ caption_fields:
184
+ - caption
185
+ caption_mode: first
186
+ idx_mode: sample_id
187
+ idx_field: null
188
+ task_type: retrieval
189
+ anomaly_only: false
190
+ num_frames: 8
191
+ relevance_file: null
192
+ video_embeddings_file: null
193
+ text_embeddings_file: null
194
+ overwrite_embeddings: false
195
+ search:
196
+ enabled: false
197
+ search_metric: cosine
198
+ normalize: true
199
+ top_k: 10
200
+ trt_engine: null
201
+ text_file: null
202
+ inference:
203
+ checkpoint: null
204
+ results_dir: null
205
+ num_gpus: 8
206
+ gpu_ids:
207
+ - 0
208
+ - 1
209
+ - 2
210
+ - 3
211
+ - 4
212
+ - 5
213
+ - 6
214
+ - 7
215
+ batch_size: 4
216
+ num_workers: 12
217
+ video_text:
218
+ metadata: null
219
+ format: auto
220
+ data_root: null
221
+ split: null
222
+ path_prefix_mapping: {}
223
+ caption_fields:
224
+ - caption
225
+ caption_mode: first
226
+ idx_mode: sample_id
227
+ idx_field: null
228
+ task_type: retrieval
229
+ anomaly_only: false
230
+ num_frames: 8
231
+ relevance_file: null
232
+ video_embeddings_file: null
233
+ text_embeddings_file: null
234
+ overwrite_embeddings: false
235
+ search:
236
+ enabled: false
237
+ search_metric: cosine
238
+ normalize: true
239
+ top_k: 5
240
+ mode: embeddings
241
+ query:
242
+ input_texts: []
243
+ input_videos: []
244
+ text_file: null
245
+ num_frames: ${model.num_frames}
246
+ peft:
247
+ enabled: true
248
+ method: lora
249
+ vision:
250
+ enabled: true
251
+ target_modules:
252
+ - qkv
253
+ - proj
254
+ num_last_blocks: 12
255
+ rank: 8
256
+ alpha: 16
257
+ dropout: 0.05
258
+ text:
259
+ enabled: false
260
+ target_modules:
261
+ - qkv_proj
262
+ - out_proj
263
+ num_last_blocks: 3
264
+ rank: 8
265
+ alpha: 16
266
+ dropout: 0.05
267
+ regularization:
268
+ enabled: true
269
+ embedding_mse_weight: 0.05
270
+ cosine_weight: 0.05
271
+ similarity_weight: 0.1
272
+ export:
273
+ checkpoint: /models/model_epoch_002_step_04011.no_teacher.pth
274
+ onnx_file: /results/export/iv2clip_v1.0_step04011_opset23.onnx
275
+ encoder_type: separate
276
+ opset_version: 23
277
+ batch_size: -1
278
+ input_height: 224
279
+ input_width: 224
280
+ gpu_id: 0
281
+ on_cpu: false
282
+ input_channel: 3
283
+ verbose: false
284
+ results_dir: /results/export
285
+ gen_trt_engine:
286
+ results_dir: null
287
+ gpu_id: 0
288
+ onnx_file: ???
289
+ trt_engine: ???
290
+ timing_cache: null
291
+ batch_size: -1
292
+ verbose: false
293
+ tensorrt:
294
+ workspace_size: 1024
295
+ min_batch_size: 1
296
+ opt_batch_size: 1
297
+ max_batch_size: 16
298
+ layers_precision: []
299
+ data_type: fp32
onnx_opset23/iv2clip_v1.0_step04011_opset23_config.yaml ADDED
@@ -0,0 +1,299 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ model_name: null
2
+ encryption_key: nvidia_tao
3
+ results_dir: /workspace/alicli/experiments/internvideo2clip/physicalai_no_rwf_base_5ep_v5_1n8g_093026/export_step04011_separate_opset23/export
4
+ wandb:
5
+ enable: false
6
+ project: TAO Toolkit
7
+ entity: ''
8
+ group: ''
9
+ tags:
10
+ - training
11
+ - base-init
12
+ - v5-validation
13
+ - no-rwf
14
+ - 1n8g
15
+ reinit: false
16
+ sync_tensorboard: false
17
+ save_code: false
18
+ name: iv2clip_no_rwf_093026_base_5ep_v5_1n8g
19
+ run_id: ''
20
+ model:
21
+ type: internvideo2-clip-l14
22
+ adaptor_name: null
23
+ freeze_vision_encoder: true
24
+ freeze_text_encoder: true
25
+ image_size: 224
26
+ init_logit_scale: 4.544891357421875
27
+ init_logit_bias: 0.0
28
+ canonicalize_text: false
29
+ pretrained_ckpt: null
30
+ internvideo2clip_hf_id: OpenGVLab/InternVideo2_distillation_models
31
+ vision_encoder: null
32
+ text_encoder: /workspace/alicli/models/internvideo2_clip_l14/mobileclip_blt.pt
33
+ clip_head: null
34
+ num_frames: 8
35
+ use_flash_attn: false
36
+ use_fused_rmsnorm: false
37
+ use_fused_mlp: false
38
+ dataset:
39
+ train:
40
+ batch_size: 8
41
+ num_workers: 12
42
+ type: video_text
43
+ video_text:
44
+ metadata: /workspace/alicli/local_artifacts/093026_iv2clip-no-rwf-retrain/train_no_rwf.json
45
+ format: vadr1_chunks
46
+ data_root: null
47
+ split: train
48
+ path_prefix_mapping: {}
49
+ caption_fields:
50
+ - train_caption
51
+ caption_mode: all
52
+ idx_mode: sample_id
53
+ idx_field: null
54
+ task_type: retrieval
55
+ anomaly_only: false
56
+ num_frames: ${model.num_frames}
57
+ relevance_file: null
58
+ val:
59
+ batch_size: 4
60
+ num_workers: 12
61
+ type: video_text
62
+ video_text:
63
+ metadata: /workspace/data/AI_City_Challenge_2026/Annotated_batches/kpi_annotated_chunks_5sec_ps.actionq.split.json
64
+ format: vadr1_chunks
65
+ data_root: null
66
+ split: test
67
+ path_prefix_mapping: {}
68
+ caption_fields:
69
+ - queries
70
+ - anomaly_queries
71
+ - action_queries
72
+ - dense_caption
73
+ - scene_caption
74
+ caption_mode: first
75
+ idx_mode: sample_id
76
+ idx_field: null
77
+ task_type: retrieval
78
+ anomaly_only: false
79
+ num_frames: ${model.num_frames}
80
+ relevance_file: /workspace/data/AI_City_Challenge_2026/iv2clip_test/domain_test_v5_082626.json
81
+ metrics:
82
+ mode: retrieval
83
+ exclude_categories:
84
+ - Normal
85
+ - Abnormal
86
+ inference:
87
+ batch_size: 16
88
+ num_workers: 8
89
+ type: video_text
90
+ video_text:
91
+ metadata: null
92
+ format: auto
93
+ data_root: null
94
+ split: null
95
+ path_prefix_mapping: {}
96
+ caption_fields:
97
+ - caption
98
+ caption_mode: first
99
+ idx_mode: sample_id
100
+ idx_field: null
101
+ task_type: retrieval
102
+ anomaly_only: false
103
+ num_frames: 8
104
+ relevance_file: null
105
+ augmentation:
106
+ scale:
107
+ - 1.0
108
+ - 1.0
109
+ color_jitter: []
110
+ grayscale: 0.0
111
+ pin_memory: true
112
+ seed: 42
113
+ train:
114
+ num_gpus: 8
115
+ gpu_ids:
116
+ - 0
117
+ - 1
118
+ - 2
119
+ - 3
120
+ - 4
121
+ - 5
122
+ - 6
123
+ - 7
124
+ num_nodes: 1
125
+ seed: 42
126
+ cudnn:
127
+ benchmark: false
128
+ deterministic: true
129
+ num_epochs: 5
130
+ checkpoint_interval: 1
131
+ checkpoint_interval_unit: epoch
132
+ validation_interval: 1
133
+ resume_training_checkpoint_path: null
134
+ results_dir: /workspace/alicli/experiments/internvideo2clip/physicalai_no_rwf_base_5ep_v5_1n8g_093026/train
135
+ checkpointer:
136
+ enable_topk: false
137
+ replace_periodic: false
138
+ monitor: null
139
+ mode: null
140
+ save_top_k: 1
141
+ filename: model_best_{epoch:03d}
142
+ dirpath: null
143
+ auto_insert_metric_name: false
144
+ optim:
145
+ optimizer_type: adamw
146
+ vision_lr: 0.001
147
+ text_lr: 0.001
148
+ weight_decay: 0.2
149
+ betas:
150
+ - 0.9
151
+ - 0.98
152
+ eps: 1.0e-06
153
+ warmup_steps: 100
154
+ scheduler: cosine
155
+ loss_type: internvideo2_vtc
156
+ precision: bf16
157
+ grad_clip_norm: null
158
+ grad_checkpointing: false
159
+ distributed_strategy: ddp
160
+ pretrained_model_path: null
161
+ val_check_interval: null
162
+ evaluate:
163
+ checkpoint: null
164
+ results_dir: null
165
+ num_gpus: 8
166
+ gpu_ids:
167
+ - 0
168
+ - 1
169
+ - 2
170
+ - 3
171
+ - 4
172
+ - 5
173
+ - 6
174
+ - 7
175
+ batch_size: 4
176
+ num_workers: 12
177
+ video_text:
178
+ metadata: null
179
+ format: auto
180
+ data_root: null
181
+ split: null
182
+ path_prefix_mapping: {}
183
+ caption_fields:
184
+ - caption
185
+ caption_mode: first
186
+ idx_mode: sample_id
187
+ idx_field: null
188
+ task_type: retrieval
189
+ anomaly_only: false
190
+ num_frames: 8
191
+ relevance_file: null
192
+ video_embeddings_file: null
193
+ text_embeddings_file: null
194
+ overwrite_embeddings: false
195
+ search:
196
+ enabled: false
197
+ search_metric: cosine
198
+ normalize: true
199
+ top_k: 10
200
+ trt_engine: null
201
+ text_file: null
202
+ inference:
203
+ checkpoint: null
204
+ results_dir: null
205
+ num_gpus: 8
206
+ gpu_ids:
207
+ - 0
208
+ - 1
209
+ - 2
210
+ - 3
211
+ - 4
212
+ - 5
213
+ - 6
214
+ - 7
215
+ batch_size: 4
216
+ num_workers: 12
217
+ video_text:
218
+ metadata: null
219
+ format: auto
220
+ data_root: null
221
+ split: null
222
+ path_prefix_mapping: {}
223
+ caption_fields:
224
+ - caption
225
+ caption_mode: first
226
+ idx_mode: sample_id
227
+ idx_field: null
228
+ task_type: retrieval
229
+ anomaly_only: false
230
+ num_frames: 8
231
+ relevance_file: null
232
+ video_embeddings_file: null
233
+ text_embeddings_file: null
234
+ overwrite_embeddings: false
235
+ search:
236
+ enabled: false
237
+ search_metric: cosine
238
+ normalize: true
239
+ top_k: 5
240
+ mode: embeddings
241
+ query:
242
+ input_texts: []
243
+ input_videos: []
244
+ text_file: null
245
+ num_frames: ${model.num_frames}
246
+ peft:
247
+ enabled: true
248
+ method: lora
249
+ vision:
250
+ enabled: true
251
+ target_modules:
252
+ - qkv
253
+ - proj
254
+ num_last_blocks: 12
255
+ rank: 8
256
+ alpha: 16
257
+ dropout: 0.05
258
+ text:
259
+ enabled: false
260
+ target_modules:
261
+ - qkv_proj
262
+ - out_proj
263
+ num_last_blocks: 3
264
+ rank: 8
265
+ alpha: 16
266
+ dropout: 0.05
267
+ regularization:
268
+ enabled: true
269
+ embedding_mse_weight: 0.05
270
+ cosine_weight: 0.05
271
+ similarity_weight: 0.1
272
+ export:
273
+ checkpoint: /workspace/alicli/experiments/internvideo2clip/physicalai_no_rwf_base_5ep_v5_1n8g_093026/train/model_epoch_002_step_04011.pth
274
+ onnx_file: /workspace/alicli/experiments/internvideo2clip/physicalai_no_rwf_base_5ep_v5_1n8g_093026/export_step04011_separate_opset23/iv2clip_v1.0_step04011_opset23.onnx
275
+ encoder_type: separate
276
+ opset_version: 23
277
+ batch_size: -1
278
+ input_height: 224
279
+ input_width: 224
280
+ gpu_id: 0
281
+ on_cpu: false
282
+ input_channel: 3
283
+ verbose: false
284
+ results_dir: /workspace/alicli/experiments/internvideo2clip/physicalai_no_rwf_base_5ep_v5_1n8g_093026/export_step04011_separate_opset23/export
285
+ gen_trt_engine:
286
+ results_dir: null
287
+ gpu_id: 0
288
+ onnx_file: ???
289
+ trt_engine: ???
290
+ timing_cache: null
291
+ batch_size: -1
292
+ verbose: false
293
+ tensorrt:
294
+ workspace_size: 1024
295
+ min_batch_size: 1
296
+ opt_batch_size: 1
297
+ max_batch_size: 16
298
+ layers_precision: []
299
+ data_type: fp32
onnx_opset23/iv2clip_v1.0_step04011_opset23_text.autocast_fp16.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6e41fa1c7fb94e6b438375048603f818dc6c6b5ee35f3d7259905905a3760f0b
3
+ size 126946278
onnx_opset23/iv2clip_v1.0_step04011_opset23_text.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5e55caf759e88dbb85e37a8e124129070bcca2d57d85fd629aef43ce7954a51e
3
+ size 1230030
onnx_opset23/iv2clip_v1.0_step04011_opset23_text.onnx.data ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cacc6493c3a7863c1cd20bfec11600d4f2aeef953849f1cfa9fe87081887787f
3
+ size 253755392
onnx_opset23/iv2clip_v1.0_step04011_opset23_tokenizer/merges.txt ADDED
The diff for this file is too large to render. See raw diff
 
onnx_opset23/iv2clip_v1.0_step04011_opset23_tokenizer/special_tokens_map.json ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token": {
3
+ "content": "<|startoftext|>",
4
+ "lstrip": false,
5
+ "normalized": true,
6
+ "rstrip": false,
7
+ "single_word": false
8
+ },
9
+ "eos_token": {
10
+ "content": "<|endoftext|>",
11
+ "lstrip": false,
12
+ "normalized": false,
13
+ "rstrip": false,
14
+ "single_word": false
15
+ },
16
+ "pad_token": {
17
+ "content": "<|endoftext|>",
18
+ "lstrip": false,
19
+ "normalized": false,
20
+ "rstrip": false,
21
+ "single_word": false
22
+ },
23
+ "unk_token": {
24
+ "content": "<|endoftext|>",
25
+ "lstrip": false,
26
+ "normalized": false,
27
+ "rstrip": false,
28
+ "single_word": false
29
+ }
30
+ }
onnx_opset23/iv2clip_v1.0_step04011_opset23_tokenizer/tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
onnx_opset23/iv2clip_v1.0_step04011_opset23_tokenizer/tokenizer_config.json ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_prefix_space": false,
3
+ "added_tokens_decoder": {
4
+ "49406": {
5
+ "content": "<|startoftext|>",
6
+ "lstrip": false,
7
+ "normalized": true,
8
+ "rstrip": false,
9
+ "single_word": false,
10
+ "special": true
11
+ },
12
+ "49407": {
13
+ "content": "<|endoftext|>",
14
+ "lstrip": false,
15
+ "normalized": false,
16
+ "rstrip": false,
17
+ "single_word": false,
18
+ "special": true
19
+ }
20
+ },
21
+ "bos_token": "<|startoftext|>",
22
+ "clean_up_tokenization_spaces": false,
23
+ "do_lower_case": true,
24
+ "eos_token": "<|endoftext|>",
25
+ "errors": "replace",
26
+ "extra_special_tokens": {},
27
+ "model_max_length": 77,
28
+ "pad_token": "<|endoftext|>",
29
+ "tokenizer_class": "CLIPTokenizer",
30
+ "unk_token": "<|endoftext|>"
31
+ }
onnx_opset23/iv2clip_v1.0_step04011_opset23_tokenizer/vocab.json ADDED
The diff for this file is too large to render. See raw diff
 
onnx_opset23/iv2clip_v1.0_step04011_opset23_vision.autocast_fp16.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:141e726ae5dcf0bf7c3f21054e186ce8021410c403f73574e0d3dbb430be38f5
3
+ size 619141817
onnx_opset23/iv2clip_v1.0_step04011_opset23_vision.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:63ee64deaef832b9b7ccfd340c809642f7e8285689d1a0f8cd3478527f1fb189
3
+ size 3914064
onnx_opset23/iv2clip_v1.0_step04011_opset23_vision.onnx.data ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:27e70bca3f0ca169e1a6ae41fb3e1cafe6371d746f405ac0498cf54d6fc15f67
3
+ size 1237385216
train_experiment.yaml ADDED
@@ -0,0 +1,297 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # TAO video_clip training specification used for nvidia/InternVideo2-CLIP-anomaly-detection v1.0
2
+ # (run physicalai_no_rwf_base_5ep_v5_1n8g_093026, released checkpoint = epoch 2 / step 4011).
3
+ # Paths are placeholders: model.text_encoder = Apple MobileCLIP-B-LT weights (mobileclip_blt.pt), dataset.* = PhysicalAI-Event-Videos
4
+ # train/test subsets. Base vision/alignment weights resolve from model.internvideo2clip_hf_id via the Hugging Face cache.
5
+ model_name: null
6
+ encryption_key: nvidia_tao
7
+ results_dir: /results/train
8
+ wandb:
9
+ enable: false
10
+ project: TAO Toolkit
11
+ entity: ''
12
+ group: ''
13
+ tags: []
14
+ reinit: false
15
+ sync_tensorboard: false
16
+ save_code: false
17
+ name: ''
18
+ run_id: ''
19
+ model:
20
+ type: internvideo2-clip-l14
21
+ adaptor_name: null
22
+ freeze_vision_encoder: true
23
+ freeze_text_encoder: true
24
+ image_size: 224
25
+ init_logit_scale: 4.605170185988092
26
+ init_logit_bias: 0.0
27
+ canonicalize_text: false
28
+ pretrained_ckpt: null
29
+ internvideo2clip_hf_id: OpenGVLab/InternVideo2_distillation_models
30
+ vision_encoder: null
31
+ text_encoder: /models/mobileclip_blt.pt
32
+ clip_head: null
33
+ num_frames: 8
34
+ use_flash_attn: false
35
+ use_fused_rmsnorm: false
36
+ use_fused_mlp: false
37
+ dataset:
38
+ train:
39
+ batch_size: 8
40
+ num_workers: 12
41
+ type: video_text
42
+ video_text:
43
+ metadata: /data/PhysicalAI-Event-Videos/train/labels.json
44
+ format: vadr1_chunks
45
+ data_root: null
46
+ split: train
47
+ path_prefix_mapping: {}
48
+ caption_fields:
49
+ - train_caption
50
+ caption_mode: all
51
+ idx_mode: sample_id
52
+ idx_field: null
53
+ task_type: retrieval
54
+ anomaly_only: false
55
+ num_frames: ${model.num_frames}
56
+ relevance_file: null
57
+ val:
58
+ batch_size: 4
59
+ num_workers: 12
60
+ type: video_text
61
+ video_text:
62
+ metadata: /data/PhysicalAI-Event-Videos/test/labels.json
63
+ format: vadr1_chunks
64
+ data_root: null
65
+ split: test
66
+ path_prefix_mapping: {}
67
+ caption_fields:
68
+ - queries
69
+ - anomaly_queries
70
+ - action_queries
71
+ - dense_caption
72
+ - scene_caption
73
+ caption_mode: first
74
+ idx_mode: sample_id
75
+ idx_field: null
76
+ task_type: retrieval
77
+ anomaly_only: false
78
+ num_frames: ${model.num_frames}
79
+ relevance_file: /data/PhysicalAI-Event-Videos/test/relevance.json
80
+ metrics:
81
+ mode: retrieval
82
+ exclude_categories:
83
+ - Normal
84
+ - Abnormal
85
+ inference:
86
+ batch_size: 16
87
+ num_workers: 8
88
+ type: video_text
89
+ video_text:
90
+ metadata: null
91
+ format: auto
92
+ data_root: null
93
+ split: null
94
+ path_prefix_mapping: {}
95
+ caption_fields:
96
+ - caption
97
+ caption_mode: first
98
+ idx_mode: sample_id
99
+ idx_field: null
100
+ task_type: retrieval
101
+ anomaly_only: false
102
+ num_frames: 8
103
+ relevance_file: null
104
+ augmentation:
105
+ scale:
106
+ - 1.0
107
+ - 1.0
108
+ color_jitter: []
109
+ grayscale: 0.0
110
+ pin_memory: true
111
+ seed: 42
112
+ train:
113
+ num_gpus: 8
114
+ gpu_ids:
115
+ - 0
116
+ - 1
117
+ - 2
118
+ - 3
119
+ - 4
120
+ - 5
121
+ - 6
122
+ - 7
123
+ num_nodes: 1
124
+ seed: 42
125
+ cudnn:
126
+ benchmark: false
127
+ deterministic: true
128
+ num_epochs: 5
129
+ checkpoint_interval: 1
130
+ checkpoint_interval_unit: epoch
131
+ validation_interval: 1
132
+ resume_training_checkpoint_path: null
133
+ results_dir: /results/train
134
+ checkpointer:
135
+ enable_topk: false
136
+ monitor: null
137
+ mode: null
138
+ save_top_k: 1
139
+ filename: model_best_{epoch:03d}
140
+ dirpath: null
141
+ auto_insert_metric_name: false
142
+ optim:
143
+ optimizer_type: adamw
144
+ vision_lr: 0.001
145
+ text_lr: 0.001
146
+ weight_decay: 0.2
147
+ betas:
148
+ - 0.9
149
+ - 0.98
150
+ eps: 1.0e-06
151
+ warmup_steps: 100
152
+ scheduler: cosine
153
+ loss_type: internvideo2_vtc
154
+ precision: bf16
155
+ grad_clip_norm: null
156
+ grad_checkpointing: false
157
+ distributed_strategy: ddp
158
+ pretrained_model_path: null
159
+ val_check_interval: null
160
+ evaluate:
161
+ checkpoint: null
162
+ results_dir: null
163
+ num_gpus: 8
164
+ gpu_ids:
165
+ - 0
166
+ - 1
167
+ - 2
168
+ - 3
169
+ - 4
170
+ - 5
171
+ - 6
172
+ - 7
173
+ batch_size: 4
174
+ num_workers: 12
175
+ video_text:
176
+ metadata: null
177
+ format: auto
178
+ data_root: null
179
+ split: null
180
+ path_prefix_mapping: {}
181
+ caption_fields:
182
+ - caption
183
+ caption_mode: first
184
+ idx_mode: sample_id
185
+ idx_field: null
186
+ task_type: retrieval
187
+ anomaly_only: false
188
+ num_frames: 8
189
+ relevance_file: null
190
+ video_embeddings_file: null
191
+ text_embeddings_file: null
192
+ overwrite_embeddings: false
193
+ search:
194
+ enabled: false
195
+ search_metric: cosine
196
+ normalize: true
197
+ top_k: 10
198
+ trt_engine: null
199
+ text_file: null
200
+ inference:
201
+ checkpoint: null
202
+ results_dir: null
203
+ num_gpus: 8
204
+ gpu_ids:
205
+ - 0
206
+ - 1
207
+ - 2
208
+ - 3
209
+ - 4
210
+ - 5
211
+ - 6
212
+ - 7
213
+ batch_size: 4
214
+ num_workers: 12
215
+ video_text:
216
+ metadata: null
217
+ format: auto
218
+ data_root: null
219
+ split: null
220
+ path_prefix_mapping: {}
221
+ caption_fields:
222
+ - caption
223
+ caption_mode: first
224
+ idx_mode: sample_id
225
+ idx_field: null
226
+ task_type: retrieval
227
+ anomaly_only: false
228
+ num_frames: 8
229
+ relevance_file: null
230
+ video_embeddings_file: null
231
+ text_embeddings_file: null
232
+ overwrite_embeddings: false
233
+ search:
234
+ enabled: false
235
+ search_metric: cosine
236
+ normalize: true
237
+ top_k: 5
238
+ mode: embeddings
239
+ query:
240
+ input_texts: []
241
+ input_videos: []
242
+ text_file: null
243
+ num_frames: ${model.num_frames}
244
+ peft:
245
+ enabled: true
246
+ method: lora
247
+ vision:
248
+ enabled: true
249
+ target_modules:
250
+ - qkv
251
+ - proj
252
+ num_last_blocks: 12
253
+ rank: 8
254
+ alpha: 16
255
+ dropout: 0.05
256
+ text:
257
+ enabled: false
258
+ target_modules:
259
+ - qkv_proj
260
+ - out_proj
261
+ num_last_blocks: 3
262
+ rank: 8
263
+ alpha: 16
264
+ dropout: 0.05
265
+ regularization:
266
+ enabled: true
267
+ embedding_mse_weight: 0.05
268
+ cosine_weight: 0.05
269
+ similarity_weight: 0.1
270
+ export:
271
+ checkpoint: null
272
+ onnx_file: null
273
+ encoder_type: separate
274
+ opset_version: 23
275
+ batch_size: 1
276
+ input_height: 224
277
+ input_width: 224
278
+ gpu_id: 0
279
+ on_cpu: false
280
+ input_channel: 3
281
+ verbose: false
282
+ results_dir: null
283
+ gen_trt_engine:
284
+ results_dir: null
285
+ gpu_id: 0
286
+ onnx_file: ???
287
+ trt_engine: ???
288
+ timing_cache: null
289
+ batch_size: -1
290
+ verbose: false
291
+ tensorrt:
292
+ workspace_size: 1024
293
+ min_batch_size: 1
294
+ opt_batch_size: 1
295
+ max_batch_size: 16
296
+ layers_precision: []
297
+ data_type: fp32