Загрузка видео...

Не удалось загрузить видео

На главную

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

34,322 просмотров • 1 день назад •via X (Twitter)

Комментарии: 24

Фото профиля Mihir Kolakaluri
Mihir Kolakaluri1 день назад

decode going from 22 to 60 tok/s is the difference between waiting on it and not even noticing it so i am curious if the gap stays this big on a bigger model like an 8b

Фото профиля Sven Meyer
Sven Meyer1 день назад

How does it compare to Strata ? 🤔

Фото профиля Hussain Hashim | Building SundayBack
Hussain Hashim | Building SundayBack1 день назад

@akshay_pachaar interesting result! curious how memory usage compared during those tests. I found that sometimes optimizing for speed can cause unexpected memory spikes.

Фото профиля Mohammadjavad (Javad) Maheronnaghsh
Mohammadjavad (Javad) Maheronnaghsh1 день назад

the future is local llm

Фото профиля SiEdge
SiEdge1 день назад

Tuning kernels on each machine instead of shipping one compromise build is a smart way to speed up local agents.

Фото профиля Lightchain AI
Lightchain AI1 день назад

did you notice any quality drop or is it the same output just faster?

Фото профиля Dusan 🐧 AI agents · dad
Dusan 🐧 AI agents · dad1 день назад

16 gb is tight for a model plus a long prompt. a light linux desktop idles at a few hundred mb, so nearly all of it goes to the model and the context 🐧

Фото профиля Ran Aroussi
Ran Aroussi1 день назад

60 tok/s from a 4B model on a base laptop changes the maths. Most of what an agent does all day is routine tool calls, not frontier reasoning. How much of that work could a small fine-tuned model you own handle before you ever need a paid API?

Фото профиля Saroj
Saroj1 день назад

Context from Magnitude's own benchmarks: averaged across models on an M4 Pro, it's 1.32x faster prefill and 2.19x faster decode than Ollama (MLX). So 2.7x is a strong single-model result; about 2x is the fairer number to expect. One-time tuning on download takes up to a minute.

Фото профиля Techboy | AI & Tech
Techboy | AI & Tech1 день назад

tuning kernels on your own chip at download is the clever part. the catch is it's one 4b model at 4-bit on a base m5, bigger models are the real test

Фото профиля Radik Zagirov
Radik Zagirov1 день назад

Side effect of per-chip autotuning worth knowing: different kernel configs change the floating-point reduction order, so logits differ slightly by machine. Under greedy decoding a near-tie flips one token and the rest diverges. Same eval, two Macs, possibly different transcripts.

Фото профиля Day
Day1 день назад

props for giving ollama its mtp build too. a 2.7x win over a handicapped baseline wouldn't mean much

Фото профиля Looply
Looply1 день назад

half the time per call, and an agent loop makes hundreds of calls

Фото профиля Oleg
Oleg1 день назад

how much of the 2.7x decode is the drafter, not the kernels?

Фото профиля Sikandar
Sikandar1 день назад

the end-to-end number is the useful one here. i'd love the same comparison on a small repo bugfix: read files, edit, run tests. that's the wait a solo builder actually feels.

Фото профиля Kalin | AI bills & gotchas
Kalin | AI bills & gotchas1 день назад

2.7x on a 4B, does it hold at 30B?

Фото профиля sir we are secular
sir we are secular1 день назад

decode 22.6 to 60 is the real story, prefill only moved 1.6x. curious how much comes from the drafter pairing vs the kernel tuning. if it's mostly the drafter, ollama can close a lot of that gap without per-machine compiles

Фото профиля Akash Hadagali
Akash Hadagali1 день назад

Running Ollama's MTP build so both sides had speculative decoding makes this a fairer comparison than most local speed charts.

Фото профиля John Rood
John Rood1 день назад

the 2.7x is per stream. put four agents on that same box and what decides whether it is usable is the memory bandwidth they all share, and tuning adds efficiency, not bandwidth. does the tuned kernel hold up with four different prefixes in flight?

Фото профиля austin
austin1 день назад

prefill going from 464 to 755 tok/s is the number that matters for agents, every tool output gets chewed through before the first token shows up. does the kernel tuning run once per model on download, and how long does it take on a base m5?

Фото профиля Diego Viteri
Diego Viteri1 день назад

kernels compiled for your exact chip. gentoo won

Фото профиля Kalyan
Kalyan1 день назад

Saving this - I'm on an 8 GB MacBook Air and slow local runs are why I almost bought a GPU for my agent setup. Does the speedup hold on 8 GB, or does a 4B model at 4-bit still swap?

Фото профиля Miloš van DotNET ✡︎
Miloš van DotNET ✡︎1 день назад

What's the draft acceptance rate on each side? With both running speculative decoding, a 2.7x gap usually lives in how often the draft tokens get accepted, not in raw kernel speed.

Фото профиля Buffer
Buffer1 день назад

decode going 22.6 to 60 tok/s on a base M5 is the wild part, prefill only got 1.6x. does it redo the local kernel tuning every time you pull a new model, and how long is that first compile?

