TL;DR
Teaching a small language model to mimic a massive one works great—until you realize they chop words into completely different pieces. When a teacher and student model use different tokenizers, standard distillation methods accidentally throw away huge chunks of useful teaching signal right where the vocabularies disagree. SimCT fixes this without adding complex new parameters or changing the core training math: it simply steps back and compares the models over the shortest text spans where their token boundaries naturally sync up.
What Problem Does This Paper Address?
To shrink massive LLMs into fast, deployable ones, researchers rely on knowledge distillation. Specifically, On-Policy Distillation (OPD) has become the gold standard: instead of learning from a static dataset, the small "student" model generates its own text prefixes, and the large "teacher" model grades what token should come next. This prevents early mistakes from compounding at test time.
There is a catch, though. Standard OPD quietly assumes the teacher and student speak the exact same subword language. In reality, you often want to distill across model families—say, from Qwen to Gemma or Phi—which use completely different tokenizers.
This creates two headaches:
- Vocabulary Mismatch: Modern LLM families only share a fraction of their vocabularies (sometimes around 60%). If you only supervise exact shared tokens, you ignore everything else the teacher wants to say.
- Sequence Mismatch: Even for basic words, models segment text differently. If the teacher reads
"happy"as["hap", "py"]and the student reads["ha", "pp", "y"], comparing their "next-token" probability distributions step-by-step is comparing apples to two-thirds of an orange.
Existing workarounds use heavy machinery like optimal transport or extra learned projection layers. The authors ask: Can we recover that lost teacher signal with zero extra parameters, using just the tokenizers we already have?
Methods
Instead of inventing a new loss function, Simple Cross-Tokenizer OPD (SimCT) keeps the standard reverse-KL distillation objective intact and redesigns the supervision space—the set of candidate units the two models are graded on.
First, SimCT keeps all 1:1 exact shared tokens ($V_T \cap V_S$). Next, for regions where the tokenizers disagree, it constructs Minimal Aligned Units (MAUs). An MAU is the shortest non-empty span of text where both tokenizers' boundaries synchronize again (like the full string "happy" in the example above).
To turn these multi-token spans into comparable probabilities:
- For exact shared tokens, both models just output their standard next-token log-probabilities.
- For multi-token MAUs, each model computes the sequence log-likelihood of its own token realization (using autoregressive conditioning on the prefix and preceding tokens in the span) and divides by the number of tokens $k$ it took to spell it. This length-normalization ensures a model isn't penalized just because its tokenizer chops a word into smaller pieces.
- Finally, SimCT normalizes these scores via a softmax over the combined candidate set (shared tokens + MAUs) and computes the standard OPD divergence between the teacher and student distributions.
Datasets
- Warm-start SFT Training: The authors built 10K-example teacher-generated datasets per teacher using math prompts from GSM8K, Orca-Math, OpenMathInstruct-1, and MATH (excluding MATH-500), alongside coding prompts from OpenCodeInstruct, KodCode, TACO, and CodeContests.
- Evaluation Benchmarks: Models were tested zero-shot on GSM8K and MATH-500 for mathematical reasoning, and MBPP and LiveCodeBench-v6 (LCB-v6) for code generation. No new benchmarks were introduced.
Key Insights and Ideas
- Exact token matching leaves massive gains on the table: Depending on the model pair, roughly 11% to 20% of tokens fail to align one-to-one. Even at aligned positions, high-probability teacher predictions frequently fall outside the shared vocabulary. Recovering both sources of lost signal drives SimCT's performance, increasing mean represented teacher next-token support across rollouts from 95.6% to 99.5%.
- Granularity matters (finer is better): Why stop at minimal aligned units instead of comparing whole sentences or big chunks? The authors prove mathematically—and verify empirically—that merging minimal units into coarser chunks sums away local probabilities, erasing fine-grained teacher–student disagreements inside the chunk. In ablations, the more KL signal you erase via coarsening, the worse the student performs.
Key Results
Across three large-to-small cross-family pairs (Qwen2.5-7B $\rightarrow$ Phi-4-mini, Qwen2.5-7B $\rightarrow$ Gemma-2-2B, and Phi-4-mini $\rightarrow$ Gemma-2-2B), SimCT outperformed SFT, exact shared-vocabulary OPD (SimpleOPD), and specialized cross-tokenizer baselines (ALM, GOLD, DSKD) on every single benchmark:
- Overall Gain: SimCT achieved an average relative Pass@1 gain of 6.0% over the SFT warm-start across the three pairs (specifically +6.0%, +7.3%, and +4.7% per pair).
- Concrete Jumps: When distilling
Qwen2.5-7BintoPhi-4-mini, average Pass@1 rose from 51.30 (SFT) and 52.02 (SimpleOPD) to 55.06 with SimCT—boosting GSM8K to 90.22% and LiveCodeBench-v6 from 8.57% to 12.57%. - Efficiency: Because it requires no extra learned parameters or optimal-transport solvers, SimCT adds only slight wall-clock overhead compared to SimpleOPD and runs faster than the evaluated ALM, GOLD, and DSKD implementations.
Limitations and Future Work
- Scope of Models and Tasks: Experiments focused on math and code reasoning across three model pairs; scaling to broader domains and model sizes remains open.
- Tokenizer Assumptions: Finding minimal aligned units works naturally for standard BPE-style subword tokenizers, but may need adaptation for tokenizers with radically different segmentation rules.
- White-Box Requirement: SimCT needs access to the teacher's token-level probability distributions, making it unsuitable for closed, API-only black-box teachers that only return sampled text or scalar rewards.
Summary updated