frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

Open in hackernews

Launch HN: Magnitude (YC S25) – Self-optimizing inference engine for agents

https://github.com/magnitudedev/magnitude
36•anerli•48m ago
Hey HN, Anders and Tom here. We're building Magnitude, an inference engine for agents that optimizes itself to run as fast as possible on your hardware. It works on Mac, Linux, and Windows on any hardware and is up to 2x faster than llama.cpp.

We're both software engineers and previously built an open source browser agent to 4k+ GH stars and 100k+ downloads. We increasingly wanted to run it on local models, but found that no inference engine worked for our use case.

Inference engines today all make a performance tradeoff. They are either:

- Built for batched inference on datacenter hardware at the cost of single-session performance (vLLM, SGLang) - Designed for broad compatibility instead of optimizing for specific hardware (llama.cpp, Ollama) - Specialized for specific hardware or models but lacking engine completeness (oMLX, ds4)

Plus none of them are designed for running agents locally. Sessions are long, several often run at once, and you still want to use your computer for other things.

Magnitude is built for maximum performance on your hardware and running local agents:

- On-device compilation and tuning: Kernels are written with flexible parameters that are tuned on your actual device before the model runs. This gives you broad hardware compatibility with the same performance ceiling as hardware-specific kernels. - Focus on best architectures: We write our tunable, highly efficient kernels for the most popular open-weights families. This allows us to achieve and surpass the performance of hardware or model specialized engines, without forcing ourselves to over-generalize at the cost of performance. - Dynamic memory allocation: Magnitude reserves only enough memory up front to hold model weights. As your agent sessions grow, the memory heap dynamically increases, and frees itself when agents stop. Your hardware can still be used for other stuff while agents run. - Hybrid paged attention: We borrow the best ideas from engines like SGLang to allow concurrent sessions to share prefix caches, but optimize placement for memory-adjacency so single-session performance doesn't suffer.

Magnitude is fully open source (Apache 2.0). We built it in Rust, including a custom GPU kernel runtime and autotuner. We take inspiration from the best innovations in inference from academics (e.g. FlashAttention, FlashInfer, TurboQuant) as well as other engines (e.g. SGLang radix attention) to reach the performance ceiling.

Benchmarked against llama.cpp with Qwen 3.6 35B A3B (4 bit), 64k context, no speculative decoding:

Metal (Mac M4 Pro 48 GB) - 92% faster decode (30 tok/s → 57 tok/s) - 9% faster prefill (466 tok/s → 507 tok/s) - 28% less per-agent memory usage

CUDA (DGX Spark) - 19% faster decode (49 tok/s → 58 tok/s) - 23% faster prefill (2,033 tok/s → 2,507 tok/s) - 27% less per-agent memory usage

Magnitude ships as a desktop app that you can easily connect with whatever agents you already use (Pi, OpenCode, Hermes, Codex, and more). It automatically runs models on demand when these agents actually need them, and shuts them down after inactivity. Here's what it looks like: https://www.youtube.com/watch?v=0qE8BWEZu7o

We're excited to push Magnitude further to let you run bigger models on the same hardware while continuing to improve performance. Our plans include:

- Expert streaming: store experts on RAM or disk and load them just-in-time. This lets you run models bigger than what otherwise would fit on your GPU. - Kernel compiler: our current kernels tune a few parameters to fit your hardware. We can take this further with a fully custom compiler that automatically chooses how to fuse kernels and which implementations to use, to make it fit to your hardware even better. - Multi-device utilization: Make the best possible use of all hardware on a system (CPU, GPUs, RAM, disk) by detecting these and automatically solving for the best model layout.

We'd love for more people to try it out and give us feedback. Feel free to comment here, we'll be around all day!

Comments

p-e-w•42m ago
What is the business model?
anerli•19m ago
We envision a future where workloads are hybrid. Average consumer hardware will be able to handle a lot with local models, but you’ll still want to use cloud models for harder tasks. Magnitude will make it seamless to switch between the two, even for the same tasks (without breaking your prefix cache). We’ll charge per token for our inference cloud, using the same efficiencies we unlock for local inference to pass the savings on to you.
amirhesham•35m ago
Oh this is so cool. Curious about the business model, too.
nateb2022•34m ago
Any source on the benchmarks/methodology besides the image? There's a ton of variance possible in llama.cpp's performance depending on how it was configured. I'd also like to see benchmarks against MLX.
anerli•7m ago
The benchmark we cited here is a simple prose-repetition task. We put the content of Moby Dick up to 64k context in the request, and then ask it to repeat the last section.

