OmniDraft: Ein Cross-Vokabular, Online-adaptiver Drafter für On-Device Speculative Decoding
OmniDraft: A Cross-vocabulary, Online Adaptive Drafter for On-device Speculative Decoding
July 3, 2025
Autoren: Ramchalam Kinattinkara Ramakrishnan, Zhaocong Yuan, Shaojie Zhuo, Chen Feng, Yicheng Lin, Chenzheng Su, Xiaopeng Zhang
cs.AI
Zusammenfassung
Spekulative Dekodierung erfordert im Allgemeinen ein kleines, effizientes Draft-Modell, das entweder vortrainiert oder offline auf eine bestimmte Zielmodellreihe, beispielsweise Llama- oder Qwen-Modelle, destilliert wurde. In Onlinedeployment-Szenarien gibt es jedoch zwei große Herausforderungen: 1) die Verwendung eines Zielmodells, das mit dem Draft-Modell inkompatibel ist; 2) die Erwartung von Latenzverbesserungen über Nutzung und Zeit hinweg. In dieser Arbeit schlagen wir OmniDraft vor, ein einheitliches Framework, das es einem einzelnen Draft-Modell ermöglicht, mit jedem Zielmodell zu arbeiten und sich dynamisch an Benutzerdaten anzupassen. Wir führen einen Online-N-Gram-Cache mit hybridem Distillations-Fine-Tuning ein, um die Vokabularinkompatibilität zwischen Draft- und Zielmodellen zu adressieren; und verbessern die Dekodierungsgeschwindigkeit weiter durch adaptive Drafting-Techniken. OmniDraft eignet sich besonders für On-Device-LLM-Anwendungen, bei denen Modellkosten, Effizienz und Benutzeranpassung die Hauptstreitpunkte sind. Dies unterstreicht weiterhin die Notwendigkeit, die oben genannten Herausforderungen zu bewältigen, und motiviert das Paradigma „Ein Drafter für alle“. Wir demonstrieren die Leistungsfähigkeit des OmniDraft-Frameworks durch Online-Learning bei Aufgaben zur mathematischen Argumentation, Codierung und Textgenerierung. Insbesondere ermöglicht OmniDraft einem einzelnen Llama-68M-Modell, sich mit verschiedenen Zielmodellen wie Vicuna-7B, Qwen2-7B und Llama3-8B für spekulative Dekodierung zu paaren; und bietet zusätzlich eine Beschleunigung von bis zu 1,5-2x.
English
Speculative decoding generally dictates having a small, efficient draft model
that is either pretrained or distilled offline to a particular target model
series, for instance, Llama or Qwen models. However, within online deployment
settings, there are two major challenges: 1) usage of a target model that is
incompatible with the draft model; 2) expectation of latency improvements over
usage and time. In this work, we propose OmniDraft, a unified framework that
enables a single draft model to operate with any target model and adapt
dynamically to user data. We introduce an online n-gram cache with hybrid
distillation fine-tuning to address the cross-vocabulary mismatch across draft
and target models; and further improve decoding speed by leveraging adaptive
drafting techniques. OmniDraft is particularly suitable for on-device LLM
applications where model cost, efficiency and user customization are the major
points of contention. This further highlights the need to tackle the above
challenges and motivates the ``one drafter for all'' paradigm. We
showcase the proficiency of the OmniDraft framework by performing online
learning on math reasoning, coding and text generation tasks. Notably,
OmniDraft enables a single Llama-68M model to pair with various target models
including Vicuna-7B, Qwen2-7B and Llama3-8B models for speculative decoding;
and additionally provides up to 1.5-2x speedup.