vllm.model_executor.models.nano_nemotron_vl
¶
Classes:
-
NanoNemotronVLAudioFeatureInputs–Dimensions:
-
NanoNemotronVLImageEmbeddingInputs–Dimensions:
-
NanoNemotronVLImagePixelInputs–Dimensions:
-
NanoNemotronVLImagePixelInputsDynamic–Dynamic-resolution image inputs.
-
NanoNemotronVLMultiModalProcessor– -
NanoNemotronVLVideoEmbeddingInputs–Dimensions:
-
NanoNemotronVLVideoPixelInputs–Dimensions:
-
NemotronH_Nano_VL_V2–
NanoNemotronVLAudioFeatureInputs
¶
Bases: TensorSchema
Dimensions: - c: Number of audio clips (possibly flattened across audio items) - b: Number of original audio items - t: Audio feature length - f: Feature size (mel bins)
NanoNemotronVLImageEmbeddingInputs
¶
Bases: TensorSchema
Dimensions: - n: Number of images - f: Total image feature size - h: Hidden size (must match the hidden size of language model backbone)
NanoNemotronVLImagePixelInputs
¶
Bases: TensorSchema
Dimensions: - bn: Batch size * number of images - bnp: Batch size * number of images * (1 + num_patches) - c: Number of channels (3) - h: Height of each image patch - w: Width of each image patch
NanoNemotronVLImagePixelInputsDynamic
¶
Bases: TensorSchema
Dynamic-resolution image inputs.
pixel_values_flat: [1, total_patches, 3 * patch_size**2].
imgs_sizes: per-image (height, width) in pixels.
num_tokens_per_image: per-image number of embedding tokens (post downsample).
NanoNemotronVLMultiModalProcessor
¶
Bases: BaseMultiModalProcessor[NanoNemotronVLProcessingInfo]
_extract_audio_from_videos(mm_items)
¶
Extract audio tracks from video bytes in mm_items.
Videos whose bytes are missing or that contain no audio stream are
silently skipped. The returned has_audio mask is aligned with
the video list so callers know which <video> tokens need an
accompanying audio context.
Returns:
-
MultiModalDataItems–A 3-tuple of (augmented mm_items, extracted audio items,
-
list[AudioItem]–per-video boolean mask indicating which videos have audio).
NanoNemotronVLVideoEmbeddingInputs
¶
Bases: TensorSchema
Dimensions: - n: Number of videos - f: Total video feature size - h: Hidden size (must match the hidden size of language model backbone)
NanoNemotronVLVideoPixelInputs
¶
Bases: TensorSchema
Dimensions: - bvf: Batch size * number of videos * num_frames - bn: Batch size * number of videos - f: Number of frames - c: Number of channels (3) - h: Height of each video frame - w: Width of each video frame
NemotronH_Nano_VL_V2
¶
Bases: Module, HasInnerState, IsHybrid, SupportsEagle3, SupportsMultiModal, SupportsMultiModalPruning, SupportsLoRA, SupportsReplaySSM
Methods:
-
extract_feature_dynamic–Dynamic resolution extract_feature for images.
-
get_mm_mapping–Get the module prefix in multimodal models
Attributes:
-
requires_sequential_video_encoding–Temporarily needed for dynamic res video w/ conv3d, doesn't support bs>1 yet
requires_sequential_video_encoding = True
class-attribute
instance-attribute
¶
Temporarily needed for dynamic res video w/ conv3d, doesn't support bs>1 yet
_create_final_video_embeddings(video_embeddings, num_tokens_per_frame, frames_indices, frame_duration_ms, video_temporal_patch_size=1)
¶
Create final embeddings that combine video embeddings with text embeddings of indicator tokens.
These final embeddings contain:
- Actual video embeddings in positions corresponding to video content
- Text embeddings for indicator tokens (, , and
frame separation text) in their respective positions
These embeddings will replace the placeholder embeddings to create input_embeds for the LLM.
_extract_video_embeddings_temporal(video_input)
¶
Extract per-video embeddings with temporal compression.
Each video is processed separately through extract_feature with num_frames, which uses the fixed-resolution temporal path in RADIO (no attention mask, flash attention).
_process_video_input(video_input)
¶
Process video input, merging indicator-token embeddings only for EVS.
_resize_raw_pixels(frames, size)
¶
Resize decoded uint8 NHWC frames sent with device_resize.
extract_feature_dynamic(pixel_values, imgs_sizes)
¶
Dynamic resolution extract_feature for images.
get_mm_mapping()
¶
Get the module prefix in multimodal models