For llama.cpp, we try to make the comparison as fair as possible by using similar settings. No speculative decoding, default prefill batch sizes, flash attention on.

We tried also quantizing the KV cache to 8-bit keys and 4-bit values like we do in Magnitude, but this bombed decode speed for llama.cpp in our testing. Since it seems llama.cpp did not optimize that path, we used 16-bit KV instead.

The source for the benchmark is available here also: https://github.com/magnitudedev/magnitude/tree/main/inferenc...

anerli•5m ago
Compared to MLX - we've done some rough benchmarking and we are outperforming any of the MLX-based engines we've compared to so far. Going to do more in depth benchmarking and release it soon.
sgtwompwomp•34m ago
This is dope, is this kind of like Wafer.ai but for local models? As in a coding agent optimizes the kernels so the local model runs continuously better? Cause that is compelling if so. If it’s more simple that’s cool too
kenzic•31m ago
How long does tuning take (on an M3 MacBook Pro for example)?
anerli•16m ago
Tuning is a one-time process that takes around ~1 minute whenever you download a new model. This is generally enough time to tune all the kernels' parameters to the point where tuning any longer asymptotes. Time can vary a little based on the hardware though.
kenzic•6m ago
Wow, that's impressive.
yolandac•27m ago
does it allow us to run larger models that weren't possible before?
kmike84•19m ago
This seems to be a good idea. However, beating llama.cpp on speed is a low bar :)

I found it to be a good baseline, but at least on Mac there was always something way faster, and/or with better memory requirements - like you said, ds4, omlx, mtplx, etc. It seems if you use local LLMs for real, there is very little reason not to use one of the more optimized engines.

3 main failure modes I observed in the engines:

* Not using best available spec decoding

* Using too much VRAM for KV cache (e.g. KV cache used to take almost nothing in ds4, but huge amount of VRAM on unsloth/llama.cpp for deepseek models)

* Degraded performance at large context sizes - benchmarks at 4K or 32K are awesome, but at realistic 100-200K it's slower than some stupid baseline

lxe•13m ago
On my local inference box I have a perpetual codex thread open in my llama.cpp checkout that I periodically ask to take a look at currently pending llama.cpp PRs, do some research on latest MTP, Dflash and other prediction or attention optimizations, do research on the latest model quants and finetunes, take a look at localLlama Reddit threads and just do essentially a sweep of the frontier.

Then it rebuilds latest llama.cpp, grabs the PRs it finds relevant to test against, and then it performs a benchmark and finalizes the upgrade and verifies what model, variant, or even a separate finetune that we should be running.

Occasionally, it performs its own optimizations and commits, which then gets superseded by pull requests and merged code that essentially validates the model's own optimization directionality.

msdz•11m ago
Congratulations on the launch, it looks like an impressive product and tool!

Q: From my (very, very limited!) understanding, I was under the impression that part of the “inference engine inertia” is model- or at least architecture-specific code for most, if not each new open-weight model coming out. Assuming I got that right, do you support, or plan on supporting, everything vLLM/llama.cpp do, such that Magnitude becomes a drop-in replacement for as many (economically/pareto-viable) models as possible, or do you want to focus on the best possible support for only a select few models/classes of models?

Perfect-Blue.nvim

https://github.com/wu-json/perfect-blue.nvim
1•whiteblossom•36s ago•0 comments

Show HN: National Design Studio

https://ndstudio.gov/
1•novateg•40s ago•0 comments

Infinite Mac now includes BeOS

https://infinitemac.org/?filter=beos
1•tambourine_man•1m ago•0 comments

Reddit is killing RSS feeds and ending public API access because of AI bots

https://techcrunch.com/2026/09/30/reddit-is-killing-rss-feeds-ending-public-api-access-because-of...
2•speckx•3m ago•0 comments

