nemo_automodel.components.models.step3p7.model
nemo_automodel.components.models.step3p7.model
Module Contents
Classes
Functions
Data
API
Bases: CausalLMOutputWithPast
CausalLMOutputWithPast plus optional per-depth MTP logits.
Subclassing the HF ModelOutput gives this output the standard
logits/hidden_states fields (so "hidden_states" in out and
getattr(out, "hidden_states") behave like every other model and the
fused-CE path can read the final hidden states), while the MTP fields stay
declared dataclass fields so they survive output-restructuring layers like
FSDP2’s mixed-precision output cast, which rebuild ModelOutput
instances from declared fields only.
Bases: HFCheckpointingMixin, Module, MoEFSDPSyncMixin
Native Step3.7 VLM implementation for MedPix fine-tuning with EP and PP.
Return a sharder-only CP backend; embed + splice + shard happen in forward.
Embedding and the vision multimodal scatter now run inside forward
per microbatch (see the CP branch that calls get_multimodal_embeddings
prepare_inputs_embeds+ :func:shard_sequence_for_cp_round_robin). The returned :class:ContextParallelSharderround-robin-shards only the no-grad aux streams (labels/position_ids/loss_mask/padding_mask) and leavesinput_idsand the media inputs full-length for the forward. Step3.7 uses plain 1-D positions, so noposition_idsare computed here (the aux shard injects and slices them).
Parameters:
The full-sequence batch (with input_ids [batch, sequence]); left intact.
Accepted for hook-signature parity; unused (round-robin CP).
Bases: Module
Step3.7 VLM wrapper using the native Step3.5 MoE language backbone.