Knowledge distillation (KD) is the standard process for transferring the "intelligence" of a massive teacher model into a smaller, more efficient student. Traditionally, this process relies on a strict assumption: the teacher and the student must speak the same language at the most granular level. They must share an identical tokenizer and vocabulary.
When this assumption holds, the student can directly mimic the teacher’s output probability distributions (logits). However, as Sun et al. and Ko et al. point out, this dependency creates a "black hole" in model development. It prevents us from distilling a state-of-the-art model (like Llama-3) into a student that uses a more efficient vocabulary Zhao et al. or one specialized for a new domain like medicine Gao et al..
Cross-tokenizer knowledge distillation (CTKD) aims to break this constraint, allowing knowledge transfer between models with entirely different ways of carving text into tokens.
The Alignment Problem
To understand why different tokenizers break distillation, consider the word "distillation."
- Tokenizer A might see it as one token: [distillation].
- Tokenizer B might see it as two: [distill] + [ation].
This creates two fundamental mismatches. First, there is a dimension mismatch: the teacher’s output vector might have 50,000 dimensions, while the student’s has only 5,000. You cannot calculate the distance between two vectors of different sizes using standard measures like KL-Divergence.
Second, there is a boundary mismatch. Even if the vocabulary sizes were identical, the models are predicting different textual spans at each step. As Chen et al. and Zhu et al. observe, the structural mismatch prevents a direct one-to-one mapping of predictive distributions. The student doesn't know which part of the teacher's "thought" it should be mimicking at any given moment.
Bridging the Gap via Sequence Alignment
The most intuitive way to solve this is to find a "common denominator" between the two models. Since both models are ultimately processing the same underlying text, researchers use sequence alignment techniques to synchronize them.
Fu et al. et al. proposed using dynamic programming to align token sequences. By finding the optimal path that maps the teacher's tokens to the student's tokens, the student can learn the underlying semantic distribution even when vocabulary boundaries shift.
Zhu et al. take this further with Multi-Level Optimal Transport (OT). Instead of a rigid mapping, OT treats the problem as finding the most efficient way to transform the teacher's distribution into the student's. By aligning models at both the token and sequence levels, they enable transfer between models with completely different architectures and tokenizers.
Matching Likelihoods and Chunks
Another approach is to move away from individual tokens entirely and focus on the probability of text "chunks."
Minixhofer et al. introduced Approximate Likelihood Matching (ALM). The core idea is to identify "aligned chunks"—sequences of tokens from different models that represent the exact same underlying byte sequence. By matching the likelihood of these shared textual spans, the student can inherit specialized capabilities from the teacher without ever needing to share a vocabulary index.
Similarly, Phan et al. uncovered a recursive structure within Byte-Pair Encoding (BPE) that allows for the computation of exact likelihoods across different vocabularies. This probabilistic framework ensures that the student mimics the teacher's intent across the entire string of text, rather than struggling with mismatched sub-word units.
Projecting into a Shared Space
If the output layers (logits) are too different to align, some researchers look deeper into the model's internal "hidden states."
Zhang et al. developed Dual-Space Knowledge Distillation (DSKD) to solve the "space discrepancy." They use a cross-model attention mechanism that allows the student to "look" at the teacher’s hidden representations. By projecting these states into a unified space, the student can inherit knowledge even when a single concept is represented by a different number of sub-tokens in each model.
For conversational models, Zhang et al. proposed daDPO, which shifts the focus to the sentence level. By matching the overall probability of a full response rather than the probability of the next token, the student can capture the teacher's high-level reasoning and style without being hindered by incompatible tokenizers.
Why It Works: The Intuition
The success of these methods suggests that "knowledge" in a language model is not tied to the specific tokens used to represent it. Whether a model sees "knowledge" as one unit or two, the underlying semantic probability—the likelihood of that concept appearing in a given context—remains the same.
By using alignment algorithms (like Optimal Transport or Dynamic Programming) or by anchoring distillation to a universal format (like bytes or full sentences), we can strip away the "tokenizer tax." This allows us to mix and match model families, enabling a future where the best teacher can train any student, regardless of their internal vocabulary.
Key Foundational Work
Extremely Small BERT Models from Mixed-Vocabulary Training (2021) — contributed 1 concept elements to this direction.
Knowledge Inheritance for Pre-trained Language Models (2022) — contributed 1 concept elements to this direction.