Похожие видео

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

123,278 просмотров • 2 дней назад

UC Berkeley just open-sourced FreeToken. (2–4x faster local LLM inference than Ollama) the results are wild: - Qwen3.6-35B on an 8GB GPU at 39.3 tokens/s - DeepSeek-V4-Flash 284B on a 32GB GPU at 22 tokens/s - GLM-5.2 753B on a 96GB GPU at 14.9 tokens/s a 35B model at 16-bit precision needs about 70GB just for its weights. even at 4 bits it is close to 18GB, and FreeToken serves it on an 8GB GPU. let me explain how: all three models mentioned above are Mixture-of-Experts, and that is what FreeToken takes advantage of. each layer holds hundreds of separate experts plus a small router that picks a few of them per token. Qwen3.6-35B activates roughly 3B of its 35B parameters per token. DeepSeek-V4-Flash picks 6 of 256 experts per layer, so 13B of its 284B run at a time. so compute was never the bottleneck. the weights a single step touches fit comfortably on a consumer GPU. every expert the router might pick still has to exist somewhere. they sit in system RAM, and the GPU keeps a cache of the ones the model has been using recently. so everything comes down to what happens when the router picks an expert that is not on the GPU. there are two ways to serve that miss: 1. copy it over PCIe and run it on the GPU 2. run it on the CPU, where it already lives both read from the same system memory, so they compete for one pool of bandwidth instead of adding to each other. existing engines pick one option and freeze it when the model loads. but routing changes on every token, so a fixed choice misses most of what the model asks for. FreeToken measures both bandwidths on your machine and splits each step's misses between the two paths in proportion. the GPU and CPU results then merge exactly, with no approximation. two machines with the same GPU can end up wanting opposite strategies, which I did not expect. a 5090 in a gaming desktop should push nearly everything over PCIe, while an 8GB laptop is better off computing most misses on the CPU. none of that is readable off a spec sheet, so the engine profiles it once per machine. the second half of the design is about agents. coding agents constantly rewrite their own history, and every edit normally forces thousands of tokens back through prefill. FreeToken saves its checkpoints at the exact boundaries agent frameworks cut on, so it only reprocesses the new part. its slowest first token stays under 44 seconds, while llama.cpp peaks at 232 and KTransformers at 946. it serves the OpenAI and Anthropic APIs under Apache 2.0, so Claude Code and Codex can point at it directly. releasing weights publicly decides who can download a model, not who can afford to run one. frontier open models keep shipping, and running them still assumes a rented cluster. meanwhile there are over a hundred million consumer machines with discrete GPUs sitting mostly idle. closing that gap was never a hardware problem, and work like this is what turns open weights into something you can actually use. paper: repo: almost every idea in this post, from why memory bandwidth decides the outcome to why moving weights costs more than computing on them, comes straight out of how a GPU is built. I wrote a detailed primer on that. the article is quoted below.

Akshay 🚀

345,385 просмотров • 2 месяцев назад

run agent harnesses 100% private & offline. (no token costs, no API keys, 100% open-source) your agent runs locally. the model doesn't. every prompt, every file, and every secret still leaves your machine before the agent does anything with it. Magnitude fixes that. it's an open source inference server that runs models on your own hardware and plugs into the coding agent you already use. setup is one command. it profiles your machine, measures the memory bandwidth that sets your token rate, and hands back complete configurations instead of a list of models. each one names a model, a compression level, a context size, and a speed range you can expect. pick one and start working. it doesn't replace your harness. setup asks which one you want and writes that config for you. Pi, OpenCode, Claude Code, Codex, and Cline all work, and there's a built-in one tuned for local models if you don't have a harness yet. that one uses your shell, edits files, and runs scripts out of the box. add skills and it handles Excel, PowerPoint, PDFs, or Chrome. everyday work it covers: → analyze sensitive data → manage private notes → review code and logs → search and organize files → build docs or slides Apache 2.0. no rate limits, and nothing leaves the machine. 𝗻𝗽𝗺 𝗶 -𝗴 @𝗺𝗮𝗴𝗻𝗶𝘁𝘂𝗱𝗲𝗱𝗲𝘃/𝗰𝗹𝗶 the repo is here: (don't forget to star 🌟) i wrote the full breakdown of why picking the configuration is the hard part. the article is quoted below.

Akshay 🚀

56,499 просмотров • 1 месяц назад

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 просмотров • 5 месяцев назад