Jevstiller: Open-source tool distills Jev so you can run it locally

https://www.theregister.com/ai-and-ml/2026/09/29/open-source-tool-distills-jev-so-you-can-run-it-...
1•pogue•3m ago•0 comments

Low Poly Earth: A stylized low-poly Google Earth

https://play.lowpolyearth.online/
2•blueblazin•4m ago•1 comments

Immersive Cosmology

https://johnhoffman.io/posts/inside-the-cosmic-web
1•astro1234•5m ago•1 comments

Time-lapse: spider egg sac, 2012 [video]

https://www.youtube.com/watch?v=YMFmXwVsgbI
1•Eridanus2•6m ago•0 comments

A hacker's guide to bending the universe (2016)

https://aresluna.org/a-hackers-guide-to-bending-the-universe/
1•CharlesW•8m ago•0 comments

Pggo: Tiny, fast Postgres driver for agents

https://pggo.dev/
2•handfuloflight•8m ago•0 comments

5x faster Edge Functions: V8 isolates to Firecracker MicroVMs

https://www.netlify.com/blog/edge-functions-firecracker-microvms/
3•jbott•8m ago•0 comments

A year of databases: how I fell in love with programming again

https://dennypenta.github.io/mynameis/blog/year-databases-11
1•adletbalzhanov•10m ago•0 comments

Falcon Design

https://falcon.so/
2•handfuloflight•10m ago•0 comments

Show HN: Dbb1 radio – endless radio powered by Jev

https://radio.dbb1.dev/
1•dougbarrett•10m ago•0 comments

Fractional Is Just a Racket

1•artifix•11m ago•0 comments

Tesla patents 'Electric Fan Car' with 4 ducted fans ahead of Roadster reveal

https://electrek.co/2026/09/29/tesla-electric-fan-car-patent-model-s-roadster/
3•jethronethro•12m ago•2 comments

Book Review: Life and Death by Stephenie Meyer (2015)

https://booksatruestory.com/2015/10/20/book-review-life-death-stephenie-meyer/
1•Tomte•12m ago•0 comments

Museum of Time-Based Art

https://motba.art
1•NaOH•16m ago•0 comments

A glimpse into life inside a child prison in France

https://www.theguardian.com/global-development/2026/sep/28/i-sleep-with-all-my-clothes-on-to-prot...
2•rl3•18m ago•0 comments

Show HN: Make personalized cinematic videos in minutes

https://yume.video
1•dayaya•18m ago•0 comments

Another Look at Provable Security

https://www.math.uwaterloo.ca/~ajmeneze/anotherlook/
1•ibobev•18m ago•0 comments

The Elevator Receipt

https://www.distributedthoughts.org/2026-09-28-the-elevator-receipt/
1•speckx•19m ago•0 comments

Qt 6.12 LTS Released

https://www.qt.io/blog/qt-6.12-released
3•ibobev•19m ago•0 comments

DxTimingCaptureLibrary

https://devblogs.microsoft.com/directx/introducing-dxtimingcapturelibrary/
1•ibobev•19m ago•0 comments

Carnegie Mellon University Announces Historic $3B Gift from Ken Griffin

https://www.cmu.edu/news/stories/archives/2026/september/carnegie-mellon-university-announces-his...
2•Guyadou•20m ago•0 comments

Show HN: SideTap – an LLM drives a real iPhone from Windows, no Mac or jailbreak

https://github.com/ucsandman/SideTap
1•practicalsystem•21m ago•0 comments

Repack (Concurrently) in Postgres 19

https://boringsql.com/posts/repack-concurrently-costs/
2•plaur782•21m ago•0 comments

Reddit will stop supporting RSS feeds on November 13th

https://www.theverge.com/tech/1002788/old-reddit-ai-scraping
6•edsimpson•23m ago•2 comments

America.gov chatbot hallucinates Minecraft's End Poem

https://twitter.com/bennjordan/status/2105169596181590100
2•Aeroi•24m ago•1 comments

E2B Embed

https://github.com/e2b-dev/runtime/tree/main/embed
1•handfuloflight•25m ago•0 comments