TL;DR
Distilling knowledge from a large "teacher" LLM into a smaller "student" breaks down when they use different tokenizers—they literally lack a shared coordinate system to compare probabilities. SOLA (Semantic Optimal Local Alignment) explicitly rebuilds a local bridge between heterogeneous vocabularies using empirical token co-occurrences and optimal transport. This lets the student inherit both the teacher’s exact meaning and its rich distribution of runner-up guesses, turning cases of negative transfer into consistent performance gains.
What Problem Does This Paper Address?
Standard knowledge distillation (KD) trains a student model to mimic the output probability vector of a teacher model. That assumes coordinate $i$ in the teacher's output means the exact same thing as coordinate $i$ in the student's. Today, open-source model families (LLaMA, Qwen, Gemma, GPT) all chop text differently: one model sees "Good" as a single token, while another splits it into "Go" and "od". Both the sequence positions and vocabulary indices are out of sync.
Effective distillation needs two ingredients: token identity (knowing which student tokens mean the same thing as the teacher's choices) and distributional density (knowing how much probability mass each alternative carries). Existing cross-tokenizer methods sacrifice one for the other:
- Shape-based methods sort probability vectors and match their shapes—preserving density, but pairing completely unrelated tokens just because they share a rank.
- Lexical methods match tokens by spelling/edit distance, which fails on short, ambiguous subwords and conflates sequence position with meaning.
- Text-space methods decode tokens back into text chunks, compressing rich token-level probabilities into coarse, sparse events.
Methods
Instead of forcing an immediate comparison across mismatched spaces, SOLA treats cross-tokenizer distillation as a local support-construction problem in three stages:
- Sequence Synchronization (Minimal Complete Correspondence, MCC): Before looking at probabilities, SOLA aligns the sequence axis by finding exact boundaries where decoded prefixes match (e.g.,
"Good"="Go" + "od"). Standard Dynamic Time Warping (DTW) is then confined inside these tiny, guaranteed-equal text blocks rather than stretching across the whole sequence. - Data-Driven Cross-Vocabulary Cost: Using a calibration corpus, SOLA counts how often teacher and student tokens co-occur inside MCC blocks. Crucially, it applies a hub-correction exponent to penalize generic, high-frequency student subwords so they don't act as "universal magnets" for probability mass.
- Bidirectional Retrieval & Optimal Transport: Running Optimal Transport (OT) over 100,000+ vocabulary items per step is computationally infeasible. Instead, at each training step, SOLA grabs the teacher's top-$K$ predicted tokens (forward retrieval to find matching student candidates) and then looks backward from those student tokens to pull in other plausible teacher tokens (backward expansion). On this compact local support (capped at 256 tokens per side), it runs standard Sinkhorn entropic OT to smoothly route teacher probability mass to the student.
Datasets
No new benchmarks are introduced; the authors evaluate across established suites (capping calibration slices at 40M tokens from respective training sets, plus WikiText-103 for out-of-distribution ablations):
- Instruction Following: Trained on Dolly, evaluated on Dolly, Self-Instruct, Vicuna, Super-NaturalInstructions (S-NI), and Unnatural Instructions (UnNI).
- General Instruction: Trained on UltraChat, evaluated zero-shot on ARC-C/E, BoolQ, IFEval, MMLU, and PIQA.
- Code & Math Transfer: Trained on domain-specific corpora (following the SeDi setup) and evaluated on HumanEval and MBPP (code), and MetaMath, GSM8K, MATH, and ORCA (math).
Key Insights and Ideas
- Preventing Negative Transfer Across Huge Vocabulary Gaps: When a teacher with a massive vocabulary (like Qwen3-8B) teaches a small-vocabulary student (GPT-2), identity-blind baselines actually make the student worse than simple fine-tuning (SFT)—routing mass onto concepts the student's tokenizer cannot represent cleanly. Restricting transport to reachable local correspondences fixes this.
- Backward Expansion is the Secret Sauce: In component ablations, adding backward expansion yielded the single largest conditional jump (+0.87 ROUGE-L). Because one student subword might map to multiple teacher tokens across contexts, pulling those extra teacher rows into the local transport problem gives the student a much truer picture of the local probability landscape.
- Coverage Predicts Downstream Quality: The authors track "diagnostic coverage"—how much of the teacher's active probability mass survives inside the retrieved local support. Across six distinct methods, higher teacher-mass coverage strongly correlates with better benchmark scores (Spearman $r_s = 0.89$).
Key Results
- Dolly Suite (LLaMA2-7B $\rightarrow$ GPT-2-124M): SOLA achieves 20.33 average ROUGE-L, beating SFT (15.79) and the strongest concurrent baseline, SeDi (19.39), recovering over a quarter of the teacher-student gap.
- UltraChat Zero-Shot (Qwen3-8B $\rightarrow$ GPT-2): Four major baselines (ULD, MLOT, MinED, ALM) suffer negative transfer, scoring below SFT (33.03). SOLA wins every benchmark, reaching 35.36 average accuracy (+1.66 over SeDi).
- Code & Math: SOLA leads on Code (21.95 vs. SeDi's 21.11 Avg ROUGE-L) and Math (28.03 vs. SeDi's 27.22). On the notoriously tough MATH benchmark, SOLA is the only distillation method to outperform SFT (21.66 vs. 21.06).
- Efficiency: Despite solving OT problems on the fly, restricting them to small local supports makes SOLA 8.17% faster per step than SeDi (963.2 ms vs. 1,048.9 ms on an A100) while using 0.68 GiB less peak memory, after a one-time, reusable 47.7-minute preprocessing step.
Limitations and Future Work
- Short-Span Assumption: MCC relies on tokenizers resynchronizing every few subwords (standard for English BPE and SentencePiece pairs). Inputs with long mixed-script spans, non-Latin multilingual transfers, or heavy byte-fallback regions are out of scope.
- Calibration Domain Shift: Because cross-vocabulary costs are estimated once offline, severe domain mismatch hurts. Swapping in-domain instruction calibration for general Wikipedia text (WikiText-103) drops teacher-mass coverage from 0.90 to 0.72 and costs 1.17 ROUGE-L points.
- Unexplored Regimes: On-policy student sampling and distillation from massive 70B-scale teachers remain open directions not tested in this work.
Summary updated