AdaSPEC: Selektive Wissensdistillation für effiziente spekulative Decoder
AdaSPEC: Selective Knowledge Distillation for Efficient Speculative Decoders
October 22, 2025
papers.authors: Yuezhou Hu, Jiaxin Guo, Xinyu Feng, Tuo Zhao
cs.AI
papers.abstract
Spekulatives Dekodieren (SD) beschleunigt die Inferenz großer Sprachmodelle, indem ein kleiner Draft-Modell (Entwurfsmodell) Vorhersagen generiert, die anschließend von einem größeren Zielmodell verifiziert werden. Die Wirksamkeit von SD hängt von der Übereinstimmung zwischen diesen Modellen ab, die typischerweise durch Wissensdistillation (KD) verbessert wird. Herkömmliche KD-Methoden zielen jedoch darauf ab, die KL-Divergenz zwischen Draft- und Zielmodell über alle Tokens hinweg zu minimieren – ein Ziel, das nicht mit dem eigentlichen Ziel von SD übereinstimmt, nämlich die Token-Akzeptanzrate zu maximieren. Daher haben Draft-Modelle oft Schwierigkeiten, das Wissen des Zielmodells aufgrund von Kapazitätsbeschränkungen vollständig zu assimilieren, was zu suboptimaler Leistung führt. Um diese Herausforderung zu bewältigen, schlagen wir AdaSPEC vor, eine neuartige Methode, die selektive Token-Filterung in den KD-Prozess integriert. AdaSPEC nutzt ein Referenzmodell, um schwer zu approximierende Tokens zu identifizieren und auszufiltern. Dies ermöglicht die Distillation eines Draft-Modells, das bei einfacheren Tokens besser mit dem Zielmodell übereinstimmt. Dieser Ansatz verbessert die gesamte Token-Akzeptanzrate, ohne die Generierungsqualität zu beeinträchtigen. Wir evaluieren AdaSPEC in verschiedenen Aufgaben, einschließlich arithmetischem Reasoning, Befolgung von Instruktionen, Code-Generierung und Zusammenfassung, mit Modellkonfigurationen von 31M/1,4B und 350M/2,7B Parametern. Unsere Ergebnisse zeigen, dass AdaSPEC durchweg die state-of-the-art DistillSpec-Methode übertrifft und in allen Aufgaben höhere Akzeptanzraten (bis zu 15 %) erzielt. Der Code ist öffentlich verfügbar unter https://github.com/yuezhouhu/adaspec.
English
Speculative Decoding (SD) accelerates large language model inference by
employing a small draft model to generate predictions, which are then verified
by a larger target model. The effectiveness of SD hinges on the alignment
between these models, which is typically enhanced by Knowledge Distillation
(KD). However, conventional KD methods aim to minimize the KL divergence
between the draft and target models across all tokens, a goal that is
misaligned with the true objective of SD, which is to maximize token acceptance
rate. Therefore, draft models often struggle to fully assimilate the target
model's knowledge due to capacity constraints, leading to suboptimal
performance. To address this challenge, we propose AdaSPEC, a novel method that
incorporates selective token filtering into the KD process. AdaSPEC utilizes a
reference model to identify and filter out difficult-to-fit tokens, enabling
the distillation of a draft model that better aligns with the target model on
simpler tokens. This approach improves the overall token acceptance rate
without compromising generation quality. We evaluate AdaSPEC across diverse
tasks, including arithmetic reasoning, instruction-following, coding, and
summarization, using model configurations of 31M/1.4B and 350M/2.7B parameters.
Our results demonstrate that AdaSPEC consistently outperforms the
state-of-the-art DistillSpec method, achieving higher acceptance rates across
all tasks (up to 15\%). The code is publicly available at
https://github.com/yuezhouhu/adaspec.