OpenClaw needs a local model that can call tools and hold a long conversation, and the second part decides your GPU. It asks Ollama for 32,768 tokens by default, Ollama recommends at least 64k for local models, and OpenClaw's own system prompt and tool schemas took about 17,600 tokens before the first message in its documented example.
How much context OpenClaw actually uses
OpenClaw's /context example shows the system prompt at 9,603 tokens and the tool schemas at 7,997, in a 32,000-token window. That is more than half of a 32k window spent before you type, which is why the defaults most runtimes ship with fail. With local models OpenClaw turns on Tool Search, which holds tool schemas back until they are needed, so real use can be lower than the example.
- The hard floor: "It warns below 20% with an 8k floor. It hard-blocks below 10% with a 4k floor." (source)
- Local models found automatically: "An existing LLM is offered automatically only when LM Studio reports tool training and at least 16K of effective context." (source)
- What it asks Ollama for: "Local discovery normally caps contextTokens at 32,768 (or the model's smaller native window)" (source)
- Ollama's advice for OpenClaw: "It is recommended to use a context window of at least 64k tokens if using local models." (source)
The "Minimum is 16000" error people still quote is out of date. It came from OpenClaw v2026.4.15 (issue); since April 2026 the floor is relative to the model's window, with the 4k and 8k floors above. Hermes Agent is stricter: it rejects any model under 64,000 tokens at startup.
The best model for OpenClaw on your GPU
Tool-calling models only, at Q4_K_M, with the context in the column. The pick follows the same rule as the GPU pages, with the context already counted: a model that fits with that context and runs at a speed you can work with, then the biggest class that qualifies, then the newest release. A pick near 95% of memory leaves no room to grow past the column's context. The model's native window has to cover the context too, so a model that tops out at 40k never appears in the 64k column.
| Machine | Usable | At 32k context | At 64k context | |
|---|---|---|---|---|
| RTX 5070 | 12 GB | Gemma 4 12B 8.6 GB · 68 tok/s | Gemma 4 12B 9.1 GB · 68 tok/s | check |
| RTX 5080 | 16 GB | Gemma 4 12B 8.6 GB · 97 tok/s | Gemma 4 12B 9.1 GB · 97 tok/s | check |
| RX 7900 XT | 20 GB | Muse Glimmer 30B 19 GB · 32 tok/s | Gemma 4 12B 9.1 GB · 80 tok/s | check |
| RTX 4090 | 24 GB | Muse Glimmer 30B 19 GB · 41 tok/s | Muse Glimmer 30B 19.4 GB · 41 tok/s | check |
| RTX 5090 | 32 GB | Muse Glimmer 30B 19 GB · 73 tok/s | Muse Glimmer 30B 19.4 GB · 73 tok/s | check |
| RTX PRO 5000 Blackwell | 48 GB | Muse Glimmer 30B 19 GB · 54 tok/s | Muse Glimmer 30B 19.4 GB · 54 tok/s | check |
| H100 SXM | 80 GB | Llama 3.3 70B 53.8 GB · 57 tok/s | Llama 3.3 70B 64.6 GB · 57 tok/s | check |
| RTX PRO 6000 Blackwell | 96 GB | Llama 3.3 70B 53.8 GB · 31 tok/s | Llama 3.3 70B 64.6 GB · 31 tok/s | check |
| RTX Spark | 102 GB | Mistral Small 4 119B (MoE) 73 GB · 56 tok/s | Mistral Small 4 119B (MoE) 73.8 GB · 56 tok/s | check |
| DGX Spark | 126 GB | Mistral Small 4 119B (MoE) 73 GB · 51 tok/s | Mistral Small 4 119B (MoE) 73.8 GB · 51 tok/s | check |
| Mac Studio M2 Ultra | 144 GB | Muse Glimmer 30B 19 GB · 32 tok/s | Muse Glimmer 30B 19.4 GB · 32 tok/s | check |
Speeds are single-stream ceilings from memory bandwidth, the same formula as the speed estimator; an agent also spends time reading its long prompt, which this does not count and which is slow on Apple silicon. "Check" opens the checker on that card, that model and 64k of context, so you can try a different model or quantisation.
The smallest machine here that runs a tool-calling model at 64k is an RTX 5070, with Gemma 4 12B.
What 64k of context costs in memory
Going from 32k to 64k of context doubles the KV cache of every layer that keeps every token, while sliding-window layers stop at their window and linear-attention layers keep a fixed state. So what 64k costs depends on the model's attention design far more than its size. The memory below is the cache alone, at FP16, on top of the weights.
| Model | Cache at 32k | Cache at 64k | Total at 64k, Q4 |
|---|---|---|---|
| Qwen3.5 4B | 1.1 GB | 2.2 GB | 5.5 GB |
| Qwen3.5 9B | 1.1 GB | 2.2 GB | 8.5 GB |
| Gemma 4 12B | 0.9 GB | 1.4 GB | 9.1 GB |
| Llama 3.2 3B | 3.8 GB | 7.5 GB | 9.9 GB |
| Llama 3.1 8B | 4.3 GB | 8.6 GB | 13.9 GB |
| gpt-oss 20B | 0.8 GB | 1.6 GB | 14.8 GB |
| Granite 4.2 8B | 5.4 GB | 10.7 GB | 16.5 GB |
| Gemma 4 26B-A4B (MoE) | 0.9 GB | 1.6 GB | 17.6 GB |
| Muse Glimmer 30B | 0.5 GB | 1 GB | 19.4 GB |
| Ministral 3 14B | 5.4 GB | 10.7 GB | 19.7 GB |
| Nemotron 3.5 Lightning 30B-A3B (MoE) | 0.3 GB | 0.5 GB | 20 GB |
| Qwen3.6 27B | 2.3 GB | 4.4 GB | 21.7 GB |
| Qwen3.8 27B | 2.3 GB | 4.4 GB | 21.7 GB |
| GLM-4.7 Flash 30B-A3B (MoE) | 1.8 GB | 3.5 GB | 22.9 GB |
| Qwen3.6 35B-A3B (MoE) | 0.7 GB | 1.4 GB | 23.6 GB |
| Gemma 4 31B | 3.5 GB | 6.2 GB | 25.6 GB |
| Devstral Small 2 24B | 5.4 GB | 10.7 GB | 25.7 GB |
| Granite 4.2 30B | 8.6 GB | 17.2 GB | 35.4 GB |
The spread is the reason the right model for an agent is not simply the largest one that loads: at 64k, Nemotron 3.5 Lightning 30B-A3B (MoE)'s cache is 0.5 GB and Granite 4.2 30B's is 17.2 GB. Models with hybrid or sliding-window attention keep most layers out of the cache, which is exactly what an agent's long context needs. Quantising the cache to Q8 roughly halves these figures, and the checker has a switch for it.
Which models can call tools
An agent sends tool definitions with every request. A model can only use them if its chat template passes them through, so this site read each model's official template. 27 of the 34 models tracked here do; these do not:
- Gemma 3 12B: Google says it supports function calling, but its template ignores the tools parameter. (template)
- Phi-4 14B: no tool handling in its template, and no claim on its card (template)
- Mistral Small 3.1 24B: Tool calling works through Mistral's own tokenizer mode in vLLM; the repo's template drops tools. (template)
- Gemma 3 27B: Google says it supports function calling, but its template ignores the tools parameter. (template)
- DeepSeek-R1 Distill Qwen 32B: Its template drops tool definitions, so the model never sees them. (template)
- DeepSeek-R1 Distill Llama 70B: Its template drops tool definitions, so the model never sees them. (template)
Among the ones that do, a few need care:
- Llama 3.2 3B: Tool calling is in the Instruct release; the base model has no chat template.
- Llama 3.1 8B: Tool calling is in the Instruct release; the base model has no chat template.
- Qwen3.5 9B: Qwen advises keeping at least 128K of context to preserve its thinking.
- Gemma 4 12B: Thinking is off by default in the template.
- Ministral 3 14B: Mistral advises keeping the set of tools small, and OpenClaw sends a large one.
- gpt-oss 20B: It must run with OpenAI's harmony format; the card says it will not work correctly otherwise.
- Gemma 4 26B-A4B (MoE): Thinking is off by default in the template.
- Qwen3.6 27B: Qwen advises keeping at least 128K of context to preserve its thinking.
- GLM-4.7 Flash 30B-A3B (MoE): Z.ai recommends turning on Preserved Thinking for multi-turn agent tasks.
- Nemotron 3.5 Lightning 30B-A3B (MoE): NVIDIA documents an extra template flag for coding agents.
- Qwen3.6 35B-A3B (MoE): Qwen advises keeping at least 128K of context to preserve its thinking.
- Qwen3-Coder-Next 80B-A3B (MoE): Non-thinking only.
- gpt-oss 120B: It must run with OpenAI's harmony format.
Setting the context in Ollama and LM Studio
Ollama's own default depends on your card: "Ollama defaults to the following context lengths based on VRAM: < 24 GiB VRAM: 4k context; 24-48 GiB VRAM: 32k context; >= 48 GiB VRAM: 256k context". Under 24 GB that is 4k, far too little for an agent. OpenClaw sends its own context size (32,768, or the model's smaller native window) with every request on Ollama's native endpoint, so with OpenClaw you mostly do not have to; set a larger value in OpenClaw's provider config if your card has room for 64k. OpenClaw loads LM Studio models at 64,000 tokens, capped at the model's maximum. Hermes Agent cannot set it, so raise Ollama's context length on the Ollama side before you start it.
Use Ollama's native URL, not its /v1 OpenAI-compatible one: OpenClaw's docs say the /v1 path breaks tool calling.
Questions
How much VRAM does OpenClaw need?
It depends on the context, more than on OpenClaw. OpenClaw asks Ollama for 32,768 tokens by default and Ollama recommends at least 64k for local models. At 64k and Q4, the best tool-calling model on a 16 GB card is Gemma 4 12B (9.1 GB at Q4, 97 tok/s), and on a 24 GB card Muse Glimmer 30B (19.4 GB at Q4, 41 tok/s).
What is the best local model for OpenClaw on 12 GB?
At 32k of context, Gemma 4 12B (8.6 GB at Q4, 68 tok/s). At 64k, Gemma 4 12B (9.1 GB at Q4, 68 tok/s).
What is the best local model for OpenClaw on 16 GB?
At 64k of context, Gemma 4 12B (9.1 GB at Q4, 97 tok/s); at 32k, Gemma 4 12B (8.6 GB at Q4, 97 tok/s).
What is the best local model for OpenClaw on 24 GB?
At 64k of context, Muse Glimmer 30B (19.4 GB at Q4, 41 tok/s); at 32k, Muse Glimmer 30B (19 GB at Q4, 41 tok/s).
How much context does OpenClaw need?
Its own floor is low: it refuses a model below 4k tokens (or 10% of the model's window) and warns below 8k (or 20%). In practice its system prompt and tool schemas took about 17,600 tokens in its documented example, before the first message, so 32k is the working minimum and Ollama recommends 64k. The old "Minimum is 16000" error came from v2026.4.15 and was removed in April 2026.
How much context does Hermes Agent need?
At least 64,000 tokens: Hermes Agent rejects a model with a smaller window at startup. Hermes talks to Ollama through its OpenAI-compatible endpoint and cannot set the context itself, so raise Ollama's context length on the Ollama side.
Which local models support tool calling?
Of the 34 open models tracked here, 27 pass tools through their official chat template. Gemma 3 12B, Phi-4 14B, Mistral Small 3.1 24B, Gemma 3 27B, DeepSeek-R1 Distill Qwen 32B, DeepSeek-R1 Distill Llama 70B do not: their templates either drop tool definitions or ignore them, so an agent cannot rely on them.
- OpenClaw: its docs on context, local models and Ollama, and its source at v2026.9.7, read 2026-10-02.
- Ollama: context length and the OpenClaw integration page. Hermes Agent: quickstart.
- Tool calling: each model's official chat template and model card, linked above, read 2026-10-02.
- Memory and speed: the formulas in the VRAM calculator and the speed estimator, on each model's config.json and each maker's specification.