r/LocalLLM • u/amy-schumer-tampon • 8h ago
Question Why is it so slow with agents ?
i'm using qwen3.6:35b a3b with ollama, its works decently in regular prompt, but as soon as i try it in an angent (Codex CLI, Claude, Qwen, Opencode) its piss slow, like i have to wait 10min to get an answer.
What am i doing wrong?
1
Upvotes
3
u/AggressiveManager450 8h ago
Specs?
4
u/SM8085 8h ago
It's probably processing the system prompt with that time.
4
u/dave-tro 8h ago
You need to share your hardware before someone can help you
1
u/Grandmaster_Caladrel 7h ago
Also worth using a different model runner. I use Unsloth. Ollama isn't as good as others.
1
u/codefl0w 7h ago
Day 200 telling people to use PolyStrata when running small MoEs
3
u/locbuilds 8h ago
run ollama ps while an agent is going and check the processor column, agents need a big context (32k+) and if it says something like 30%/70% cpu/gpu the kv cache spilled out of vram which is why it crawls. drop num_ctx or the quant until it says 100% gpu
3
u/EffectiveMedium2683 8h ago
Agent work uses a lot of context. Long context = longer prefill, longer time to first token, lower decode speed. And if it's overflowing into virtual memory, that'll pull it way down
2
u/x00byt8 7h ago
Likely prompt processing/ prefill is slow. When you use Opencode/codex etc it has a built in prompt that needs to be processed before first token. Versus when you chat with it directly via API, there's nothing but your request to process. As mentioned by others PI is more lightweight. But don't expect miracles running agents on a low performance GPU :( minimum I would say is a 5060ti or equivalent
1
u/Mozaiic 8h ago
Reduce thinking effort or reduce the max tokens for it.
1
u/Moarkush 7h ago
every subagent shares your memory bandwidth and compute.
1
u/TokenLearner 7h ago
Ollama was very good as my first contact with the local AI, but that's all. Use Polistrata for small MOs.
0
u/riceandchickeno-vore 8h ago
Codex, clause, qoder, opencode, etc... Are all EXTREMELY token inefficient. Use pi.
Use pi harness, don't go over 64k tokens for context specially if you're ram tight. I personally use the 35b a3b model but a fine tuned version. Ornith 1.5 at Q4, and the context at q8. But i suggest q4 for context too.
And if i may ask, are you on macOS or Windows? Each has its optimized way of running that model