Aceleración de LLMs de Difusión mediante Decodificación Paralela Adaptativa
Accelerating Diffusion LLMs via Adaptive Parallel Decoding
May 31, 2025
Autores: Daniel Israel, Guy Van den Broeck, Aditya Grover
cs.AI
Resumen
La velocidad de generación de los LLM está limitada por el decodificado autoregresivo, donde los tokens se predicen secuencialmente uno por uno. Alternativamente, los modelos de lenguaje grande basados en difusión (dLLM) permiten teóricamente la generación paralela de tokens, pero en la práctica tienen dificultades para alcanzar la velocidad de los modelos autoregresivos sin sacrificar significativamente la calidad. Por ello, introducimos el decodificado paralelo adaptativo (APD), un método novedoso que ajusta dinámicamente el número de tokens muestreados en paralelo. Logramos esto definiendo una mezcla multiplicativa entre las probabilidades marginales del dLLM y la probabilidad conjunta de secuencias bajo un pequeño modelo autoregresivo auxiliar. Esto invierte la configuración estándar del decodificado especulativo, donde el objetivo es muestrear a partir de un verificador autoregresivo grande utilizando un modelo más pequeño como borrador. Además, optimizamos APD habilitando el almacenamiento en caché de KV y limitando el tamaño de la entrada enmascarada. En conjunto, nuestro método propone tres parámetros ajustables para intercambiar de manera flexible el rendimiento y la calidad. Demostramos que APD ofrece un rendimiento notablemente mayor con degradaciones mínimas de calidad en benchmarks posteriores.
English
The generation speed of LLMs are bottlenecked by autoregressive decoding,
where tokens are predicted sequentially one by one. Alternatively, diffusion
large language models (dLLMs) theoretically allow for parallel token
generation, but in practice struggle to achieve the speed of autoregressive
models without significantly sacrificing quality. We therefore introduce
adaptive parallel decoding (APD), a novel method that dynamically adjusts the
number of tokens sampled in parallel. We achieve this by defining a
multiplicative mixture between the dLLM marginal probabilities and the joint
probability of sequences under a small auxiliary autoregressive model. This
inverts the standard setup of speculative decoding, where the goal is to sample
from a large autoregressive verifier by drafting from a smaller model. We
further optimize APD by enabling KV caching and limiting the size of the masked
input. Altogether, our method puts forward three tunable parameters to flexibly
tradeoff throughput and quality. We show that APD provides markedly higher
throughput with minimal quality degradations on downstream benchmarks.