nemo_automodel.components.models.inkling2.multimodal
nemo_automodel.components.models.inkling2.multimodal
Image/text entry point sharing Inkling2’s native decoder and checkpoint loader.
Module Contents
Classes
API
Bases: Inkling2ForCausalLM
Insert unnormalized image features after the text embedding normalization.
Keep the vision encoder and projector exclusively on the first stage.
Parameters:
Generated stage FQNs; caller lists are unchanged.
Empty for the native model’s top-level decoder layers.
Backbone resolved by the shared splitter.
Returns: list[list[str]]
Copied stage FQNs with one owner for vision, embedding normalization
Fuse images into unpacked image/text sequences.
Parameters:
Integer [batch, sequence] tokens, including image markers and bodies.
Non-first-stage int64 [batch, sequence, 2] layout, paired with residual history [batch, sequence, sources, hidden] in input_ids. Later stages use only these transported inputs.
Optional decoder-ready embeddings [batch, sequence, hidden]; mutually exclusive with image patches.
BF16 [patches, temporal, side, side, 3] image patches.
Integer [images, 3] row-major grid metadata.
Shared VLM alias for vision_patches_bthwc, shape [patches, temporal, side, side, 3]. Mutually exclusive with it.
Shared VLM alias for vision_grid_thw, shape [images, 3]. Shared PP staging supplies patch/grid chunks on stage zero only.
Integer/bool [batch, sequence], 1 only for image-body positions. Content-image headers share token ID 200005 but must remain 0.
Optional [batch, sequence] real-token validity.
Optional boolean [batch, sequence], true for padding.
Optional integer [batch, sequence] consecutive positions.
Tail length or sequence indices for the shared loss path.
Return final decoder features for external loss.
Returns: torch.Tensor | tuple[torch.Tensor, ...] | CausalLMOutputWithPast
The text decoder’s FP32 logits or output object; inputs are not mutated.
Construct the registered multimodal architecture.
Initialize the decoder and vision encoder after meta materialization.