Ollama’s default context window depends on your GPU memory: 4k tokens with less than 24 GiB of VRAM, 32k tokens with 24 to 48 GiB, and 256k tokens with 48 GiB or more, according to Ollama’s context length documentation.
As of November 9, 2026, Ollama’s FAQ still says the default is 4,096 tokens, which matches only the lowest tier, so guides that cite a flat 4,096 default are incomplete. Cloud models run at their maximum context length by default. Ollama recommends at least 64,000 tokens for web search, agents and coding tools.
To change it, move the context length slider in the Ollama app settings, start the server with OLLAMA_CONTEXT_LENGTH=64000 ollama serve, use /set parameter num_ctx inside ollama run, or pass num_ctx in the API options. A larger window needs more memory, and ollama ps shows the allocated context and whether the model runs fully on the GPU.
Related: Ollama 0.40.15 power-user guide, Ollama new features guide and How much does Ollama Cloud cost?
Sources: Ollama docs, Context length; Ollama docs, FAQ
Image: Ollama logo by ParthSareen on behalf of Ollama, MIT License, via Wikimedia Commons. Placed on a white background and resized. Ollama is a trademark of its owner. FreeAnswers is not affiliated with or endorsed by Ollama.