Cross-Tokenizer Model Fusion

22 concepts14 papers1 proposal

Ensembling is a foundational technique in machine learning: by combining the predictions of multiple models, we can reduce variance, eliminate individual model biases, and significantly boost overall performance. In language modeling, however, ensembling faces a fundamental roadblock: tokenization.

If Model A uses a Llama-based tokenizer and Model B uses a GPT-based tokenizer, their vocabulary matrices do not align. For the word "collaboration", Model A might emit the tokens ["col", "labor", "ation"], while Model B emits ["co", "llaboration"]. At any given generation step, Model A outputs logits over its specific 32,000 tokens, and Model B outputs logits over its 50,000 tokens. You cannot simply average these two logit vectors because a token index in Model A represents a completely different string fragment than the same index in Model B.

To overcome this barrier, a growing body of research focuses on cross-tokenizer model fusion—a suite of inference-time techniques that allow models with completely incompatible vocabularies to collaborate dynamically during decoding.


Granular Marginalization: Projecting to Bytes and Characters

The most mathematically rigorous way to fuse incompatible tokenizers is to project their token-level probabilities into a universal, atomic space that underlies all text: characters or bytes.

Instead of asking "What is the probability of the next token?", the ensemble asks "What is the probability of the next byte?" By calculating probabilities at this granular level, the ensemble creates a common denominator where predictions can be directly aggregated.

Character-Level Marginalization

To combine models at the character level, the ensemble maps token-level output distributions to their constituent characters. This is achieved by summing the probabilities of all tokens that begin with or match a specific character sequence.

As demonstrated by Brian Roark et al. in Design principles of an open-source language modeling microservice package for AAC text-entry applications, deriving character-level probabilities provides a unified mechanism to ensemble models built on words, sub-words, or characters. Expanding this to large language models, Kevin Gu et al. introduced CharED: Character-wise Ensemble Decoding for Large Language Models. CharED marginalizes token probabilities into character distributions at each step, allowing diverse models to collaborate on a single output sequence without requiring any shared vocabularies or additional training.

Byte-Level Alignment

Because character encodings can still vary, moving down to raw bytes offers a truly universal interface. In Exact Byte-Level Probabilities from Tokenized Language Models for FIM-Tasks and Model Ensembles, Buu Phan et al. provided a mathematical framework to extract exact byte-level probabilities from tokenized models. This allows practitioners to directly average predictions in byte space, completely bypassing tokenization distortions.

Model A (Tokens)  ───►  Byte-Level Marginalization  ───┐
                                                       ├───► Combined Byte Space ───► Next Byte
Model B (Tokens)  ───►  Byte-Level Marginalization  ───┘

This byte-level projection has unlocked several powerful applications:


Vocabulary Mapping and Common Spaces

While byte- and character-level marginalization are mathematically elegant, they introduce computational overhead because they require translating distributions at every atomic step. A more direct alternative is to map vocabularies to one another or find a shared token space.

The intuition here is that despite using different tokenization algorithms, mainstream language models exhibit high consistency in how they represent common vocabulary text. This overlap allows for the creation of explicit mapping matrices.

As shown by Yao-Ching Yu et al. in Breaking the Ceiling of the LLM Community by Treating Token Generation as a Classification for Ensembling, researchers can construct a shared vocabulary space by taking the union of individual model vocabularies. Mapping matrices are then used to project model-specific probability distributions into this unified space for consistent aggregation. A similar matrix-mapping technique was utilized by Tom Roth et al. in XVD: Cross-Vocabulary Differentiable Training for Generative Adversarial Attacks to align generative models with victim classifiers that utilize entirely different tokenizers.

To completely avoid the latency bottlenecks of byte-level communication without sacrificing accuracy, Daiki Chijiwa et al. proposed Lossless Vocabulary Reduction for Auto-Regressive Language Models. Their framework mathematically identifies the largest set of tokens shared between models—a "maximal common vocabulary"—and performs ensembling within this common space, maintaining high performance while maximizing inference speed.


Bypassing Token Alignment via Coarser Granularities

A third paradigm avoids token-level alignment altogether by shifting the synchronization point to coarser structural boundaries where different representations naturally converge, such as words, phrases, or full sentences.

Boundary and Span-Level Synchronization

Instead of forcing models to agree on every subword token, the ensemble can let each model generate independently according to its own tokenizer, only synchronizing their scores when they reach a shared linguistic boundary.

Early foundations for this were laid by Felix Stahlberg et al. in SGNMT - A Flexible NMT Decoding Platform for Quick Prototyping of New Models and Search Strategies, where word-level and character-level models were ensembled by synchronizing scores exclusively at common boundary symbols. For structural language modeling, Danielle Saunders et al. demonstrated in Multi-representation ensembles and delayed SGD updates improve syntax-based NMT that finite-state transducers can map disparate internal representations (such as syntactic tags and plain text) into a shared external space, allowing the ensemble to score and synchronize predictions during beam search even when sequences differ in length.

In modern LLM decoding, Yangyifan Xu et al. proposed Hit the Sweet Spot! Span-Level Ensemble for Large Language Models. By ensembling models at the word or multi-word span level rather than the token level, their framework completely bypasses token-alignment complexities, enabling heterogeneous architectures and vocabularies to collaborate in real time.

Sequence-Level Fusion

Taking this concept to its logical conclusion, the ensemble can operate at the level of the entire response.

Pivot Model ───────► Generates Candidate Responses ───────┐
                                                          ▼
Expert Model A ────► Evaluates Full Sequence Likelihood ──┼─► Selects Best Response
Expert Model B ────► Evaluates Full Sequence Likelihood ──┘

In InfiFPO: Implicit Model Fusion via Preference Optimization in Large Language Models, Yanggan Gu et al. introduced a sequence-level fusion framework. Instead of step-by-step token alignment, the system calculates the probability of an entire response across multiple source models during the preference optimization phase. This approach completely circumvents vocabulary conflicts, allowing a smaller pivot model to seamlessly inherit the specialized reasoning or coding strengths of larger, diverse expert models.

Key Foundational Work

Multi-representation Ensembles and Delayed SGD Updates Improve Syntax-based NMT (2018) — contributed 1 concept elements to this direction.
SGNMT - A Flexible NMT Decoding Platform for Quick Prototyping of New Models and Search Strategies (2017) — contributed 1 concept elements to this direction.
History & citationVersion 1 · 2026-10-04

Current · Permanent link

View frozen version 1

Cite this direction

Latest version (a living page):

@misc{lacuna_cross_tokenizer_model_fusion_4ded0baf,
  title = {cross-tokenizer model fusion},
  author = {{Lacuna}},
  howpublished = {Lacuna research direction},
  year = {2026},
  url = {https://lacuna.tiptreesystems.com/direction/cross-tokenizer-model-fusion/rdr_4ded0baff46644038959cd4272944dc5},
  note = {Latest version of a living research direction; cite a version for a fixed text. Accessed 2026-11-24},
}

This exact version (version 1, frozen text):

@misc{lacuna_cross_tokenizer_model_fusion_4ded0baf_v1,
  title = {cross-tokenizer model fusion},
  author = {{Lacuna}},
  howpublished = {Lacuna research direction},
  year = {2026},
  url = {https://lacuna.tiptreesystems.com/direction/cross-tokenizer-model-fusion/rdr_4ded0baff46644038959cd4272944dc5/v/1},
  note = {Version 1, frozen 2026-10-04. Accessed 2026-11-24},
}
About

These directions overlap with this one through shared papers.

See something wrong? Report a mistake