nemo_automodel.components.models.hy_mt2
nemo_automodel.components.models.hy_mt2
Submodules
nemo_automodel.components.models.hy_mt2.confignemo_automodel.components.models.hy_mt2.dispatchnemo_automodel.components.models.hy_mt2.layersnemo_automodel.components.models.hy_mt2.modelnemo_automodel.components.models.hy_mt2.state_dict_adapter
Package Contents
Classes
API
Bases: HFCheckpointingMixin, Module, MoEFSDPSyncMixin
Hy-MT2-30B-A3B causal-LM wrapper.
Mixes in MoEFSDPSyncMixin so EP / FSDP2 expert-gradient sync works
out of the box (set distributed.ep_size in the YAML; must divide
num_experts=128). The HFCheckpointingMixin provides
from_pretrained / save_pretrained over the HF safetensors layout.
Forward pass returning CausalLMOutputWithPast.
Parameters:
Token IDs. BSHD: [B, S]; THD: [1, T] (squeezed internally).
Optional position indices.
Optional 2D padding mask.
Optional padding mask used by the THD squeeze helper.
If 0 (default) compute logits for all positions; if > 0
only compute logits for the last logits_to_keep positions
(avoids materialising the full logit matrix during generation /
enables fused-linear cross-entropy in training).
Whether to return the final hidden states (the
input to lm_head) on the output. Defaults to the config flag.
Additional attention kwargs forwarded to the base model (e.g. qkv_format, cu_seqlens, CP kwargs).
Returns: CausalLMOutputWithPast
class:~transformers.modeling_outputs.CausalLMOutputWithPast with