News for hackers. Stuff that matters.
Re:Show HN: We made our own inference engine for Apple Silicon by sharifulin on Tuesday July 15, 2025 @10:34AM (#44571565)
Wow! Sounds super interesting
Re:Show HN: We made our own inference engine for Apple Silicon by slavasmirnov on Tuesday July 15, 2025 @10:42AM (#44571641)
that’s exactly we are looking for not to waste on apis. Wonder how significant trade offs are
Re:Show HN: We made our own inference engine for Apple Silicon by TheMagicHorsey on Tuesday July 15, 2025 @10:48AM (#44571713)
Amazing!

How was your experience using Rust on this project? I'm considering a project in an adjacent space and I'm trying to decide between Rust, C, and Zig. Rust seems a bit burdensome with its complexity compared to C and Zig. Reminds me of C++ in its complexity (although not as bad). I find it difficult to walk through and understand a complicated Rust repository. I don't have that problem with C and Zig for the most part.

But I'm wondering if I just need to invest more time in Rust. How was your learning curve with the language?

Re:Show HN: We made our own inference engine for Apple Silicon by adastra22 on Tuesday July 15, 2025 @11:28AM (#44572197)
You are confusing familiarity with intrinsic complexity. I have 20 years experience with C/C++ before switching to rust a few years ago. After the initial hurdle, it is way easier and very simple to follow.
Re:Show HN: We made our own inference engine for Apple Silicon by TheMagicHorsey on Friday July 18, 2025 @03:32PM (#44608872)
Are you generally able to quickly understand what is going on in somebody else's codebase written in Rust? I find it quite difficult to understand other people's Rust code. Is this just a familiarity thing? I have not written anything particularly huge or complex in Rust, but I have written a few CLI utilities. With an equivalent level of Go exposure, I find it much easier to understand code written in Go, compared to code written in Rust.

I'm quite proficient in C/C++ (started coding in C/C++ in 1997) but I still have a much harder time understanding a new C++ project compared to a C project.

Re:Show HN: We made our own inference engine for Apple Silicon by ednevsky on Tuesday July 15, 2025 @10:56AM (#44571795)
nice
Re:Show HN: We made our own inference engine for Apple Silicon by ewuhic on Tuesday July 15, 2025 @10:56AM (#44571799)
>faster than llama cpp in all of the use cases

What's your deliberate, well-thought roadmap for achieving adoption similar to llama cpp?

Re:Show HN: We made our own inference engine for Apple Silicon by pants2 on Tuesday July 15, 2025 @11:16AM (#44572037)
Probably getting acquired by Apple :)
Re:Show HN: We made our own inference engine for Apple Silicon by khurs on Tuesday July 15, 2025 @06:28PM (#44576529)
Ollama is the leader isn't it?

Brew stats (downloads last 30 days)

Ollama - 28,232 Lama.cpp - 7,826

Re:Show HN: We made our own inference engine for Apple Silicon by DiabloD3 on Wednesday July 16, 2025 @12:56AM (#44578802)
Ollama isn't an inference engine, its a GUI slapped onto a perpetually out-of-date vendored copy of Llama.cpp underneath.

So, if you're trying to actually count LLama.cpp downloads, you'd combine those two. Also, I imagine most users on OSX aren't using Homebrew, they're getting it directly from the GH releases, so you'd also have to count those.

Re:Show HN: We made our own inference engine for Apple Silicon by imtringued on Wednesday July 16, 2025 @02:00AM (#44579160)
Actually, ollama has stopped using llama.cpp and is using ggml directly nowadays.
Re:Show HN: We made our own inference engine for Apple Silicon by mintflow on Tuesday July 15, 2025 @11:05AM (#44571902)
just curios, will it be supported on iOS, it would be great to build local llm app with this project.
Re:Show HN: We made our own inference engine for Apple Silicon by AlekseiSavin on Tuesday July 15, 2025 @11:19AM (#44572079)
Re:Show HN: We made our own inference engine for Apple Silicon by cwlcwlcwlingg on Tuesday July 15, 2025 @11:06AM (#44571918)
Wondering why use Rust other than C++
Re:Show HN: We made our own inference engine for Apple Silicon by adastra22 on Tuesday July 15, 2025 @11:29AM (#44572202)
Why use C++?
Re:Show HN: We made our own inference engine for Apple Silicon by khurs on Tuesday July 15, 2025 @06:30PM (#44576559)
So C++ users don't need to learn something new.
Re:Show HN: We made our own inference engine for Apple Silicon by bee_rider on Tuesday July 15, 2025 @12:50PM (#44573216)
I wonder why they didn’t use Fortran.
Re:Show HN: We made our own inference engine for Apple Silicon by giancarlostoro on Tuesday July 15, 2025 @02:29PM (#44574364)
...or D? or Go? or Java? C#? Zig? etc they chose what they were most comfortable with. Rust is fine, it's not for everyone clearly, but those who use it produce high quality software, I would argue similar with Go, without all the unnecessary mental overhead of C or C++
Re:Show HN: We made our own inference engine for Apple Silicon by outworlder on Tuesday July 15, 2025 @02:42PM (#44574476)
Why use C++ for greenfield projects?
Re:Show HN: We made our own inference engine for Apple Silicon by khurs on Tuesday July 15, 2025 @06:27PM (#44576525)
The recommendation from the security agencies is to prefer Rust over C++ as less risk of exploits.

Checked and Lama.cpp used C++ (obviously) and Llama uses Go.

Re:Show HN: We made our own inference engine for Apple Silicon by greggh on Tuesday July 15, 2025 @11:20AM (#44572085)
"trymirai", every time I hear the word Mirai I think of the large IOT DDoS botnet. Maybe it's just me though.
Re:Show HN: We made our own inference engine for Apple Silicon by fnord77 on Tuesday July 15, 2025 @02:51PM (#44574563)
I think of the goofy Toyota fuel cell car. I think a grand total of about 6 have been sold (leased) in california
Re:Show HN: We made our own inference engine for Apple Silicon by rnxrx on Tuesday July 15, 2025 @11:22AM (#44572115)
I'm curious about why the performance gains mentioned were so substantial for Qwen vs Llama?
Re:Show HN: We made our own inference engine for Apple Silicon by AlekseiSavin on Tuesday July 15, 2025 @12:03PM (#44572574)
it looks like llama.cpp has some performance issues with bf16
Re:Show HN: We made our own inference engine for Apple Silicon by homarp on Tuesday July 15, 2025 @11:36AM (#44572261)
Can you explain the type of quantization you support?

would https://docs.unsloth.ai/basics/kimi-k2-how-to-run-locally be faster with mirai?

Re:Show HN: We made our own inference engine for Apple Silicon by AlekseiSavin on Tuesday July 15, 2025 @12:01PM (#44572552)
right now, we support AWQ but are currently working on various quantization methods in https://github.com/trymirai/lalamo
Re:Show HN: We made our own inference engine for Apple Silicon by smpanaro on Tuesday July 15, 2025 @11:43AM (#44572333)
In practice, how often do the models use the ANE? It sounds like you are optimizing for speed which in my experience always favors GPU.
Re:Show HN: We made our own inference engine for Apple Silicon by AlekseiSavin on Tuesday July 15, 2025 @11:57AM (#44572508)
You're right, modern edge devices are powerful enough to run small models, so the real bottleneck for a forward pass is usually memory bandwidth, which defines the upper theoretical limit for inference speed. Right now, we've figured out how to run computations in a granular way on specific processing units, but we expect the real benefits to come later when we add support for VLMs and advanced speculative decoding, where you process more than one token at a time
Re:Show HN: We made our own inference engine for Apple Silicon by J_Shelby_J on Tuesday July 15, 2025 @12:34PM (#44572973)
VLMs = very large models?
Re:Show HN: We made our own inference engine for Apple Silicon by mmorse1217 on Tuesday July 15, 2025 @12:39PM (#44573059)
Probably vision language models.
Re:Show HN: We made our own inference engine for Apple Silicon by skybrian on Tuesday July 15, 2025 @12:04PM (#44572576)
What are the units on the benchmark results? I’m guessing higher is better?
Re:Show HN: We made our own inference engine for Apple Silicon by AlekseiSavin on Tuesday July 15, 2025 @12:10PM (#44572657)
yeah, tokens per second
Re:Show HN: We made our own inference engine for Apple Silicon by dcreater on Tuesday July 15, 2025 @12:05PM (#44572592)
Somewhat faster on small models. Requires new format.

Not sure what the goal is for this project? Not seeing how this presents adequate benefits to get adopted by the community

Re:Show HN: We made our own inference engine for Apple Silicon by koakuma-chan on Tuesday July 15, 2025 @12:39PM (#44573065)
Written in Rust is a big one for me.
Re:Show HN: We made our own inference engine for Apple Silicon by worldsavior on Tuesday July 15, 2025 @01:32PM (#44573715)
It's utilizing Apple ANE and probably other optimization tools provided by Apple's framework. Not sure if llama.cpp uses them, but if they're not then the benchmark on GitHub says it all.
Re:Show HN: We made our own inference engine for Apple Silicon by zdw on Tuesday July 15, 2025 @12:16PM (#44572724)
How does this bench compared to MLX?
Re:Show HN: We made our own inference engine for Apple Silicon by jasonjmcghee on Tuesday July 15, 2025 @12:41PM (#44573093)
I use MLX in lmstudio and it doesn't have whatever issues llama cpp is showing here.

Qwen3-0.6B at 5 t/s doesn't make any sense. Something is clearly wrong for that specific model.

Re:Show HN: We made our own inference engine for Apple Silicon by giancarlostoro on Tuesday July 15, 2025 @02:26PM (#44574335)
Hoping the author can answer, I'm still learning about how this all works. My understanding is that inference is "using the model" so to speak. How is this faster than established inference engines specifically on Mac? Are models generic enough that if you build e.g. an inference engine focused on AMD GPUs or even Intel GPUs, would they achieve reasonable performance? I always assumed because Nvidia is king of AI that you had to suck it up, or is it just that most inference engines being used are married to Nvidia?

I would love to understand how universal these models can become.

Re:Show HN: We made our own inference engine for Apple Silicon by darkolorin on Tuesday July 15, 2025 @04:54PM (#44575711)
Basically “faster” means better performance e.g. tokens/s without loosing quality (benchmarks scores for models). So when we say faster we provide more tokens per second than llama cpp. That means we effectively utilize hardware API available (for example we wrote our own kernels) to perform better.
Re:Show HN: We made our own inference engine for Apple Silicon by nodesocket on Tuesday July 15, 2025 @03:16PM (#44574806)
I just spun up a AWS EC2 g6.xlarge instance to do some llm work. The GPU is NVIDIA L4 24GB and costs $0.8048/per hour. Starting to think about switching to an Apple mac2-m2.metal instance for $0.878/ per hour. Big question is the Mac instance only has 24GB of unified memory.
Re:Show HN: We made our own inference engine for Apple Silicon by khurs on Tuesday July 15, 2025 @06:32PM (#44576572)
Unified memory doesn't compare to a Nvidia GPU, the latter is much better.

Just depends on what performance level you need.

Re:Show HN: We made our own inference engine for Apple Silicon by floam on Tuesday July 15, 2025 @03:45PM (#44575072)
How does this compare to https://github.com/Anemll/Anemll?
Re:Show HN: We made our own inference engine for Apple Silicon by zackangelo on Tuesday July 15, 2025 @05:07PM (#44575833)
We also wrote our inference engine in rust for mixlayer, happy to answer any questions from those trying to do the same.

Looks like this uses ndarray and mpsgraph (which I did not know about!), we opted to use candle instead.

Re:Show HN: We made our own inference engine for Apple Silicon by khurs on Tuesday July 15, 2025 @06:29PM (#44576534)
Have you added it to HomeBrew and other package managers yet?

Also any app deployed to PROD but developed on Mac need to be consistent i.e. work on Linux/in container.

Re:Show HN: We made our own inference engine for Apple Silicon by woadwarrior01 on Tuesday July 15, 2025 @07:36PM (#44577067)
Re:Show HN: We made our own inference engine for Apple Silicon by iglushenkov on Wednesday July 16, 2025 @05:44AM (#44580420)
cooollll