I gave my local AI model 53,000 tokens of memory. It broke at 9,000.
Summary
The article details an experiment with a Qwen3.5-9B, Q4_K_M model running on a 16GB M-series Mac, revealing a significant "context cliff" where the model's performance degrades silently. Despite calculations indicating capacity for 53,000 tokens, the model's tool-call accuracy dropped from 93.3% to 73.3% between 6,045 and 8,845 tokens. This behavioral ceiling is much lower than the hardware's memory capacity, which peaked at only 1,890 tokens used during agent runs. A critical failure mode observed was the model prematurely signaling task completion without errors, leading to incomplete processes. The full 5-task batch took 39m 10s, with decode time dominating latency.
Key takeaway
For AI Engineers deploying local agentic workflows, relying solely on hardware memory calculations for context window sizing is insufficient. Your agents may silently degrade in accuracy or prematurely complete tasks around 9,000 tokens, even if VRAM suggests much higher capacity. Implement robust multi-run evaluations (e.g., k=4) and monitor for behavioral failures, not just crashes, to prevent critical production issues.
Key insights
Local AI models exhibit a "context cliff" where performance degrades silently well before memory limits are reached.
Principles
- Context capacity is distinct from reliable reasoning capacity.
- Agent evaluation requires multiple runs (k>1) to detect structural failures.
- Silent task completion errors are a critical production risk.
Method
The author padded prompts with semantically unrelated prose before tool definitions and re-measured tool-call accuracy at increasing depths to identify the context cliff.
In practice
- Test local agents with increasing context depth to find behavioral limits.
- Implement k=4 runs for agent evaluation to expose consistent failures.
- Monitor for premature completion signals, not just errors.
Topics
- Local AI Agents
- Context Window
- LLM Performance
- Agent Evaluation
- Qwen3.5-9B
- llama.cpp
Code references
Best for: AI Engineer, Machine Learning Engineer, MLOps Engineer
Related on AIssential
See Counsel's argued verdicts on the open AI decisions leaders are weighing →
Editorial summary, takeaway, and curation by AIssential. Original article published by LLM on Medium.