Skip to content

[Proposal] Add T5Gemma encoder-decoder adapter (T5GemmaForConditionalGeneration) #1405

Description

@jlarson4

Proposal

Add a TransformerBridge adapter for T5GemmaForConditionalGeneration (Google T5Gemma), a recent encoder-decoder family built from decoder-only Gemma.

Motivation

T5Gemma is the one modern, actively-developed encoder-decoder line. It is made by converting pretrained Gemma 2/3 into an encoder-decoder, so it shares weight lineage with models TransformerLens already supports. That lets researchers compare a decoder-only model against its encoder-decoder counterpart on the same base, which decoder-only models alone cannot offer. Paired with a BART adapter, it keeps the library's encoder-decoder coverage current.

Gap scan (2026-06-18): 9 models, ~40K downloads. Downloads are low, but it would be good to support a modern T5 architecture for users who are interested in doing research in this area. Checkpoints go down to about 270M.

Pitch

Reuse both the existing T5 encoder-decoder pattern and the existing Gemma components.

  • Claude Code users can scaffold with /add-model-support google/t5gemma-s-s-ul2.
  • Register at the four sites listed in contributing.md.
  • Verify smallest-first: google/t5gemma-s-s-ul2, then google/t5gemma-2b-2b-ul2.

Additional context

Checklist

  • I have checked that there is no similar issue in the repo (required)

Metadata

Metadata

Labels

TransformerBridgeBug specific to the new TransformerBridge systemcomplexity-moderateModerately complicated issues for people who have intermediate experience with the codegood first issueGood for newcomershelp wantedExtra attention is needednew-architectureThis card involves adding a new architecture .

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions