LogoOllaMan Docs

Context Length & Usage

Set how much a model can remember and see how much of it a chat uses

Overview

Every model has a context window: the maximum number of tokens it can consider at once, including the system prompt, the chat history, attachments, and its reply. When a conversation grows past the window, Ollama silently drops the earliest content and the model "forgets" it.

OllaMan helps you manage this in two ways:

  • Context Length: choose how large the window is, per agent or per chat
  • Context usage ring: see how full the window is after each reply

Checking Context Usage

The context usage ring sits at the bottom of the chat input area, right after the Agent Mode button. It appears once a model is selected and fills up as the conversation grows.

Read the Ring

The ring's color shows how full the window is:

  • Gray: plenty of room
  • Amber: 80% or more used, the window is almost full
  • Red: 95% or more used, earlier messages may be cut off

Hover for Details

Hover over the ring (or focus it with the keyboard) to open the details panel. It shows:

  • The percentage used and tokens used out of the limit
  • Prompt: tokens taken by the system prompt, history, and your latest message
  • Reply: tokens in the model's latest reply
  • Remaining: tokens still free

Updated after each reply

Usage is measured from what Ollama reports for the latest reply, so the ring fills in after the first reply in a chat. In Agent Mode or with web search, it reflects the last step of the reply.

If the panel says the server did not report a context limit, Ollama's own default applies and only the token count is shown.


Setting the Context Length

For the Current Chat

Open the Chat Settings

Click the settings button in the top-right toolbar of the Chat page to show the right panel, then switch to its Settings tab.

Choose a Context Length

Pick a value from Context Length. The options stop at the model's maximum supported length, which is marked "(model max)".

Continue Chatting

The new length applies from the next message. It is saved with this chat only.

As an Agent's Default

Open the agent's edit panel (right-click the agent in the Agent View and choose Edit) and set Context Length. New chats with that agent use it unless the chat overrides it.

Auto

Auto (server default) sends no value and lets Ollama decide. Ollama then uses OLLAMA_CONTEXT_LENGTH if you set it, or a default based on your available GPU memory.

Bigger isn't free

A larger context window uses more memory, and changing it makes Ollama reload the model. If the model no longer fits in GPU memory, it can run partly on the CPU and become much slower. Increase the length step by step and watch the token speed.


When the Window Is Full

When the ring turns amber or red:

  • Increase the Context Length, if your memory allows
  • Start a new chat and paste in only the summary you need
  • Attach smaller files, or only the relevant parts
  • With web search, lower Results per search to keep results compact

FAQ


Next Steps