nemo_automodel.components.models.lfm3.config
nemo_automodel.components.models.lfm3.config
LFM3 and LFM3-VL configurations for Transformers releases that predate them.
Module Contents
Classes
Data
API
Bases: PreTrainedConfig
Configure the LFM3 decoder of gated short convolutions and grouped-query attention.
layer_types names each layer "conv", "full_attention" or
"sliding_attention". rope_parameters holds one entry per attention
type. Full-attention layers rotate only the first partial_rotary_factor
share of each head and leave the rest unrotated.
Released checkpoints label that partial rotation "default", which
Transformers 5.23 reads as a full rotation. Such an entry is relabelled
"proportional" here, the name under which Transformers and the
publisher’s code both build the trained frequencies, so saved configs load
correctly in either.
Reject RoPE settings this implementation does not run.
Transformers runs this before saving. The config runs it on construction and the model runs it again when built, because loader overrides are written onto an existing config and skip construction.
Raises:
ValueError: If an attention layer type has no RoPE entry, uses a RoPE type other thandefaultorproportional, or scales its frequencies with a non-unitfactor.
Bases: PreTrainedConfig
Configure LFM3-VL: an LFM3 decoder fed by the LFM3-VL vision encoder through an MLP projector.
Bases: PreTrainedConfig
Configure the LFM3-VL vision encoder of gated 2D convolutions and bidirectional attention.
layer_types names each layer "conv" or "full_attention". Patches
are patch_size pixels square and temporal_patch_size frames deep;
the projector later merges each spatial_merge_size square of them.