When to Ensemble: Identifying Token-Level Points for Stable and Fast LLM Ensembling

Heecheol Yun, Kwangmin Ki, Jung Hyun Lee, Eunho Yang

TL;DR

Ensembling Large Language Models (LLMs) by averaging their probability distributions usually fails in long-form generation because of "tokenization mismatch"—where models disagree on how to break words into pieces. SAFE (Stable And Fast LLM Ensembling) solves this by selectively ensembling only at specific "safe" token positions, achieving better accuracy than individual models while maintaining the speed of a single model.

What Problem Does This Paper Address?

Ensembling—combining multiple models to get a better result—is a staple of machine learning. In the LLM world, "probability-level ensembling" involves averaging the next-token predictions of several models. While this works wonders for multiple-choice questions, it historically falls apart during long-form generation, such as solving a math problem step-by-step.

The authors identify two primary culprits for this failure:

  1. Tokenization Mismatch: Different models use different "vocabularies" of sub-word units (tokens). If Model A generates the first half of a word, it might put Model B into an "out-of-distribution" state where it starts hallucinating gibberish because it expected that word to be a single, different token.
  2. Efficiency: Aligning the massive vocabularies of multiple models at every single character is computationally expensive, making ensembling painfully slow compared to running a single model.
Illustration of tokenization mismatch causing out-of-vocabulary (OOV) errors during ensembling.

Methods

To overcome these hurdles, the authors introduce SAFE, a framework built on a Generate-Verify-Ensemble cycle. It borrows ideas from speculative decoding to keep the generation process fast and stable.

The SAFE framework's Generate-Verify-Ensemble cycle with probability sharpening.
  • The Roles: One model acts as the Drafter (generating a "lookahead" sequence of tokens), while the other models act as Verifiers.
  • Selective Ensembling: Instead of ensembling every token, SAFE only triggers an ensemble if two specific conditions are met:
  • Alignment: The current token boundary must align across all models, avoiding the "OOV-like" token corruption that derails generation.
  • Lack of Consensus: If all models already strongly agree on the next token, SAFE skips the expensive ensemble math and simply accepts the token.
  • Probability Sharpening: When models are ensembled, their combined probability distribution can sometimes become "blurry" or overly smooth. SAFE uses a sharpening strategy (like a heuristic prefix-sum or geometric mean) to help the ensemble commit to the most confident, correct token.
  • KV Cache Management: To keep the models in sync efficiently, SAFE "prunes" the Key-Value (KV) cache of the models whenever an ensemble replaces a drafted token. This ensures the models aren't conditioned on discarded "draft" text without requiring full recalculations.

Datasets

The researchers evaluated SAFE across several rigorous benchmarks focusing on reasoning and general knowledge:

  • MMLU-redux: A cleaned-up version of the popular Massive Multitask Language Understanding benchmark.
  • MATH500 & GSM8K: Standard benchmarks for mathematical word problems.
  • ARC-Challenge: Difficult science questions.
  • BBH (Big-Bench Hard): A subset of 15 tasks where models typically struggle without explicit reasoning steps.

The models used for testing included InternLM3-8B, Qwen2.5-7B, and EXAONE-3.5-7.8B, chosen specifically because they have significantly different tokenizers.

Key Insights and Ideas

  • The "When" is as important as the "How": The biggest insight of the paper is that ensembling less often actually makes the output better. By skipping points where tokenizers clash, SAFE prevents the "error propagation" that usually turns ensemble outputs into unnatural token repetition (e.g., generating "SofÃaÂaÂÂÃ" instead of "Sofia").
  • Tokenization is a Hidden Bottleneck: Even if two models are equally capable, if they don't "speak" the same token language, they cannot easily collaborate at the probability level without a mediator like SAFE.
  • Consensus as an Efficiency Hack: In structured tasks like math, models agree on the next token over 95% of the time. SAFE leverages this by only doing the heavy lifting of ensembling when the models actually disagree, saving massive amounts of compute.

Key Results

  • Superior Accuracy: SAFE consistently outperformed both individual models and previous state-of-the-art ensemble methods (like UniTE). For example, on MATH500, UniTE+SAFE achieved 77.6% accuracy, a massive jump over the baseline UniTE's 59.6%.
  • Single-Model Speed: Despite using multiple models, SAFE’s latency is nearly identical to running a single model because it avoids redundant calculations and uses efficient KV caching.
  • Minimal Intervention: Remarkably, SAFE achieves these performance gains while ensembling fewer than 1% of tokens in some math tasks and roughly 10-15% in general reasoning tasks.

Limitations and Future Work

  • Model Quality Matters: The authors note that if one model in the ensemble is significantly weaker than the others, it can "distort" the distribution and lead to worse results than the best single model acting alone.
  • Scope of Models: The current study focused on 7B-8B and 32B parameter models. While the logic should scale, the overhead of managing much larger models (like 70B+) in a single ensemble remains a hardware challenge.
  • Reasoning-Specific Models: The authors suggest that applying SAFE to specialized "reasoning models" (like the OpenAI o1 series or DeepSeek-R1) would be a promising next step to see if ensembling can further push the ceiling of LLM logic capabilities.

Summary updated

BibTeX
@inproceedings{yun2026when,
  author = {Heecheol Yun and Kwangmin Ki and Jung Hyun Lee and Eunho Yang},
  title = {{When to Ensemble: Identifying Token-Level Points for Stable and Fast LLM Ensembling}},
  booktitle = {International Conference on Learning Representations},
  year = {2026},
  url = {https://openreview.net/forum?id=kfPkF2ACDM},
}
Figure