Auto-dispatching wrapper that loads a seq2seq (encoder-decoder) model.
Covers translation / summarisation heads — currently the Vaswani
Transformer family (transformer_base_seq2seq /
transformer_large_seq2seq). T5, BART, and mBART are the natural
future consumers of this Auto class.
Notes
The forward returns a Seq2SeqLMOutput carrying decoder
logits, optional decoder hidden states / attentions, and the
encoder's outputs so callers can cache them across multiple decoder
passes.
Examples
>>> from lucid.models import AutoModelForSeq2SeqLM
>>> model = AutoModelForSeq2SeqLM.from_pretrained("transformer_base_seq2seq")
>>> type(model).__name__
'TransformerForSeq2SeqLM'