papie lemmatization · tagging · any language

Decoders

frozen encoderprompt statesmemory projectionT5 decoderself-attn + cross-attn, 3 layersbyte logitsuntied output layerlemmagreedy decodeprevious bytes
T5 decoder: cross-attention over the frozen encoder's prompt states.
Masked decoder (probe)T5 decoder
Generationparallel, mask-and-refine [Ghazvininejad et al. 2019]autoregressive, greedy
Readsthe target word’s bytes onlythe whole prompt (context included)
Initialisationrandomhole-filling pre-trained

Both train on the frozen encoder; only the decoder, the projection head and any POS head are trained. The T5 decoder decodes greedily without a key/value cache, so it dominates CPU time (a cache is the obvious optimisation and is not implemented).