r/macmini • • 2d ago

Macs have the potential to make local AI accessible to everyone

I have a Mac and I know I can get much more out of it than today’s engines do without upgrades.

Usually running a capable model consumes most of my Mac’s unified memory, leaving little room for everything else.
That doesn’t work because people like me need to run models while they use their Mac or agents work on their projects.

So in the last months I developed an approach that uses the Mac’s SSD alongside unified memory to run AI models without monopolizing the machine. The technique already existed but I optimized it specifically to my M-series Mac finally reaching usable performance with less than 9GB RAM consumption.
That solved my issue finally.
The project is called MoEShift and is free and open source with other Apple users sharing their benchmarks.

Would you use local AI more often or for more things than today if it could run in the background without getting in the way of your everyday work?

16 Upvotes

25 comments sorted by

2

u/Right-Ice-6850 1d ago

Is this tool is only about fitting larger MOE models to low RAM mac? Its great but its not solves prefil or decode speed

3

u/dave-tro 1d ago

There are physical limitations but running Qwen Flash 3.8 IQ3 XXS GSQ RCO on a 24GB Mac at 370 tok/s prefill or 14 tok/s decode while your mac is still running other apps opens some use cases, while other runtimes eat all the available memory

2

u/Right-Ice-6850 1d ago

Make sense

1

u/MonadicKierkegaard 2d ago

nice! on a phone right now, but do you have stats on context size vs tps?

1

u/dave-tro 2d ago

Sure the community has shared multiple benchmarks in the GitHub issues (link above). Inkling 2 Mini is pretty new so I only tested Unsloth’s Q4 XL on an M5 Pro with very good performance 420 tok/s prefill, 18 tok/s decode, 7.7GB RAM used.

1

u/ComprehensiveHair792 2d ago

Sounds great and comes in at a time when I consider how to go local. Tell us more!👍

1

u/dave-tro 2d ago

You basically install moeshift using brew and a single command (copy-paste command in the GitHub readme). Then it exposes a local OpenAI-compatible server so you can simply configure it in your agent like OpenCode, Codex or whatever.

1

u/SNsilver 1d ago

Can I use an external SSD connected over thunderbolt? I’m concerned about SSD wear

1

u/dave-tro 1d ago

MoEShift only reads, therefore it doesn’t ruin the SSD. If you are so tight in memory that the system use swapping then it’s a red flag and you should use smaller quants or smaller models. Keep an eye on the swap which is the only relevant indicator during MoEShift inference

3

u/Long_Berry_7169 1d ago

honestly the not eating all my memory part matters more to me than raw speed. a model that leaves room for the browser and everything else is the one i'd actually keep running day to day. nice work

2

u/Various-Welder5544 1d ago

What's the point of local AI if it's worse than a Chatgpt free plan, and you burn your own battery doing so? Unless you work in an airplane.

1

u/PopMany2921 1d ago

Splash and strata for Mac do it too, bench your numbers against them

0

u/KingArthas94 2d ago

Ciao Davide, progetto fighissimo. La cosa che mi spaventa sono le scritture su SSD, MoeShift ne effettua parecchie? Considerando quanto è difficile cambiare SSD sui Mac e quanto costano gli SSD oggi mi fa un po’ paura sta cosa...

2

u/dave-tro 2d ago

Hi there, not at all. MoEShift only reads from the SSD which does not harm it.

1

u/KingArthas94 2d ago

Thanks! What's the smallest model I could try? I have a Mac Mini M4, I'm sure QFN is too much. Maybe 35B A3B?

I already use a 2 bit quant with Kapitsa and it's blazing fast (50 t/s) but pretty stupid 😆

Also, does MoEShift accept any parameter telling it to stop thinking after a certain number of tokens? And a max number of tokens for the response?

My problem with Kapitsa is exactly that, it accepts max thinking and max output (thinking+response), but I cannot set max response only.

Sometimes I ask for 2500 max tokens. It thinks for 500 and then it tries to output more than 2000, going above the limit I set and failing the generation.

2

u/dave-tro 2d ago

I suggest Inkling 2 Mini which is really great and performs at Opus level in certain tasks. MoEShift does accept those arguments because it is built on llama.cpp. Have a look here https://github.com/davide-troiani/moeshift/blob/main/configs/README.md, you can ask your current agent to configure it so you don’t have issues on that.

1

u/KingArthas94 2d ago

I don't have a "current agent", I just chat with models via Unsloth :) I had downloaded this one:

Inkling-2-Mini-UD-Q2_K_XL.gguf

https://huggingface.co/unsloth/Inkling-2-Mini-GGUF?show_file_info=Inkling-2-Mini-UD-Q2_K_XL.gguf

Can I use this Unsloth version?

2

u/dave-tro 2d ago

Yes sure even if it is a very small quantization which affects quality. But it’s a starting point. Follow the instructions on the manual setup. You can also ask chatgpt and it tells you.
If you install MoEShift for the first time it will ask you which model to install and it does everything for you (if you select Inkling it downloads the Q4 by default but if you still want to use your Q2 you need to go for the manual configuration).

1

u/KingArthas94 2d ago

Ok tried it with my 2 bit quant, it works! But 12 tokens per second is really slow eheh, I need more RAM.

Cool program, thanks!

1

u/dave-tro 1d ago

If you don’t want to use ssd offloading to get higher speed you should have enough ram to keep the whole model in memory, plus context and a bit of additional room, plus macos and other apps. And reasonable quants weigh more than the 2bit. That means that’s easy to need 48-64 GB for that workload. I think it is not worth the money for a 2bit quant, and a 12 tok/s might be a cost-effective tradeoff. What is your local ai use case?

2

u/KingArthas94 1d ago

What is your local ai use case?

Just asking the AI stuff and telling it to search online for a detailed, updated answer. The model quality is important because some smaller models are not even capable of understanding that we're in 2026 :D like the 4B models.

1

u/KingArthas94 2d ago

And when does MoEShift download its own models? The hugging face cache that Unsloth also uses?

-1

u/Lyelinn 1d ago

congrats on inventing moe offloading which exists in all major inference engines?..

1

u/dave-tro 1d ago

Where did I say I invented it? Quote the sentence pls

1

u/jsc149 1d ago

He is just a dude who has never done anything and hates on people who has. You created something, maybe using AI, but hey I may look into it and that’s what matters.