Live data from Hacker News

Run LLMs on Apple Neural Engine (ANE)

github.com

61–70 of 132 posts

Re: Run LLMs on Apple Neural Engine (ANE)

#61
post #57

Earlier quoted context omitted.

Pretty sure they're using the 80 GPU cores available in that case.

And that still performs worse than entry-level Nvidia gaming cards. Apple isn't serious about AI and needs to figure their AI story out. Every other big tech company is doing something about it.

Not for inferencing. M3 Ultra runs big LLMs twice as fast as RTX 5090.

https://creativestrategies.com/mac-studio-m3-ultra-ai-workst...

RTX 5090 only has 32GB RAM. M3 Ultra has up to 512 GB with 819 GB/sec bandwidth. It can run models that will not fit on an RTX card.

EDIT: Benchmark may not be properly utilizing the 5090. But the M3 Ultra is way more capable than an entry level RTX card at LLM inferencing.

Re: Run LLMs on Apple Neural Engine (ANE)

#62
post #2

I always felt that the neural engine was wasted silicon, they could add more gpu cores in that die space and redirect the neural processing api to the gpu as needed. But I'm no expert, so if anyone here has a different opinion I'd love to learn from it.

I was trying to figure the same thing out a couple months ago, and didn't find much information.

It looked like even ANEMLL provides limited low level access to specifically direct processing toward the Apple Neural Engine, because Core ML still acts as the orchestrator. Instead, flags during conversion of a PyTorch or TensorFlow model can specify ANE-optimized operations, quantization, and parameters hinting at compute targets or optimization strategies. For example `MLModelConfiguration.computeUnits = .cpuAndNeuralEngine` during conversion would disfavor the GPU cores.

Anyway, I didn't actually experiment with this, but at the time I thought maybe there could be a strategy of creating a speculative execution framework, with a small ANE-compatible model to act as the draft model paired with a larger target model running on GPU cores. The idea being that the ANE's low latency and high efficiency could accelerate results.

However, I would be interested to hear the perspective of people who actually know something about the subject.

Re: Run LLMs on Apple Neural Engine (ANE)

#63

Earlier quoted context omitted.

[flagged]

M3 Ultra has a big GPU with 819 GB/sec bandwidth. LLM performance is twice as fast as RTX 5090 https://creativestrategies.com/mac-studio-m3-ultra-ai-workst...

> LLM performance is twice as fast as RTX 5090

your tests are wrong. you used MLX for Mac Studio (optimized for Apple Silicon) but you didn't use vLLM for 5090. There's no way a machine with half the bandwidth of 5090 delivers twice as fast tok/s.

Re: Run LLMs on Apple Neural Engine (ANE)

#64
post #57

Earlier quoted context omitted.

Pretty sure they're using the 80 GPU cores available in that case.

And that still performs worse than entry-level Nvidia gaming cards. Apple isn't serious about AI and needs to figure their AI story out. Every other big tech company is doing something about it.

They're basically second place behind NVIDIA for model inference performance and often the only game in town for the average person if you're trying to run larger models that wont fit in the 16 or 24gb of memory available in top-shelf NVIDIA offerings.

I wouldn't say Apple isn't serious about AI, they had the forethought to build the shared memory architecture with the insane memory bandwidth needed for these types of tasks, while at the same time designing neural cores specifically for small on-device models needed for future apps.

I'd say Apple is currently ahead of NVIDIA in just sheer memory available - which for doing training and inference on large models, it's kinda crucial, at least right now. NVIDIA seems to be purposefully limiting the memory available in their consumers cards which is pretty short sighted I think.

Re: Run LLMs on Apple Neural Engine (ANE)

#65

Earlier quoted context omitted.

M3 Ultra has a big GPU with 819 GB/sec bandwidth. LLM performance is twice as fast as RTX 5090 https://creativestrategies.com/mac-studio-m3-ultra-ai-workst...

> LLM performance is twice as fast as RTX 5090 your tests are wrong. you used MLX for Mac Studio (optimized for Apple Silicon) but you didn't use vLLM for 5090. There's no way a machine with half the bandwidth of 5090 delivers twice as fast tok/s.

Unless it’s a large model that doesn’t fit in the 5090, bust that’s no longer a $4k macstudio I think.

Re: Run LLMs on Apple Neural Engine (ANE)

#66
post #39

Apple is a competitive choice simply because their unified memory allows you to get enough ram that would take multiple Gpus to have enough space to run larger models.

Yes, but their refusal to open up the ANE to third-party models negates that. You can get (or will be able to very soon) a Strix Halo Ryzen AI Max+ 395 able to access 96GB of unified RAM (on a 128GB system) for well under half what you'd pay for an equivalent M4 system from Apple.

Doesn't the M3 Ultra have 3-4x the RAM bandwidth though?

Re: Run LLMs on Apple Neural Engine (ANE)

#67

Earlier quoted context omitted.

> LLM performance is twice as fast as RTX 5090 your tests are wrong. you used MLX for Mac Studio (optimized for Apple Silicon) but you didn't use vLLM for 5090. There's no way a machine with half the bandwidth of 5090 delivers twice as fast tok/s.

Unless it’s a large model that doesn’t fit in the 5090, bust that’s no longer a $4k macstudio I think.

that's orthogonal to the speed discussion.

also, the GP was mostly testing models that fit in both 5090 and Mac Studio.

Re: Run LLMs on Apple Neural Engine (ANE)

#69

Earlier quoted context omitted.

M3 Ultra has a big GPU with 819 GB/sec bandwidth. LLM performance is twice as fast as RTX 5090 https://creativestrategies.com/mac-studio-m3-ultra-ai-workst...

> LLM performance is twice as fast as RTX 5090 your tests are wrong. you used MLX for Mac Studio (optimized for Apple Silicon) but you didn't use vLLM for 5090. There's no way a machine with half the bandwidth of 5090 delivers twice as fast tok/s.

Yeah that's probably wrong. But the M3 Ultra is good enough for local inferencing, in any case.

Re: Run LLMs on Apple Neural Engine (ANE)

#70
post #55

Man, Apple's tight grip on ANE is kinda nuts - would love to see the day they let folks get real hands-on. you ever think companies hold stuff back just to keep control, or is there actually some big tech reason for it?

People keep saying this but I'm not seeing the big difference with other NPU varieties. Either way we're still talking about very experimental stuff that also tends to be hardwired towards some pre-determined use case. So I'm not surprised that people are running into problems while trying to make these more broadly useful.

True; everybody's NPU hardware is afflicted by awkward hardware and software constraints that don't come close to keeping pace with the rapidly-shifting interests of ML researchers.

To some degree, that's an unavoidable consequence of how long it takes to design and ship specialized hardware with a supporting software stack. By contrast, ML research is moving way faster because they hardly ever ship anything product-like; it's a good day when the installation instructions for some ML thing only includes three steps that amount to "download more Python packages".

And the lack of cross-vendor standardization for APIs and model formats is also at least partly a consequence of various NPUs evolving from very different starting points and original use cases. For example, Intel's NPUs are derived from Movidius, so they were originally designed for computer vision, and it's not at all a surprise that making them do LLMs might be an uphill battle. AMD's NPU comes from Xilinx IP, so their software mess is entirely expected. Apple and Qualcomm NPUs presumably are still designed primarily to serve smartphone use cases, which didn't include LLMs until after today's chips were designed.

It'll be very interesting to see how this space matures over the next several years, and whether the niche of specialized low-power NPUs survives in PCs or if NVIDIA's approach of only using the GPU wins out. A lot of that depends on whether anybody comes up with a true killer app for local on-device AI.

Post reply on HN