The context cache doesn't take up too much memory compared to the model. The main benefit of having a lot of VRAM is that you can run larger models. I think you're better off buying a 24 GB Nvidia card from a cost and performance standpoint.
Selfhosted
A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.
Rules:
-
Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.
-
No spam posting.
-
Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.
-
Don't duplicate the full text of your blog or github here. Just post the link for folks to click.
-
Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).
-
No trolling.
Resources:
- selfh.st Newsletter and index of selfhosted software and apps
- awesome-selfhosted software
- awesome-sysadmin resources
- Self-Hosted Podcast from Jupiter Broadcasting
Any issues on the community? Report it using the report flag.
Questions? DM the mods!
Yeah I was thinking about running something like Code Qwen 72B which apparently requires 145GB Ram to run the full model. But if it’s super slow especially with large context and I can only run small models at acceptable speed anyway it may be worth going NVIDIA alone for CUDA.
There are some videos on youtube of people running local LLMs on the newer M4 chips which have pretty good AI performance. Obviously, a 5090 is going to destroy it in raw compute power, but the large unified memory on Apple Silicon is nice.
That being said, there are plenty of small ITX cases at about 13-15L that can fit a large nvidia GPU.
Thanks! Hadn’t thought of YouTube at all but it’s super helpful. I guess that’ll help me decide if the extra Ram is worth it considering that inference will be much slower if I don’t go NVIDIA.
I do this on my ultra, token speed is not great, depending on the model of course, a lot of source code sets are optimized for Nvidia and don't even use native Mac gpu without modifying the code, defaulting to cpu. I've had to modify about half of what I run
Ymmv but I find it's actually cheaper to just use a hosted service
If you want some specific numbers lmk
Interesting, is there any kind of model you could run at reasonable speed?
I guess over time it could amortize but if the usability sucks that may make it not worth it. OTOH really don’t want to send my data to any company.
If you enjoy waiting around, sure
Meh, ofc I don’t.
Then don't go with an Apple chip. They're impressive for how little power they consume. But any 50 watt chip will get absolutely destroyed by a 500 watt gpu, even one from almost a decade ago will beat it.
And you'll save money to boot, if you don't count your power bill
But any 50 watt chip will get absolutely destroyed by a 500 watt gpu
If you are memory-bound (and since OP's talking about 192GB, it's pretty safe to assume they are), then it's hard to make a direct comparison here.
You'd need 8 high-end consumer GPUs to get 192GB. Not only is that insanely expensive to buy and run, but you won't even be able to support it on a standard residential electrical circuit, or any consumer-level motherboard. Even 4 GPUs (which would be great for 70B models) would cost more than a Mac.
The speed advantage you get from discrete GPUs rapidly disappears as your memory requirements exceed VRAM capacity. Partial offloading to GPU is better than nothing, but if we're talking about standard PC hardware, it's not going to be as fast as Apple Silicon for anything that requires a lot of memory.
This might change in the near future as AMD and Intel catch up to Apple Silicon in terms of memory bandwidth and integrated NPU performance. Then you can sidestep the Apple tax, and perhaps you will be able to pair a discrete GPU and get a meaningful performance boost even with larger models.
Again, you'd be waiting around all day
The power bill side is also not even clear cut. The longer processing time for slower chips sometimes ends up resulting in higher costs. It's surprisingly not as simple as lower wattage chip is cheaper to operate.
Good point!
I've not run such things on Apple hardware, so can't speak to the functionality, but you'd definitely be able to do it cheaper with PC hardware.
The problem with this kind of setup is going to be heat. There are definitely cheaper minipcs, but I wouldn't think they have the space for this much memory AND a GPU, so you'd be looking for an AMD APU/NPU combo maybe. You could easily build something about the size of a game console that does this for maybe $1.5k.
you'd definitely be able to do it cheaper with PC hardware.
You can get a GPU with 192GB VRAM for less than a Mac? Sign me up please.
AMD APU uses whatever system RAM is as VRAM, so...yeah. NPU as well.
And what is the memory bandwidth on these APUs?
As fast as it gets to the CPU. That should be pretty obvious.
Which is how fast?
Up to half of system RAM*
For context length, vram is important, you can’t break contexts across memory pools so it would be limited to maybe 16gb. With m series you can have a lot more space since ram/vram are the same, but its ram at apple prices. You can get a +24gb setup way cheaper than some nvidia server card though
Yeah the VRAM of Mac M series is very attractive for running models at full context length and the memory bandwidth is quite good for token generation compared to the price, power consumption and heat generation of NVidia GPUs.
Since I’ll have to put this in my kitchen/living room that’d be a big plus but idk how well prompt processing would work if I send over like 80k tokens.
I’d honestly be open for that but would an AMD setup not take up a lot of space and consume lots of power / be loud?
It seems like in terms of price & speed, the Macs suck compared to other options, but if you don’t have a lot of space and don’t want to hear an airplane engine constantly I’m wondering if there are options.
~~I just looked, and the MM maxes out at 24G anyway. Not sure where you got the thought of 196GB at.~~ NVM you said m2 ultra
Look, you have two choices. Just pick one. Whichever is more cost effective and works for you is the winner. Talking it down to the Nth degree here isn't going to help you with the actual barriers to entry you've put in place.
Mac Mini M4 Pro can be ordered with up to 64GB shared memory
I understand what you’re saying but I’m coming to this community because I like having more input, hear about the experience of others and potentially learn about things I didn’t know about. I wouldn’t ask specifically in this community if I wouldn’t want to optimize my setup as much as I can.
Here's a quick idea of what you'd want in a PC build https://newegg.io/2d410e4
Thanks, that’s very helpful! Will look into that type of build
You can have a slightly bigger package in PC form and doing 4x the work for half the price. That's the gist.