Seq vs Seq: An Open Suite of Paired Encoders and Decoders

📄 arXiv: 2507.11412v1 📥 PDF

作者: Orion Weller, Kathryn Ricci, Marc Marone, Antoine Chaffin, Dawn Lawrie, Benjamin Van Durme

分类: cs.CL, cs.IR, cs.LG

发布日期: 2025-07-15


💡 一句话要点

提出Ettin模型套件,系统性对比Encoder和Decoder架构在不同任务上的性能差异。

🎯 匹配领域: 支柱九:具身大模型 (Embodied Foundation Models)

关键词: Encoder-Decoder模型 语言模型 自然语言处理 模型对比 模型训练 开放数据 文本分类 信息检索

📋 核心要点

  1. 现有研究缺乏在相同训练条件下对Encoder和Decoder架构的公平对比,导致性能评估存在偏差。
  2. 论文提出Ettin模型套件,包含参数量级相同的Encoder和Decoder模型,并使用统一的训练方法。
  3. 实验表明,Encoder擅长分类和检索,Decoder擅长生成任务,且架构迁移效果不如专门训练。

📝 摘要(中文)

大型语言模型(LLM)社区几乎完全专注于仅解码器语言模型,因为它们更容易用于文本生成。然而,很大一部分社区仍然使用仅编码器模型来执行分类或检索等任务。之前的工作试图比较这些架构,但被迫与具有不同参数数量、训练技术和数据集的模型进行比较。我们介绍了SOTA开放数据Ettin模型套件:配对的仅编码器和仅解码器模型,范围从1700万个参数到10亿个参数,在多达2万亿个token上进行训练。对仅编码器和仅解码器模型使用相同的配方,可在各自的大小类别中产生SOTA配方,击败了作为编码器的ModernBERT和作为解码器的Llama 3.2和SmolLM2。与之前的工作一样,我们发现仅编码器模型擅长分类和检索任务,而解码器擅长生成任务。然而,我们表明,通过持续训练将解码器模型适应于编码器任务(反之亦然)不如仅使用反向目标(即,400M编码器在MNLI上优于1B解码器,反之亦然)好。我们开源了这项研究的所有成果,包括训练数据、按检查点分割的训练顺序和200多个检查点,以允许未来的工作分析或扩展训练的各个方面。

🔬 方法详解

问题定义:现有研究在比较Encoder和Decoder架构时,由于模型参数量、训练数据和训练方法等因素的差异,难以进行公平的性能对比。这使得我们无法准确评估不同架构在不同任务上的优劣,阻碍了模型选择和优化。

核心思路:论文的核心思路是构建一个包含配对的Encoder和Decoder模型的套件,并使用相同的训练数据和训练方法进行训练。通过控制变量,可以更准确地评估不同架构在不同任务上的性能差异,从而为模型选择和优化提供更可靠的依据。

技术框架:Ettin模型套件包含参数量从1700万到10亿的配对Encoder和Decoder模型。所有模型均使用相同的训练数据和训练方法进行训练。训练数据包括高达2万亿个token。论文开源了所有训练数据、训练顺序和200多个检查点,方便后续研究。

关键创新:该研究的关键创新在于系统性地对比了Encoder和Decoder架构在不同任务上的性能差异,并发现架构迁移效果不如专门训练。这为模型选择和优化提供了重要的指导。

关键设计:论文的关键设计包括:1)构建配对的Encoder和Decoder模型,确保参数量级相同;2)使用相同的训练数据和训练方法,控制变量;3)开源所有训练数据和模型检查点,方便后续研究。

🖼️ 关键图片

fig_0
fig_1
fig_2

📊 实验亮点

Ettin模型套件在各自的大小类别中取得了SOTA性能,击败了作为编码器的ModernBERT和作为解码器的Llama 3.2和SmolLM2。实验表明,400M的Encoder在MNLI任务上优于1B的Decoder,反之亦然,证明了专门训练的重要性。

🎯 应用场景

该研究成果可应用于自然语言处理的多个领域,例如文本分类、信息检索、文本生成等。通过选择合适的模型架构,可以提高任务性能并降低计算成本。此外,开源的数据集和模型可以促进相关领域的研究。

📄 摘要(原文)

The large language model (LLM) community focuses almost exclusively on decoder-only language models, since they are easier to use for text generation. However, a large subset of the community still uses encoder-only models for tasks such as classification or retrieval. Previous work has attempted to compare these architectures, but is forced to make comparisons with models that have different numbers of parameters, training techniques, and datasets. We introduce the SOTA open-data Ettin suite of models: paired encoder-only and decoder-only models ranging from 17 million parameters to 1 billion, trained on up to 2 trillion tokens. Using the same recipe for both encoder-only and decoder-only models produces SOTA recipes in both categories for their respective sizes, beating ModernBERT as an encoder and Llama 3.2 and SmolLM2 as decoders. Like previous work, we find that encoder-only models excel at classification and retrieval tasks while decoders excel at generative tasks. However, we show that adapting a decoder model to encoder tasks (and vice versa) through continued training is subpar compared to using only the reverse objective (i.e. a 400M encoder outperforms a 1B decoder on MNLI, and vice versa for generative tasks). We open-source all artifacts of this study including training data, training order segmented by checkpoint, and 200+ checkpoints to allow future work to analyze or extend all aspects of training.