Encoder-Decoder Gemma: Improving the Quality-Efficiency Trade-Off via Adaptation

Biao Zhang, Fedor Moiseev, Joshua Ainslie, Paul Suganthan, Min Ma +5 more
4/8/2025
cs.CLcs.LG

No confident code implementation found for this paper. 1 possible match can be shown below.

Abstract

While decoder-only large language models (LLMs) have shown impressive results, encoder-decoder models are still widely adopted in real-world applications for their inference efficiency and richer encoder representation. In this paper, we study a novel problem: adapting pretrained decoder-only LLMs to encoder-decoder, with the goal of leveraging the strengths of both approaches to achieve a more favorable quality-efficiency trade-off. We argue that adaptation not only enables inheriting the capability of decoder-only LLMs but also reduces the demand for computation compared to pretraining from scratch. We rigorously explore different pretraining objectives and parameter initialization/optimization techniques. Through extensive experiments based on Gemma 2 (2B and 9B) and a suite of newly pretrained mT5-sized models (up to 1.6B), we demonstrate the effectiveness of adaptation and the advantage of encoder-decoder LLMs. Under similar inference budget, encoder-decoder LLMs achieve comparable (often better) pretraining performance but substantially better finetuning performance than their decoder-only counterpart. For example, Gemma 2B-2B outperforms Gemma 2B by $\sim$7\% after instruction tuning. Encoder-decoder adaptation also allows for flexible combination of different-sized models, where Gemma 9B-2B significantly surpasses Gemma 2B-2B by $>$3\%. The adapted encoder representation also yields better results on SuperGLUE. We will release our checkpoints to facilitate future research.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. 1 weaker match is hidden by default — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{zhang2025encoderdecoder,
  title  = {Encoder-Decoder Gemma: Improving the Quality-Efficiency Trade-Off via Adaptation},
  author = {Biao Zhang and Fedor Moiseev and Joshua Ainslie and Paul Suganthan and Min Ma and Surya Bhupatiraju and Fede Lebron and Orhan Firat and Armand Joulin and Zhe Dong},
  year   = {2025},
  eprint = {2504.06225},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2504.06225v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2504.06225.svg)](https://codeofpaper.com/paper/2504.06225)

Discussion