Auto-dispatching wrapper that loads a masked-LM model.
Resolves names like "bert_base_mlm" / "roformer_mlm" to their
concrete {Family}ForMaskedLM subclass — bidirectional models
trained with the masked-token reconstruction objective.
Notes
The forward returns a MaskedLMOutput with logits of shape
(B, T, vocab_size). Subclasses use
MaskedLMMixin.compute_lm_loss to reduce against (B, T)
label tensors with ignore_index=-100 for non-masked positions.
Examples
>>> from lucid.models import AutoModelForMaskedLM
>>> model = AutoModelForMaskedLM.from_pretrained("bert_base_mlm")
>>> type(model).__name__
'BERTForMaskedLM'