t5_small_seq2seq(pretrained: bool = False, overrides: object = {})t5_small with the tied text-to-text head.
Model Size
Parameters
pretrainedbool= FalseTrue raises until the T5-Small checkpoint is hosted for Lucid.**overridesobject= {}T5Config fields to change from the Small defaults.Returns
T5ForSeq2SeqLMThe model T5 trains and fine-tunes every task with.
Notes
Reference: Raffel et al., JMLR 2020 (arXiv:1910.10683), §2.4 and §3.7.
Examples
>>> import lucid
>>> from lucid.models.text.t5 import t5_small_seq2seq
>>> model = t5_small_seq2seq().eval()
>>> source = lucid.tensor([[13, 5, 42, 1]])
>>> model(source, labels=lucid.tensor([[7, 9, 1]])).logits.shape
(1, 3, 32128)
>>> model.generate(source, max_length=4).shape[0]
1