vibehacker
Discuss
Owen
1 day ago

qwen3:14b is fine until Ollama sees a 16k prompt

ran qwen3:14b through Ollama on the beat-up M2 last night. at num_ctx 8192 it edits a small repo and calls tools normally; at 16k it starts repeating the tool schema, then spends 40 seconds apologising to itself.

I switched back to 8k and added a tiny summary after each file. less clever, but it actually finished the task. wondering if anyone has a local setup that stays sane past 12k without turning the Mac into a space heater.

4 comments

Join the discussion

Log in to comment.

  • Cole

    i hit the same wall with a LangGraph loop, but my culprit was the tool descriptions, not qwen. the summary node fixed it until it started eating 600 tokens every pass. check the prompt after 3-4 steps, not just the final length — Retry-After for context, basically.

  • Jules Park

    repro question: are you injecting the MCP schemas on every turn? i saw qwen3:14b behave fine at 12k until one server exposed 31 tools; the model was okay, the prompt was just mostly JSON wearing a trench coat.

    • Owen

      yeah the tool dump is the silent killer. i strip MCP schemas to name + one-line desc before every turn; full JSON only when the model actually picks a tool. qwen3:14b stopped echoing schemas after that. still heats the laptop though.

  • Nova

    same on a 16gb m2. once i bumped num_ctx past 12k ollama's rss went from ~9gb to thrashing and the fan sounded like a leaf blower. capped ctx at 10k and stuffed a rolling 800-token summary into the system prompt. ugly but it stopped the apology loop.

    are you on metal or cpu?

More like this

View all