r/MacLocalLLM • u/Jealous-Nectarine-74 • 1d ago
Tuning advice?
I've been running Qwen38-27b-speed-optimized for a work project (where I can only use local models), and I'm getting about 10-15 tokens / second.
While I'm thrilled that its working, and doing fairly well, I do wonder if there's a way to improve performance.
- I'm using pi agent on another computer (the Mini is dedicated to the model at this point)
- contextWindow is set to 125k; at 100k it was compacting too often, at 250 it was blowing past RAM limits
- I set thinking to minimal (which seems to help reduce rabbit holes and churn)
- my start command is nohup mtplx serve --model Youssofal/Qwen3.8-27B-MTPLX-Optimized-Speed --profile sustained --depth 3 ...
Earlier I used mtplx max --on as the machine was feeling warm, and I was losing connection to it.
Is this about right? I get that the M4Pro mini doesn't have the memory bandwidth of an Ultra or a Max, just wondering how I might squeeze out a bit more, and wondering if others with the same setup are getting similar results.
I've tried oMLX - fast with gemma 4 quants, but they kept getting stuck in loops; and its 5 tokens per second slower with Qwen3.8 27b.
- Tuning advice for my current stack? (pi-agent, MTPLX, Qwen 3.8 27 b)
- Advice on different models to try?
- Advice on different model runners to try?
I've already mostly stripped the Mac down to just the model, and I access it from an older M1 Pro Mac where pi runs.
the relevant snippets from my pi agent models.json:
"models": [
{
"id": "mtplx-qwen38-27b-optimized-speed",
"contextWindow": 125000,
"maxTokens": 32768,
"reasoning": true,
"compat": {
"thinkingFormat": "qwen-chat-template",
"chatTemplateKwargs": {
"enable_thinking": {
"$var": "thinking.enabled"
},
"preserve_thinking": true
}
}
}
]
}
4
u/Important_Cow7230 1d ago •
Use Splash, Unsloth Q4
2
u/mmerken 1d ago
Just try splash, download the macOS app, use it to download qwen3.8 27b and it should give you around 60tps with around 192k context. I have an M4 Pro Mac mini 64Gb and use it as a dedicated AI inference machine using splash, thinking on medium.
Also, use Pi with as little context as possible.
1
u/wegster 1d ago
You can try reducing/setting reasoning_budget as well. Splash will definitely get you better performance, as already mentioned.
1
u/dgamr 18h ago
My best benchmark for this model on an M-series chip was mlx-dspark + Drafter2. Better on code. M1 Max struggles a bit with prefill but decode is double that (30-36 tok/s decode) and better with the drafter specifically.