I track attempts and techniques for running long-context language models locally, especially Qwen models on a Mac. These notes distinguish my own experience and recommendations from results reported by others, and connect to running models locally and local model software and interfaces.
Alibaba's Qwen group shipped Qwen2.5-7B-Instruct-1M and Qwen2.5-14B-Instruct-1M, which I described as two Apache 2 licensed LLMs with an impressive 1 million token context limit.
I shared my so-far unsuccessful attempts to run large context prompts on my Mac, with notes at https://t.co/9JvzxarGWg.
I was keen to hear from anyone who could run one of the new Qwen models successfully on a Mac and have it handle a long (100,000+ tokens) prompt convincingly; I had not managed that yet.
I recommended a great explanation of how to run a model on macOS up to 250,000 tokens using MLX.
For Ollama, I said to bump up the num_ctx option from its default of 2048 to a larger number.
cat code.txt | llm -m q1m 'describe this codebase in detail' \
-o num_ctx 80000
I warned, “Needs a lot of RAM though!”
On my M2 64GB Mac, I found that longer prompts take an unreasonably long time to process.
I asked whether anyone had much success running long context prompts through local LLMs.
I asked, “am I holding it wrong?” because longer prompts took an unreasonably long time to process on my M2 64GB Mac.
I asked, “Any models or serving platforms I should try out that might respond reasonably quickly?”
Related: local coding models, local reasoning models, local vision models