Trees from Marginals: Autoregressive drafting with factorized priors
Summary
Weaver is a lightweight autoregressive adapter designed to enhance speculative decoding for autoregressive language models. It addresses the limitation of factorized draft models, which, despite their efficiency in predicting future-token marginals in parallel, suffer from sharply degrading acceptance rates due to their independence assumption as the speculative budget increases. Weaver constructs proposal trees from the top-K marginals of a factorized drafter, thereby restoring conditional dependencies between proposed tokens without requiring a full-vocabulary projection. The system also introduces a rollback-free tree-verification algorithm and optimized CUDA kernels implemented in SGLang to support fast verification for models with Gated Delta Net layers. This combined approach achieves a 4.37-fold speedup over standard autoregressive decoding and outperforms the DFlash baseline by 24.7%.
Key takeaway
For Machine Learning Engineers optimizing autoregressive language model inference, adopting Weaver could significantly boost your system's throughput. Its ability to restore conditional dependencies in factorized draft models, combined with a rollback-free tree-verification algorithm and SGLang CUDA kernels, offers a substantial 4.37-fold speedup over traditional autoregressive decoding. Consider integrating Weaver to improve the interactivity and efficiency of your large language model applications, especially when using Gated Delta Net layers.
Key insights
Weaver improves speculative decoding by restoring conditional dependencies in factorized draft models, boosting acceptance rates.
Principles
- Factorized draft models are efficient but their independence assumption degrades speculative decoding acceptance rates.
- Restoring conditional dependencies between proposed tokens is crucial for effective speculative decoding.
Method
Weaver constructs proposal trees from top-K marginals of a factorized drafter, then uses a rollback-free tree-verification algorithm with optimized CUDA kernels for fast verification.
In practice
- Implement optimized CUDA kernels in SGLang for fast tree verification.
- Utilize Weaver to restore conditional dependencies in factorized draft models.
Topics
- Speculative Decoding
- Autoregressive Models
- Language Models
- Factorized Draft Models
- Weaver
- SGLang
- CUDA Kernels
Best for: AI Engineer, Research Scientist, AI Scientist, Machine Learning Engineer, NLP Engineer
Related on AIssential
Editorial summary, takeaway, and curation by AIssential. Original article published by Machine Learning.