Video wird geladen...

Video konnte nicht geladen werden

Zur Startseite

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...

25,804 Aufrufe โ€ข vor 2 Tagen โ€ขvia X (Twitter)

28 Kommentare

Profilbild von Akshay ๐Ÿš€
Akshay ๐Ÿš€vor 2 Tagen

Standard vs. Speculative vs. UZU decoding:

Profilbild von Giacomo Masseroni
Giacomo Masseronivor 2 Tagen

42s down to 11s is wild

Profilbild von anirudh | agent fleet
anirudh | agent fleetvor 2 Tagen

4x faster on a macbook means my agents can now be confidently wrong at 4x the speed, with no api bill left to blame

Profilbild von The SI Maximalist
The SI Maximalistvor 2 Tagen

Your MacBook just found another gear

Profilbild von Rohan
Rohanvor 2 Tagen

What acceptance rate did the draft get on that prompt?

Profilbild von The Broke Vibe Coder
The Broke Vibe Codervor 2 Tagen

Can you show: uzu without speculative decoding. uzu with DFlash alone. uzu with DFlash + Weaver. Your 4ร— result doesnโ€™t tell us how much acceleration Weaver itself contributes.

Profilbild von Dusan ๐Ÿง AI agents ยท dad
Dusan ๐Ÿง AI agents ยท dadvor 2 Tagen

On linux you pick the gpu, the driver and the engine, and can patch any of them when a new decoding trick lands. a macbook gives you what apple exposes ๐Ÿง

Profilbild von Natural Stupidity
Natural Stupidityvor 2 Tagen

now it can be wrong in 10 seconds instead of 42

Profilbild von Actian for Developers
Actian for Developersvor 2 Tagen

11s on a laptop is lil crazy, now the slow part of local RAG is going to be retrieval

Profilbild von Nodelog
Nodelogvor 2 Tagen

Speedup numbers like this depend a lot on draft acceptance rate, so log accepted tokens per step on your own prompts, not just wall time. Also compare against a batch size above 1, since the gain usually shrinks once the target model is compute-bound.

Profilbild von Yuzu
Yuzuvor 2 Tagen

massive breakthrough in speculative decoding, proven by timing how fast it generates a function that merges two sorted lists

Profilbild von Wecko AI
Wecko AIvor 2 Tagen

4x on a 9B is wild. Curious if it holds on a 27B, my Qwen3.8 27B sits at 37.4 tok/s on a Mac mini M5 Pro and that's the one I'd love to see doubled

Profilbild von Qwen AI Fans
Qwen AI Fansvor 2 Tagen

4x on a MacBook with better speculative decoding is a huge local win.

Profilbild von Tom Sheffield
Tom Sheffieldvor 2 Tagen

would like to see the 4x on a long multi-step run where the context keeps growing

Profilbild von theMadDeFientist
theMadDeFientistvor 2 Tagen

this is what makes local agents usable. a 9b that answers in 10s instead of 42 can sit inside a tool loop without you walking away

Profilbild von Josh Ramirez
Josh Ramirezvor 2 Tagen

7.5 tokens per pass is kinda absurd. really curious how that holds up at longer context, across a wide range of workflows. speculative decoding can have a wide performance range based on the task, wonder how weaver affects that aspect

Profilbild von Umar Farooq Aslam
Umar Farooq Aslamvor 2 Tagen

Batch size 1 is the best case for this. on a serving box at high batch the verify pass stops being free and most of the gain shrinks. curious where weaver crosses over.

Profilbild von Emly
Emlyvor 2 Tagen

This is an exciting development for local LLM performance.

Profilbild von Solar Nomad
Solar Nomadvor 2 Tagen

quick math from your numbers: 42s to 11s is 3.8x. 7.5 tokens per pass would give 7.5x if passes were free, so each tree-verify pass (drafter included) costs ~2x a plain decode step on the M5, if output length matched. still a great trade. what tokens/pass on a non-code prompt?

Profilbild von Yurii Bakurov
Yurii Bakurovvor 2 Tagen

4x on a 9B is wild. Does it hold on bigger models like 27B ? That's where local starts to feel slow on my M5 Max

Profilbild von akesar
akesarvor 2 Tagen

on the quality question, it shouldn't drop if it uses the usual check. the big model still looks at every guessed token and throws out any it wouldn't have picked itself, so you get the same answer it would give alone. only the speed changes

Profilbild von Deep
Deepvor 2 Tagen

watch your acceptance rate, the speedup follows it closely

Profilbild von Sean
Seanvor 2 Tagen

4x on a 9B model, locally on a laptop, is wild. And 2.6x over vanilla speculative decoding means it's more than just a better draft model. Curious how the speedup holds up on longer contexts.

Profilbild von AI Quanting
AI Quantingvor 2 Tagen