GLM-5.3-Flash on two DGX Sparks built this voxel sky kingdom in 71.1 min, on Mia's recipe and the TensorFold Python engine. Mia's recipe at commit 3fd60dfc: EXL3 4 bpw quant, one model split across both Sparks (TP2), DFlash2 draft model, 8 slots (her recipe allows up to 8; the default on two Sparks is 4). Agent: OpenCode 1.19.3. One prompt, one try, no help. Thinking on, sampling from the model card: temperature 1.0, top_p 0.95. Voxel world: done in 71.1 min Tokens written: 109,305 Browser check: 9/10 Decode, code: 51.2 tok/s (separate speed run, thinking off) Decode, prose: 48.6 tok/s 500 words: about 14.0 s Eight requests at once: 99.2 tok/s in total Context: 1,048,576 tokens, the recipe's setting Aetherfall: floating isles over a cloud sea with a sky whale and its calf, a waterfall, a windmill, a castle, a shrine, airships and its own camera tour. Open: parts of the world are cut off hard at the edges, most likely a bug in the generated code. Answer limit in the build test: 65,536 tokens, the figure names for its Terminal-Bench runs. Its model card names up to 163,840 for another test. The longest answer was 54,782 tokens, so none was cut. Before this I ran the same task on Mia's Zig-engine branch, which her docs call work in progress: Decode, code: 26.6 tok/s Decode, prose: 25.5 tok/s Voxel world: done in 98.8 min Browser check: 8.0/10 The Python engine is the one her main recipe runs. Play the world in your browser. Every number, the exact command and the raw output: Recipe and quant by Mia. TensorFold engine by Ash Hart. GLM-5.3-Flash by Z.ai. DFlash2 draft by Inco AI.

Niklas

16,730 просмотров • 5 дней назад

WHAT IS AN AI "SOFTWARE FACTORY" AND IS IT HYPE (31 MINUTE BREAKDOWN) I think it's a silly name for a genuinely USEFUL idea! A software factory is 5-6 markdown files that sit next to your code and tell your agents how you like to work, so you can build high quality apps 24/7. It's going viral because AI coding has a trust problem. The model can build the feature, but with no structure around it you end up babysitting the agent, wondering what changed and hoping it didn't break something important. So you build with agents the same way a factory builds physical products! 1. Each feature gets its own station, which in software means its own branch, so multiple agents can work at the same time without stepping on each other. 2. The build station gives the agent rules for how to write the code, because "it works" is very different from "a developer could open this repo next month and understand what happened." 3. The proof station makes the agent show evidence. Screenshots, videos, speed numbers, before-and-after states. It has to prove the thing works instead of saying it works. 4. The review station runs the work through a code review agent, and if it doesn't clear the bar, it goes back through the line. 5. Then you show up at the end to merge. For a 100+ years people have run production this way, and it worked because the structure is good. The full episode on what’s a software factory is NOW live on The Startup Ideas Podcast (SIP) 🧃 with the wonderful Micky Watch: So is it hype?!? I don't think it is, because of what it does to your output! WITHOUT a factory, you build ONE feature at a time and you're the bottleneck at every step, prompting, checking the diff, testing it yourself, hoping nothing else broke (spoiler alert it often does). WITH a factory, EACH feature runs in its own isolated copy of the app, so you can have 10+ of them going at once, and each agent has to prove its own work and pass a code review before it ever reaches you. Instead of supervising the work, you're APPROVING finished work that already has evidence attached. REALLY interesting to see how work with agents is evolving to be….well, similar to working with people!

GREG ISENBERG

32,056 просмотров • 1 месяц назад

I had to test it myself to believe this unreal inference speed. 3,000 tokens/s for 1 user on standard datacenter GPUs. They leveraged a hidden efficiency gap in how GPUs generate tokens. Kog just achieved 3,000 tokens/s on 8× AMD MI300X GPUs and 2,100 on 8× NVIDIA H200 (FP16, no speculative decoding). Their tech preview is on a 2B model, and they show how their techniques will scale to large frontier MoE models at similar speeds. That's a huge number because normal low-batch GPU decoding for 2B to 8B models is usually closer to 100 to 300 tokens/s per request, so Kog is claiming something like a 10X to 30X jump in the speed one user actually feels. Their trick: they are getting the speed by treating LLM decoding as a memory streaming problem, not mainly a math problem. For 1 user at batch size 1, the GPU is not doing big, efficient matrix-matrix work like in training or large-batch serving; it is repeatedly pulling the model’s active weights from high-bandwidth memory for each new token, so speed depends on how smoothly those weights keep flowing. Normal inference stacks keep breaking that flow. They run many separate GPU programs for different parts of the model, move intermediate results through memory, wait at synchronization points, talk back to the CPU for scheduling or sampling, and then repeat this token after token. Kog’s answer is to co-design 3 things that are usually tuned separately: the runtime, the low-level GPU code, and the model architecture. The biggest engineering move is the monokernel, where the whole decode pass runs as 1 persistent GPU-resident program, including sampling, so the system does not keep stopping for kernel launches, CPU scheduling, and intermediate memory round trips. They also rebuilt synchronization, because their own measurements say grid sync was eating around 35% of token-generation time; instead of making every compute unit wait at a broad barrier, each unit waits only for the exact data it needs. On AMD MI300X, they also map memory access around the chiplet layout, because memory latency changes depending on which die makes the request. Then their Laneformer model uses Delayed Tensor Parallelism, which lets cross-GPU communication happen in the background instead of blocking every layer.

Rohan Paul

13,282 просмотров • 5 месяцев назад