Token-level Ensembling of Models with Different Vocabularies

Rachel Wicks, Kartik Ravisankar, Xinchen Yang, Philipp Koehn, Matt Post
2/28/2025
cs.CL

No official code found. Best implementation: mjpost/abe (0 stars, Apache-2.0, last commit 2025-02-28).

Abstract

Model ensembling is a technique to combine the predicted distributions of two or more models, often leading to improved robustness and performance. For ensembling in text generation, the next token's probability distribution is derived from a weighted sum of the distributions of each individual model. This requires the underlying models to share the same subword vocabulary, limiting the applicability of ensembling, since many open-sourced models have distinct vocabularies. In research settings, experimentation or upgrades to vocabularies may introduce multiple vocabulary sizes. This paper proposes an inference-time only algorithm that allows for ensembling models with different vocabularies, without the need to learn additional parameters or alter the underlying models. Instead, the algorithm ensures that tokens generated by the ensembled models \textit{agree} in their surface form. We apply this technique to combinations of traditional encoder-decoder models and decoder-only LLMs and evaluate on machine translation. In addition to expanding to model pairs that were previously incapable of token-level ensembling, our algorithm frequently improves translation performance over either model individually.

View on arXivView PDF

Code Implementations(1)

mjpost/abeCommunity65%
Apache-2.0

Code and data for "agreement-based ensembling": token-level ensembling of models with different vocabularies

00Roff, RubyJul 29, 20241 years agoApache-2.0
decodingensemblingtranslation

Similar Papers

Cite this paper

@article{wicks2025tokenlevel,
  title  = {Token-level Ensembling of Models with Different Vocabularies},
  author = {Rachel Wicks and Kartik Ravisankar and Xinchen Yang and Philipp Koehn and Matt Post},
  year   = {2025},
  eprint = {2502.21265},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2502.21265v1}
}

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/2502.21265.svg)](https://codeofpaper.com/paper/2502.21265)

Discussion