4 ms·
> Apple chips are among the most efficient out there for that sort of thing Not really? Apple is efficient because they ship moderately large GPUs manufactured
by talldayo 2y ago
> Apple chips are among the most efficient out there for that sort of thing
Not really? Apple is efficient because they ship moderately large GPUs manufactured on TSMC hardware. Their NPU hardware is more or less entirely ignored and their GPUs are using the same shader-based compute that Intel and AMD rely on. It's not efficient because Apple does anything different with their hardware like Nvidia does, it's efficient because they're simply using denser silicon than most opponents.
Apple does make efficient chips, but AI is so much of an afterthought that I wouldn't consider them any more efficient than Intel or AMD.
- nextos 2y agoFor inference, Apple chips are great due to a high memory bandwidth. Mac Studio is a popular choice in the local Llama community for this particular reason. It's a cost effective option if you need a lot of memory plus a high bandwidth. The downside is poor training performance and Metal being a less polished software stack compared to CUDA. I wonder if a little cluster of Mac Minis is a good option for running concurrent LLM agents, or a single Mac Studio is still preferable?
- angoragoats 2y agoThe memory bandwidth on Apple silicon is only sometimes comparable to, and in many cases worse than, that of a GPU. For example, an nVidia RTX 4060 Ti 16GB GPU (not a high-end card by any means) has memory bandwidth of 288GiB/sec, which is more than double that of the M4 CPU. On the higher end, building a machine with 6 to 8 24GB GPUs such as RTX 3090s would be comparable in cost (as well as available memory) to a high-end Mac Studio, and would be at least an order of magnitude faster at inference. Yes, it's going to use an order of magnitude more power as well, but what you probably should care about here is W/token which is in the same ballpark. Apple silicon is a reasonable solution for inference only if you need the most amount of memory possible, you don't care about absolute performance, and you're unwilling to deal with a multi-GPU setup.
- Y-bar 2y agoNote that they said the _Mac Studio_ which in the M2 model has between 400GB/s and 800GB/s memory bandwidth. https://www.apple.com/mac-studio/specs/ https://www.apple.com/mac-studio/specs/ Edit: since my reply you have edited your comment to mention the Studio, but the fact remains that the M2 Max has at least ~40% greater bandwidth than the number you quoted as an example.
- angoragoats 2y agoYeah, sorry, I realized that as well so I edited my post to add a higher end example with multiple 3090s or similar cards. A single 3090 has just under 1TiB/sec of memory bandwidth. One more edit: I'd also like to point out that memory bandwidth is important, but not sufficient for fast inference. My entire point here is that Apple silicon does have high memory bandwidth for sure, but for inference it's very much held back by the relative slowness of the GPU compared with dedicated nVidia/AMD cards.
- int_19h 2y agoIt's still "fast enough" for even 120b models in practice, and you don't need to muck around with building a multi-GPU rig (and figuring out how to e.g. cool it properly). It's definitely not what you'd want for your data center, but for home tinkering it has a very clear niche.
- angoragoats 2y ago> It's still "fast enough" for even 120b models in practice Is it? This is very subjective. The Mac Studio would not be "fast enough" for me on even a 70b model, not necessarily because its output is slow, but because the prompt evaluation speed is quite bad. See [0] for example numbers; on Llama 3 70B at Q4_K_M quantization, it takes an M2 Ultra with 192GB about 8.5 seconds just to evaluate a 1024-token prompt. A machine with 6 3090s (which would likely come in cheaper than the Mac Studio) is over 6 times faster at prompt parsing. A 120b model is likely going to be something like 1.5-2x slower at prompt evaluation, rendering it pretty much unusable (again, for me). [0] https://github.com/XiongjieDai/GPU-Benchmarks-on-LLM-Inference https://github.com/XiongjieDai/GPU-Benchmarks-on-LLM-Inferen...
- alwayslikethis 2y agoDoes it use the GPU? I was under the impression that it uses the CPU. It's only faster because of the massive memory bandwidth compared to DDR4/5
- astrange 2y agoThe AI features use all three of NPU ("ANE"), GPU, CPU, mostly depending on model size. https://machinelearning.apple.com/research/neural-engine-transformers https://machinelearning.apple.com/research/neural-engine-tra...
- DrBenCarson 2y agoFrankly you’re very wrong. NPUs and GPUs aside, 16gb of GPU memory is very rare in consumer hardware
- astrange 2y agoYou can't use all 16GB because it's unified, so it's shared with the system, SSD controller etc. You can use something like 12-14GB though.
- DrBenCarson 2y agoSure, still incredibly rare in a $600 device
- angoragoats 2y agoI'm not sure what you mean. RTX 4060 Ti/4070 Ti Super/3090/4090 cards can be easily purchased at any major electronics store in person or online and have 16GB or 24GB depending on model. Once you get up to 32GB, your point would stand, but 16-24GB GPUs are common.
- DrBenCarson 2y agoYes but the average user is not purchasing those, let alone putting together a system with one for $600
- angoragoats 2y agoYou said nothing about price in your initial comment, and the cards I listed are some of the most popular GPUs of the last several years.