nemo_automodel.components.models.lfm3
nemo_automodel.components.models.lfm3
Submodules
nemo_automodel.components.models.lfm3.confignemo_automodel.components.models.lfm3.modelnemo_automodel.components.models.lfm3.processingnemo_automodel.components.models.lfm3.vl_model
Package Contents
Classes
API
Bases: HFCheckpointingMixin, Lfm3PreTrainedModel, GenerationMixin
LFM3 with a vocabulary head, loadable from LiquidAI’s released checkpoints.
Predict next-token logits and, given labels, the causal LM loss.
Parameters:
Long Tensor of shape [batch, sequence]. Exclusive with inputs_embeds.
Optional padding Tensor of shape [batch, key_sequence], where
key_sequence also counts cached tokens.
Optional long Tensor of shape [batch, sequence].
Optional generation cache, updated in place.
Tensor of shape [batch, sequence, hidden].
Optional long Tensor of shape [batch, sequence]; -100 is ignored.
Shifted internally.
Whether to create and return a generation cache.
Project only the last logits_to_keep positions (0 keeps
all), or the positions in a long Tensor of shape [kept].
Hugging Face output-capture, attention and loss arguments.
Returns: CausalLMOutputWithPast
Output whose logits is a Tensor of shape [batch, kept, vocab] and whose
Return the token embedding table.
Return the vocabulary head.
Replace the token embedding table and retie the head.
Share the vocabulary head with the token embeddings when the config asks for it.