Cross-Tokenizer On-Policy Distillation via Byte-Prefix Marginalization

· Source: cs.CL updates on arXiv.org · Field: Technology & Digital — Artificial Intelligence & Machine Learning · Depth: Expert, extended

Summary

Cross-Tokenizer On-Policy Distillation via Byte-Prefix Marginalization (BPM) addresses the challenge of consolidating diverse capabilities from open-weight language models with heterogeneous tokenizers into a single compact student model. BPM re-expresses a teacher's next-token distribution over the student vocabulary in a shared byte space. It maps teacher token probabilities to the longest student token byte prefixes, aggregates mass, and handles unmatched mass with a residual category, ensuring a vocabulary-complete, byte-aligned, and mass-preserving target. This method exactly recovers the teacher-induced byte-prefix marginal at over 99% of training positions. Across experiments with Qwen3-32B, GLM-Z1-9B-0414, and MiniMax-M2.7 as teachers and Qwen3.5-2B as student, BPM consistently improved six-benchmark avg@8 by 3.7–6.6 points over baselines. It also identified and mitigated a "whitespace collapse" issue in code generation by masking all-whitespace target positions, preventing a significant performance drop from 49% to 9% for one pair.

Key takeaway

For machine learning engineers consolidating diverse LLM capabilities or improving inference efficiency, Byte-Prefix Marginalization (BPM) offers a robust solution for cross-tokenizer on-policy distillation. You should consider implementing BPM, as it consistently outperforms existing methods by 3.7–6.6 avg@8 points, ensuring accurate knowledge transfer across models with different tokenizers. Crucially, apply the precomputed whitespace-row mask to prevent performance collapse in code generation tasks.

Key insights

Byte-Prefix Marginalization (BPM) enables robust cross-tokenizer on-policy distillation by aligning teacher and student distributions in a shared byte space.

Principles

Method

BPM maps teacher token probabilities to the longest student token byte prefixes, aggregates mass, and assigns unmatched mass to a residual category. It minimizes a generalized Jensen–Shannon divergence.

In practice

Topics

Best for: AI Engineer, Research Scientist, AI Scientist, Machine Learning Engineer, NLP Engineer

Related on AIssential

Open in AIssential →

Editorial summary, takeaway, and curation by AIssential. Original article published by cs.CL updates on arXiv.org.