# Ollama context overflows even though the model runs on a large GPU

**URL:** <https://community.openclaw.ai/t/ollama-context-overflows-even-though-the-model-runs-on-a-large-gpu/52>\
**Category:** Troubleshooting\
**Tags:** compaction, context, local-models, ollama, troubleshooting\
**Created:** [September 14, 2026, 10:30pm UTC](https://community.openclaw.ai/t/ollama-context-overflows-even-though-the-model-runs-on-a-large-gpu/52 "2026-09-14T22:30:53Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ArchivedMember](https://avatars.discourse-cdn.com/v4/letter/a/e56c9b/32.png) [@ArchivedMember](https://community.openclaw.ai/u/ArchivedMember)\
**Post date:** [September 14, 2026, 10:30pm UTC](https://community.openclaw.ai/t/ollama-context-overflows-even-though-the-model-runs-on-a-large-gpu/52/1 "2026-09-14T22:30:53Z")

</div>

> **Adapted community discussion:** Paraphrased and condensed from an anonymized public OpenClaw Discord support conversation from August 2026. Technical guidance was reviewed for OpenClaw 2026.9.3.

OpenClaw says my Ollama prompt is too large for the model. The client runs on a small laptop, but Ollama is on a separate server with a high-memory GPU. Which OpenClaw setting should I change?

---

<div class="post-metadata">

**Author:** ![OpenClawSupport](https://avatars.discourse-cdn.com/v4/letter/o/49beb7/32.png) [@OpenClawSupport](https://community.openclaw.ai/u/OpenClawSupport)\
**Post date:** [September 14, 2026, 10:30pm UTC](https://community.openclaw.ai/t/ollama-context-overflows-even-though-the-model-runs-on-a-large-gpu/52/2 "2026-09-14T22:30:53Z")

</div>

The laptop RAM is not the prompt limit. Ollama’s effective `num_ctx` on the model server is. Configure the provider model with a context size the model and server can really support, then set OpenClaw’s `contextTokens` below that value so there is room for system prompts, tools, and output. Use Ollama’s native base URL without `/v1`. Start a new session after changing the model context.

---

<div class="post-metadata">

**Author:** ![ArchivedMember](https://avatars.discourse-cdn.com/v4/letter/a/e56c9b/32.png) [@ArchivedMember](https://community.openclaw.ai/u/ArchivedMember)\
**Post date:** [September 14, 2026, 10:30pm UTC](https://community.openclaw.ai/t/ollama-context-overflows-even-though-the-model-runs-on-a-large-gpu/52/3 "2026-09-14T22:30:53Z")

</div>

What context size should I start with?

---

<div class="post-metadata">

**Author:** ![OpenClawSupport](https://avatars.discourse-cdn.com/v4/letter/o/49beb7/32.png) [@OpenClawSupport](https://community.openclaw.ai/u/OpenClawSupport)\
**Post date:** [September 14, 2026, 10:30pm UTC](https://community.openclaw.ai/t/ollama-context-overflows-even-though-the-model-runs-on-a-large-gpu/52/4 "2026-09-14T22:30:53Z")

</div>

Use the model’s reported native context and the server’s available memory as the ceiling. A practical starting pattern is to give Ollama the larger budget and keep OpenClaw several thousand tokens below it. For example, a server that comfortably supports 32,768 tokens might use an OpenClaw budget around 24,000, with a smaller recent-history target. Reduce it if the model spills out of GPU memory or becomes unstable; increase it only after measuring the server.
