Model Configuration#
Parameter |
Type |
Description |
Default |
|---|---|---|---|
|
string |
CLIP model type. Only internvideo2-clip-l14 is supported: the video
dataloader emits [B, T, C, H, W] and the InternVideo2-CLIP adapter is
the only one that consumes 5D input. Image-only CLIP families (C-RADIO,
SigLIP2, OpenCLIP) belong to the |
|
|
bool |
When |
|
|
bool |
When |
|
|
int |
Input image resolution for training transforms. Common values: 224 (InternVideo2-CLIP L14 / RADIO / OpenCLIP), 256 (SigLIP2-so400m), 384 (SigLIP2-g). Must be a multiple of the model’s patch size (typically 14 or 16). |
|
|
float |
Override for the initial logit scale (log-space). When |
|
|
float |
Override for the initial logit bias. When |
|
|
bool |
Lowercase the text and strip punctuation before tokenization. This field
has no effect on the |
|
|
string |
Optional local .pth holding the COMPLETE InternVideo2-CLIP model state_dict. If set, it is loaded last and overrides all component weights (vision/text/clip_head). Must also be null for the all-null train-from-scratch configuration. |
|
|
string |
HuggingFace repo id for InternVideo2-CLIP assets (provides the vision
encoder and CLIP head). Resolved using the ambient HF cache (set
HF_HOME). Suggested value:
|
|
|
string |
Vision encoder source: a local file OR an HF repo id. If unset, resolved
from internvideo2clip_hf_id (suggested:
|
|
|
string |
Text encoder (MobileCLIP) source: a local file OR an HF repo id.
Required when pretrained_ckpt is not set (MobileCLIP is not in the
IV2CLIP repo). Suggested: MobileCLIP |
|
|
string |
CLIP alignment head source: a local file OR an HF repo id. If unset,
resolved from internvideo2clip_hf_id (suggested:
|
|
|
int |
Number of video frames for InternVideo2 video-text inputs. |
|
|
bool |
Enable upstream InternVideo2 FlashAttention in the vision encoder (use_flash_attn). Requires flash-attn in the env. |
|
|
bool |
Enable upstream InternVideo2 fused RMSNorm (use_fused_rmsnorm). Requires the flash-attn dropout_layer_norm CUDA extension. |
|
|
bool |
Enable upstream InternVideo2 fused MLP (use_fused_mlp). Requires the flash-attn fused_dense_lib CUDA extension. |
|
Video-Text Source Configuration#
Parameter |
Type |
Description |
Default |
|---|---|---|---|
|
union |
List of video-text JSON/JSONL metadata file paths whose records are concatenated (each file must be a JSON array / JSONL). A single file may be given as a one-element list; a bare string path is still accepted for backward compatibility. |
|
|
string |
Root directory used to resolve relative/remapped video paths. |
|
|
string |
Optional split filter, such as train or test. |
|
|
collection |
Optional mapping from original path prefixes to local prefixes. |
|
|
list |
Metadata fields used as caption candidates. |
|
|
categorical |
Caption selection strategy. |
|
|
categorical |
How to build InternVideo2 VTC positive ids. Valid options:
|
|
|
string |
Metadata field used when idx_mode=``field``. |
|
|
categorical |
Dataset task type. |
|
|
bool |
For Vad-R1 chunks, keep only anomaly chunks. |
|
|
int |
Number of frames to sample from each video clip. |
|
|
string |
Optional path to an explicit-relevance eval-query file (for example, a
frozen domain_test.json with a |
|
Training Dataset Configuration#
Parameter |
Type |
Description |
Default |
|---|---|---|---|
|
int |
Training batch size per GPU. |
|
|
int |
Number of data loading worker processes. |
|
|
categorical |
Dataset type. Only |
|
|
collection |
Video-text configuration (used when type=``video_text``). |
Validation Dataset Configuration#
Parameter |
Type |
Description |
Default |
|---|---|---|---|
|
int |
Batch size per GPU. |
|
|
int |
Number of data loading worker processes. |
|
|
categorical |
Validation dataset type. Only |
|
|
collection |
Video-text validation configuration. |
Inference Dataset Configuration#
Parameter |
Type |
Description |
Default |
|---|---|---|---|
|
int |
Batch size per GPU. |
|
|
int |
Number of data loading worker processes. |
|
|
categorical |
Inference corpus type (video_text metadata). Valid options:
|
|
|
collection |
Video-text corpus configuration for inference. |
Metrics Configuration#
Parameter |
Type |
Description |
Default |
|---|---|---|---|
|
categorical |
Evaluation metric mode. |
|
|
list |
Category names excluded from classification MAP/MRR and macro averages (case-insensitive). |
|
Augmentation Configuration#
Parameter |
Type |
Description |
Default |
|---|---|---|---|
|
list |
Scale range [min, max] for random resized crop. Set to [1.0, 1.0] to disable. |
|
|
list |
Color jitter [prob, brightness, contrast, saturation, hue]. Set to [] to disable. |
|
|
float |
Probability of grayscale conversion. Set to 0.0 to disable. |
|
Dataset Configuration#
Parameter |
Type |
Description |
Default |
|---|---|---|---|
|
collection |
Training dataset configuration. |
|
|
collection |
Validation dataset configuration. |
|
|
collection |
Evaluation metric configuration (metric mode, excluded categories). |
|
|
collection |
Inference corpus configuration (gallery to embed/search). |
|
|
collection |
Data augmentation configuration. |
|
|
bool |
Pin memory in DataLoader for faster GPU transfer. |
|
|
int |
Random seed for data loading and shuffling. |
|
Training Configuration#
Parameter |
Type |
Description |
Default |
|---|---|---|---|
|
int |
The number of GPUs to run the train job. |
|
|
list |
List of GPU IDs to run the training on. The length of this list must be equal to the number of gpus in train.num_gpus. |
|
|
int |
Number of nodes to run the training on. If > 1, then multi-node is enabled. |
|
|
int |
The seed for the initializer in PyTorch. If < 0, disable fixed seed. |
|
|
int |
Number of epochs to run the training. |
|
|
int |
The interval (in epochs) at which a checkpoint will be saved. Helps resume training. |
|
|
categorical |
The unit of the checkpoint interval. Valid options: |
|
|
int |
The interval (in epochs) at which a evaluation will be triggered on the validation dataset. |
|
|
string |
Path to the checkpoint to resume training from. |
|
|
collection |
Optimizer configuration with per-tower learning rates. |
|
|
categorical |
Contrastive loss function: |
|
|
categorical |
Training precision: fp16 (mixed), fp32 (full), or bf16 (bfloat16). Valid
options: |
|
|
float |
Maximum gradient norm for clipping. Set to None to disable. |
|
|
bool |
Enable gradient checkpointing to reduce memory at cost of speed. |
|
|
categorical |
Distributed training strategy: |
|
|
string |
Path to pretrained model checkpoint for fine-tuning. |
|
|
int |
Run validation every N training steps. If None, validates at end of epoch. |
|
Optimizer Configuration#
Parameter |
Type |
Description |
Default |
|---|---|---|---|
|
categorical |
Optimizer type: |
|
|
float |
Learning rate for the vision encoder. |
|
|
float |
Learning rate for the text encoder. |
|
|
float |
Weight decay (L2 regularization) coefficient. |
|
|
list |
Adam/LAMB beta parameters [beta1, beta2] for momentum. |
|
|
float |
Epsilon for numerical stability. |
|
|
int |
Number of linear warmup steps for learning rate. |
|
|
categorical |
LR schedule after warmup: |
|
PEFT Configuration#
Parameter |
Type |
Description |
Default |
|---|---|---|---|
|
bool |
Enable PEFT mode. When False, training uses standard full fine-tuning (the standard behavior). |
|
|
categorical |
PEFT method. Currently only |
|
|
collection |
LoRA configuration for the vision encoder (InternVideo2: target_modules
|
|
|
collection |
LoRA configuration for the text encoder (MobileCLIP: target_modules
|
LoRA Tower Configuration#
Parameter |
Type |
Description |
Default |
|---|---|---|---|
|
bool |
Enable LoRA adaptation for this encoder tower. |
|
|
list |
Attention-projection leaf module names to wrap with LoRA within each
adapted block. Defaults are for the InternVideo2-CLIP vision tower
(fused |
|
|
int |
Number of final transformer blocks to adapt. 0 means adapt all blocks. |
|
|
int |
LoRA rank (low-rank dimension). |
|
|
int |
LoRA alpha scaling factor. Effective scale = alpha / rank. |
|
|
float |
Dropout applied to LoRA input. |
|
Regularization Configuration#
Parameter |
Type |
Description |
Default |
|---|---|---|---|
|
bool |
Enable preservation regularization. When False, only the contrastive loss is used (the standard behavior). |
|
|
float |
Weight for MSE loss between student and teacher embeddings. |
|
|
float |
Weight for cosine preservation loss between student and teacher embeddings. |
|
|
float |
Weight for similarity matrix preservation loss (MSE between student and teacher image-text similarity matrices). |
|
Evaluation Configuration#
Parameter |
Type |
Description |
Default |
|---|---|---|---|
|
string |
Required path to a trained model checkpoint (.ckpt or .pth) for evaluation or inference. |
Required |
|
string |
Directory to save inference/evaluation results. |
|
|
int |
Number of GPUs to use. |
|
|
list |
List of GPU device IDs to use. |
|
Inference Configuration#
Parameter |
Type |
Description |
Default |
|---|---|---|---|
|
string |
Required path to a trained model checkpoint (.ckpt or .pth) for evaluation or inference. |
Required |
|
string |
Directory to save inference/evaluation results. |
|
|
int |
Number of GPUs to use. |
|
|
list |
List of GPU device IDs to use. |
|
|
int |
Batch size per GPU. |
|
|
int |
Number of data loading worker processes. |
|
|
string |
Explicit path for the video embeddings .h5. If it exists it is reused (generation skipped); if set but missing it is generated there. Defaults to <results_dir>/video_embeddings.h5. |
|
|
string |
Explicit path for the text embeddings .h5 (reusable query/label cache). Reused if present, generated if missing. Defaults to <results_dir>/text_embeddings.h5. |
|
|
bool |
Regenerate embeddings even if a cached file is present. |
|
|
collection |
Search / retrieval ranking over the embeddings. |
|
|
categorical |
|
|
|
collection |
Inline ad-hoc text/video queries. |
Search Configuration#
Parameter |
Type |
Description |
Default |
|---|---|---|---|
|
categorical |
Ranking metric: |
|
|
bool |
L2-normalize embeddings before scoring. On normalized vectors cosine and knn give the same ranking. |
|
|
int |
Number of video clips returned per text query. |
|
Query Configuration#
Parameter |
Type |
Description |
Default |
|---|---|---|---|
|
list |
Inline text queries to embed / search with. |
|
|
list |
Inline video file paths to embed / search with. |
|
|
string |
Optional file with one text prompt per line (convenience for large query lists; merged with input_texts). |
|
|
int |
Frames sampled per inline video query. |
|
Export Configuration#
Parameter |
Type |
Description |
Default |
|---|---|---|---|
|
string |
Required path to a trained TAO model checkpoint (.ckpt or .pth). |
Required |
|
string |
Output ONNX file path (without extension for |
|
|
categorical |
Export mode: |
|
|
int |
ONNX opset version for export. |
|
|
int |
ONNX batch mode: -1 exports a symbolic dynamic batch; a positive value exports a fixed batch. The internal dynamic tracing sample does not set a runtime maximum. |
|
|
int |
Input image height for vision encoder export. |
|
|
int |
Input image width for vision encoder export. |
|
|
int |
GPU device ID to use for export. |
|
|
bool |
When |
|
|
int |
Number of channels in the input image. |
|
|
bool |
Enable verbose ONNX export logging. |
|