The newest entry in the local inference world comes from a strange place. Magnitude, a YC S25 team out of London, did not start by building an inference engine. They built a browser agent, shipped it open source, watched it pass 4,000 GitHub stars and 100,000 downloads, and then hit a wall. They wanted to run that agent against local models. No existing engine worked.

That is the whole story, and it is the most useful thing about Magnitude. Every performance number the team published comes from a specific failure they ran into, not from a benchmark suite. The launch post hit 194 points and 97 comments on Hacker News in late September.

What per-device kernel tuning actually means

Inference engines fall into three camps, and the team argues each one loses something. Datacenter engines like vLLM and SGLang are built for batched throughput. They win when hundreds of users hit the same server, and they give up single-session latency doing it. General purpose engines like llama.cpp and Ollama chase compatibility across every GPU ever made. They ship fixed builds tuned for a reference device and hope your device is close enough. Hardware-specific engines like oMLX and ds4 hit high ceilings on their one target and lack the completeness to run a real agent workload end to end.

Magnitude takes a fourth path. Its kernels are written with flexible parameters, and an autotuner runs on your actual machine before the model serves its first token. The compiler picks tile sizes, workgroup shapes, and fusion choices based on the real memory bandwidth and compute throughput it measures locally, not on a table of numbers baked into a release.

This matters because inference is memory bound far more often than it is compute bound. Attention and feed-forward layers stream weights from HBM or GDDR and spend most of their time waiting. A kernel that reduces bytes moved or improves access locality beats one with more arithmetic throughput. Those gains depend on the specific part, its memory bus width, its cache hierarchy, and the driver underneath. A build tuned on a datacenter H100 transfers badly to a Mac M4 Pro, because the shape of the memory system is different.

The team credits FlashAttention, FlashInfer, TurboQuant, and SGLang's radix attention as prior art. What they added is the autotuning layer plus a Rust GPU kernel runtime that does the measuring at install time.

There is a real cost here. Autotuning takes time on first run, and the win only lands if you keep the machine. That makes it a natural fit for a desktop install and a poor fit for a container that spins up cold.

The Metal versus CUDA numbers

Benchmarks ran against llama.cpp on Qwen 3.6 35B A3B at 4-bit quantization with 64k context and speculative decoding turned off.

On a Mac M4 Pro with 48 GB of memory:

  • Decode: 30 tok/s to 57 tok/s. 92% faster.
  • Prefill: 466 tok/s to 507 tok/s. 9% faster.
  • Per-agent memory: 28% lower.

On a DGX Spark over CUDA:

  • Decode: 49 tok/s to 58 tok/s. 19% faster.
  • Prefill: 2,033 tok/s to 2,507 tok/s. 23% faster.
  • Per-agent memory: 27% lower.

Read these two blocks together and the story sharpens. The Metal gap is enormous, the CUDA gap is respectable. Both are single-stream decode comparisons, which is exactly the case where per-device tuning has the most room. A fixed build that was tuned against some other card is leaving a lot of the Metal machine's bandwidth unused, and the DGX Spark comparison is closer because that class of hardware looks more like the reference device the baseline was built for.

The honest read is that the Metal number proves the technique works and the CUDA number is the one you should plan your own budget around. Your hardware is closer to a consumer GPU than a Mac, so assume something between the two and verify with your own model before you commit.

Memory per agent is the real constraint

For an agent workload, memory pressure is worse than latency. An agent run holds a long context plus tool outputs plus a KV cache that grows with every turn. And you usually have several of those going while you still want to use the computer.

Magnitude reserves only enough memory up front to hold the model weights. As sessions grow, the heap expands dynamically, and it releases memory when agents exit. Combined with the per-agent savings above, that changes how many concurrent sessions fit on a given card. A 48 GB machine that ran three agent sessions might now run four, with headroom left for a browser and a video call.

Prefix cache sharing across sessions

The most consequential feature for multi-agent work is hybrid paged attention. SGLang showed that concurrent sessions can share a prefix cache, and every agent session with the same system prompt and the same tool definitions shares a long common prefix. Pay for that prefix once, not once per session.

The tension is that paged attention in datacenter engines trades single-session speed for sharing. Magnitude keeps the sharing but places blocks for memory adjacency, so a single session still reads its KV cache contiguously. Same idea, different placement rule.

For anyone running a fleet of local agents this is where the compounding shows up. Ten agents that share a 4,000-token system prompt do not need ten copies of it. That is not a throughput win, it is a memory win that buys more sessions on the same hardware.

What this does to local agent cost

Local inference has a cost curve and this move bends it in three ways. Faster decode means less hardware for the same work. More sessions per card means one machine covers a whole agent workload instead of a single chat. Memory headroom means you can keep the model resident instead of reloading it, which removes the cold-start penalty from every session.

Taken together, the case for local agents gets stronger at exactly the moment it was weakest. A 92% decode win on Metal and 27 to 28 percent memory savings per agent are not demo numbers, they are the difference between a local agent that feels sluggish and one that feels present.

The team is open source under Apache 2.0, ships a desktop app, and connects to existing agents including Pi, OpenCode, Hermes, and Codex. Models load on demand and shut down after inactivity. Their roadmap adds expert streaming from RAM or disk to run models larger than GPU memory, a fuller kernel compiler that chooses fusions automatically, and multi-device layout solving across CPU, GPU, RAM, and disk.

What to do this week

Brian, here is the concrete version.

  1. Measure your own baseline first. Run your actual model at your actual context length through llama.cpp and record decode tok/s, prefill tok/s, and peak memory. Vendor numbers tell you nothing about your card.
  2. Clone github.com/magnitudedev/magnitude and run its autotuner on your machine. The tuning step is the whole point. Skip it and you run the same fixed build the method was meant to replace.
  3. Benchmark with a MoE model at 4-bit and a 64k context if your workload allows. That is the configuration the published numbers used and the one most agent systems run in.
  4. Count your concurrent sessions and multiply by measured per-agent memory. If the tuned numbers hold for you, you may fit more agents on existing hardware than you budgeted for.
  5. Re-evaluate the API cost line. Faster decode and lower memory change how many local agent hours a single machine covers per day.
  6. Watch the three roadmap items. Expert streaming and multi-device layout would change your hardware requirements, so they change your buying decisions.

The general lesson outlives the product. Stop treating the inference engine as software you download. Treat it as a compile step against the machine in front of you. The teams that do this per device will keep the hardware advantage, and the ones shipping fixed builds will keep paying for it.

Source: Launch HN for Magnitude (YC S25), posted September 30, 2026, by anerli, 194 points and 97 comments, at https://news.ycombinator.com/item?id=49911995. Repository at https://github.com/magnitudedev/magnitude. Numbers in this post come from the launch post and its linked demo video. I did not run these benchmarks myself.