The gap between 30 and 11 seconds is all in the adapter. Does the tree hold up on longer prompts, or does the acceptance rate fall once the context grows?

Profilbild von Jatin Sharma
Jatin Sharmavor 2 Tagen

what did you use as the draft model? and does the 4x hold on long outputs or mostly on shorter answers?

Profilbild von The AI Engine Room
The AI Engine Roomvor 2 Tagen

The tree of continuations verified in one pass is what makes the 7.5 tokens per pass believable. Does the Weaver adapter add much memory overhead on the Mac next to the 9B model?

Profilbild von Hailu ๐Ÿ
Hailu ๐Ÿvor 2 Tagen

Vietnamese. This is an impressive technical breakthrough!

Profilbild von Mir Mujtaba
Mir Mujtabavor 2 Tagen

Does this work with 1bit,2bit models? Iโ€™m talking about Bonsai, Underdog, ISO ones

ร„hnliche Videos

Big win for local LLM inference! This new inference engine runs LLMs 4x faster than llama.cpp: I ran Qwen3.5 9B on a base M5 MacBook Pro with three engines: - llama.cpp: 22.0 tokens/s - MLX: 25.1 tokens/s - uzu: 92.1 tokens/s The video below shows all three runs side by side. The first two numbers don't mean llama.cpp or MLX are badly built. But both are sitting right under a hard limit of local decoding. When an LLM generates text, every new token needs one full pass through the model, and that pass reads all of the model's weights from memory. A base M5 reads memory at about 153 GB/s. A 4-bit 9B model weighs about 5.2 GB. So at one token per pass, the ceiling is roughly 153 รท 5.2 โ‰ˆ 29 tokens/s, however fast the GPU computes. uzu gets past that ceiling by producing several tokens per pass instead of one: โ†ณ A small drafter (DFlash) proposes candidates for the next 16 positions at once. โ†ณ A tiny adapter (Weaver, 56.7M params) picks among them left to right, so the guesses form coherent text, and keeps a few alternative branches as a tree. โ†ณ The 9B model checks the whole tree in a single pass and keeps the longest path it agrees with. The main model still decides every token that ends up in the output. GitHub repo: (don't forget to star it ๐ŸŒŸ) In my run, each pass of the 9B model produced 7.5 tokens on average. Ordinary decoding produces exactly 1. The weights and kernels are designed around this too. uzu ships its own 4-bit checkpoints, and on M5 chips it runs the verification step on the GPU's int8 matrix path. uzu is an open-source inference engine by Mirai Labs, written in Rust with Metal kernels. It has Swift, Python, TypeScript and Rust bindings, so the same engine runs inside a Mac or iOS app. I shared the GitHub repo above. If you want to dive deeper, my co-founder wrote a detailed breakdown of why local inference is memory-bound and how uzu's speculative decoding gets past it. Read it below.

Avi Chawla

125,660 Aufrufe โ€ข vor 6 Tagen

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

Big win for local LLM inference! This open-source engine generates tokens 2.7x faster than Ollama on a MacBook: I tested it on a base M5 MacBook Pro with Qwen3.5 4B at 4-bit and the same 9.2k-token prompt. Ollama ran its MTP build, so both had speculative decoding. - Prefill: Ollama 464 tok/s, Magnitude 755 tok/s (1.6x) - Decode: Ollama 22.6 tok/s, Magnitude 60.0 tok/s (2.7x) - End to end, Magnitude finished in half the time The video below shows both runs side by side. The Ollama numbers donโ€™t mean itโ€™s badly built. Its kernels were simply tuned in advance. A kernel is the small GPU program behind every matrix multiply and attention step. Its speed depends on choices like how work is split across GPU cores and how data moves through memory. The best choices change with every chip. Apple Silicon alone spans 8 to 80 GPU cores and under 70 to over 800 GB/s of bandwidth, and every model has its own layer sizes. A prebuilt engine has to pick one set of settings for all of them, so most local setups run on a compromise. Magnitude replaces that compromise with tuning on your machine: โ†ณ When you download a model, it compiles that modelโ€™s kernels locally. โ†ณ It tries different kernel configurations and keeps whichever runs fastest on your chip. โ†ณ It pairs each model with the fastest speculative decoding drafter it has found, so each pass of the model produces more than one token. GitHub repo: (donโ€™t forget to star it ๐ŸŒŸ) This matters most for agents. Every file and tool output has to be processed before the model writes anything, and that prefill step is where kernel efficiency shows up. Concurrent sessions also share prefix caches, so parallel agents donโ€™t slow each other down. Magnitude is an open-source (Apache 2.0) inference engine written in Rust. It plugs into Claude Code, Codex, OpenCode, Pi and other agents with one click. I shared the GitHub repo above.

Akshay ๐Ÿš€

36,167 Aufrufe โ€ข vor 4 Tagen