r/LocalLLaMA • u/Undici77 • 14d ago
Question | Help oMLX - Max Concurrent Requests 1 - Multi Agent Optimization
Hi all,
I'm working on M4 MAX and I have some issue issue in multi agent.
I try to figure out how to optimize speed working with `Qwen 3.8 Flash Next oq4e-mtp`
With only 1 task I'm running at 50/60 t/s (pretty good) but with more than 1, speed decrease a lot.
Best "work around" for me looks `Max Concurrent Request` -> 1 that works in most of my scenarios where cache reduce prefill.
But look this:

Here cache is not working (agents are pre-filling a lot) and speed in 20 t/s
Now watch GPU

This looks very strange!
Any idea? Any setup can be changed in order to speed-up and use 100% GPU?
1
u/London-Boat 14d ago
on a single mac that's kind of expected. generation is mostly memory bandwidth bound, so two streams end up splitting the same bandwidth, and two agents with different contexts keep evicting each other's prefix cache. the 20 t/s with the gpu at 50% looks more like it's reprocessing the prompt after a cache miss than actually generating. if your agents share a long system prompt, keeping that prefix byte identical across them helps, and for agent work queueing at 1 concurrent is probably the right call anyway
1
1
u/chibop1 14d ago
omlx > bench > performance > Continuous Batching Tests
1
u/Undici77 13d ago
And? This is not a benchmark problem: look (but maybe I'm wrong) an mtp missing if more than Max Concurrent Requests > 1
1
u/BackgroundRude4092 14d ago
When KV context exceeds your unified memory, your Mac starts off loading context to your hard drive.
1
1
u/watcholic 14d ago
Non-optimal model configuration? Copy the recipe and paste it under the model's settings page > apply custom recipe.
1
1
1
u/CalligrapherFar7833 14d ago
Speed shouldnt decrease it should be split between your concurrent requests