Claude Code on a 16GB Mac with Ollama: 90s 56s by attaching only relevant memory
Claude Code keeps notes about your past work in memory files, plus an index file ( MEMORY.md ) that it loads into every request. When Claude Code runs on a local 9B model, that index makes every request slow. On a 16GB MacBook (Apple M5) running qwen3.5:9b through Ollama, I stopped loading the whole index (78 memory files in my case). Instead, a hook attaches only the memory lines related to the…
Claude Code, when running on a 16GB MacBook with Ollama, significantly reduces request times by only loading relevant memory lines instead of the entire index. On a 16GB MacBook, the setup attaches only the memory lines related to the prompt, which results in a median time to finish one question of 56.4 seconds compared to 90.4 seconds with the full index.
This improvement is consistent across 42 out of 50 pairs of questions, making the new setup faster in 42 of those cases. The retrieval accuracy also improves, with the new setup correctly answering 37 out of 45 memory questions, compared to 20 with the old setup.
Rewritten by urgent.news; may contain errors — check the original.
Source: dev.to
More from Dev.to on urgent.news
Report a problem with this story
Get the day's news by email. Daily, weekly or monthly. Sign up