Video wird geladen...

Video konnte nicht geladen werden

Zur Startseite

Need faster LLM inference without sacrificing accuracy? Speculative decoding can help. Choosing the right draft length and drafting method depends on your model, workload and hardware. We break down five practical guidelines for balancing throughput and latency.

35,445 Aufrufe • vor 1 Monat •via X (Twitter)

0 Kommentare

Keine Kommentare verfügbar

Kommentare vom Original-Post werden hier angezeigt

Ähnliche Videos

Researchers found a way to make LLMs 8.5x faster! (without compromising accuracy) Speculative decoding is quite an effective way to address the single-token bottleneck in traditional LLM inference. A small "draft" model first generates the next several tokens, then the large model verifies all of them at once in a single forward pass. If a token at any position is wrong, you keep everything before it and restart from there. This never does worse than normal decoding. But current drafters in Speculative decoding still guess one token at a time. That makes the drafting step itself a bottleneck, capping real-world speedups at 2-3x. DFlash is a new technique that swaps the autoregressive drafter with a lightweight block diffusion model that guesses all tokens in one parallel shot. Drafting cost stays flat no matter how many tokens you speculate. On top of that, the drafter is conditioned on hidden features pulled from multiple layers of the target model and injected into every draft layer, so it makes significantly better guesses than a drafter working from scratch. In the side-by-side demo below, vanilla decoding runs at 48.5 tokens/sec. DFlash hits 415 tokens/sec on the same model, with zero quality loss. It's already integrated with vLLM, SGLang, and Transformers, with draft models on HuggingFace for several models like Qwen3, Qwen3.5, Llama 3.1, Kimi-K2.5, gpt-oss, and many more. I have shared the GitHub repo in the replies! KV caching is another must-know technique to boost LLM inference. I recently wrote an article about it. Read it below. 👉 Over to you: What use case are you working on that can benefit from this new technique?

Avi Chawla

158,352 Aufrufe • vor 5 Monaten

Massive breakthrough in speculative decoding! It made a 9B LLM on my MacBook 4x faster, and 2.6x faster than regular speculative decoding. I ran Qwen3.5 9B on my M5 MacBook Pro with the same prompt, three ways: - No speculative decoding: done in 42s - Regular speculative decoding: done in 30s - DFlash + Weaver: done in 11s The video below shows all three side by side. Here's why it works: Speculative decoding lets a cheap drafter guess the next few tokens, and the main model checks them all in one pass. The fastest drafters, like DFlash, guess every position in parallel. But each guess is made on its own, so position 5 never sees what was picked at position 4. One early mismatch and everything after it gets thrown away. Weaver fixes this. It's a tiny adapter (one Transformer layer) on top of DFlash that: ↳ picks among DFlash's top candidates left to right, so each pick depends on the last ↳ grows a tree of likely continuations instead of a single chain ↳ lets the main model verify the whole tree in one pass On my Mac, every pass of the model produced 7.5 tokens instead of 1. On a B200 GPU, the paper reports 4x faster decoding across chat, math and code. Mirai Labs open-sourced the whole stack in their engine, uzu, built for Apple Silicon. GitHub repo: (don't forget to star it 🌟) Trying it takes two commands: 𝗯𝗿𝗲𝘄 𝗶𝗻𝘀𝘁𝗮𝗹𝗹 𝗺𝗶𝗿𝗮𝗶 𝗺𝗶𝗿𝗮𝗶 --𝗺𝗼𝗱𝗲𝗹 𝘁𝗿𝘆𝗺𝗶𝗿𝗮𝗶/𝗤𝘄𝗲𝗻𝟯.𝟱-𝟵𝗕-𝗠 -𝗺 "𝗪𝗿𝗶𝘁𝗲 𝗮 𝗽𝘆𝘁𝗵𝗼𝗻 𝗳𝘂𝗻𝗰𝘁𝗶𝗼𝗻 𝘁𝗼 𝗺𝗲𝗿𝗴𝗲 𝘁𝘄𝗼 𝘀𝗼𝗿𝘁𝗲𝗱 𝗹𝗶𝘀𝘁𝘀" --- I wrote a full breakdown of why local inference is memory-bound and how uzu gets past it, with reproducible code. The article is quoted below. In the replies, there's an illustration of standard vs. speculative vs. uzu decoding.

Akshay 🚀

26,337 Aufrufe • vor 3 Tagen