Running models locally means no API keys, no usage bills, and no sending proprietary code to someone else’s servers. It also means slower responses and lower quality on hard problems. Whether that tradeoff makes sense depends on what you’re doing.

For a new setup, compare Qwen3.8 27B, Muse Glimmer 30B, and Qwen3 Coder 30B on a workstation. Test Gemma 4 E4B or Qwen3 8B on smaller machines. Keep a cloud fallback for tasks local inference cannot finish.

Model listings were checked on October 14, 2026. The Qwen3.8 and Muse Glimmer downloads are about 18GB before context and runtime overhead. Those sizes are not a promise that every long-context session fits a 24GB card.

Model rankings

These are current candidates grouped by the work and memory budget they fit. They have not passed a new common OpenClaw benchmark, so the table does not transfer older scores or speed measurements onto newer models.

ModelOllama tagWorkload to testMemory note
Qwen3.8 27Bqwen3.8:27bCoding and reasoning with toolsAbout 18GB download plus context/runtime
Muse Glimmer 30Bmuse-glimmer:30bAgent loops and failure recoveryAbout 18GB download plus context/runtime
Qwen3 Coder 30Bqwen3-coder:30bCoding-focused local baselineCheck exact quantization and context
Qwen3 Coder Nextqwen3-coder-nextLarger-memory coding workflowsAbout 52GB default download plus overhead
gpt-oss 20Bgpt-oss:20bSmaller reasoning tasksAbout 14GB download; 16GB can be tight
Gemma 4 E4Bgemma4:e4bLightweight code helpSmaller-machine candidate
Qwen3 8Bqwen3:8bSmall edits and explanationsShort context on limited hardware

Qwen3.6 27B remains an older baseline if you already have a working setup. Compare current candidates on the same routine task, tool sequence, and recovery case before changing the default. MoE active-parameter counts describe computation; all expert weights still need storage.

Hardware requirements

Model weights, context state, and runtime buffers all consume memory. The working requirement depends on quantization, context size, and what else runs on the machine.

8–16GB VRAM (entry level)

Start with Gemma 4 E4B or Qwen3 8B. A gpt-oss:20b download is approximately 14GB and can be tight on 16GB hardware once the session grows. Use a short context and check actual allocation before leaving the agent running.

A 24GB or 32GB GPU, or a 32GB+ unified-memory machine, can be a starting point for Qwen3.8 27B, Muse Glimmer 30B, or Qwen3 Coder 30B. Keep context bounded until you measure fit. Unified memory also serves the operating system and other applications.

48GB+ effective memory (premium)

For Qwen3 Coder Next, budget for the approximately 52GB default download plus runtime overhead. A 48GB card alone is insufficient for that build entirely in VRAM. Larger-memory machines or another verified quantization may work, but measure speed as well as fit.

Setting up Ollama

Ollama is the simplest way to run local models. Install it, pull a model, and you have an OpenAI-compatible API running on localhost.

# Install
curl -fsSL https://ollama.com/install.sh | sh

# Pull a model (pick one based on your hardware)
ollama pull qwen3.8:27b
ollama pull muse-glimmer:30b
ollama pull gemma4:e4b
ollama pull qwen3:8b

Ollama serves an API at http://localhost:11434 by default.

Tip from r/LocalLLaMA: Several users report better performance switching from Ollama to llama.cpp directly for the 27B and larger models. Ollama adds convenience, but llama.cpp gives you more control over quantization and memory allocation. Start with Ollama — switch to llama.cpp if you hit performance walls.

OpenClaw configuration

Since Ollama is now an official provider, the setup is straightforward. Run the onboarding wizard:

openclaw onboard --auth-choice ollama

Or add Ollama manually in ~/.openclaw/openclaw.json:

{
  models: {
    providers: {
      ollama: {
        baseUrl: "http://localhost:11434/v1",
        api: "openai-completions",
        models: [
          {
            id: "qwen3.8:27b",
            name: "Qwen3.8 27B",
            reasoning: false,
            contextWindow: 32768,
            maxTokens: 8192
          }
        ]
      }
    }
  },
  agents: {
    defaults: {
      model: { primary: "ollama/qwen3.8:27b" },
      models: {
        "ollama/qwen3.8:27b": { alias: "qwen-local" }
      }
    }
  }
}

Switch to your local model:

/model qwen-local

What local models handle well

Test these jobs first:

  • Code explanation and navigation. Ask the model to find an implementation, trace a call, and cite the relevant files.
  • Small edits and test drafts. Review the patch, run tests, and count retries.
  • Tool sequences. Check schema compliance and recovery when a command fails.

Where local models fall short

  • Long changes. A larger context window does not guarantee the model will preserve every constraint across many tool turns.
  • Difficult debugging. Compare local output with a stronger cloud candidate when the model repeats a failed approach.
  • Latency and memory pressure. Dense and MoE models behave differently on the same hardware. Measure your exact build instead of copying an older tokens-per-second figure.
  • Very long contexts. Advertised context capacity and practical working memory are separate limits. Start with a bounded context and increase it only after checking allocation.

The hybrid approach

Most people who try local models end up with a hybrid setup: local for the cheap stuff, cloud for the hard stuff.

{
  agents: {
    defaults: {
      model: {
        primary: "ollama/qwen3.8:27b",
        thinking: "anthropic/claude-sonnet-5-5"
      }
    }
  }
}

Use the local model for tasks it finishes reliably and switch to a stronger cloud model for failures. The useful split depends on your workload; measure the completed-task bill instead of assuming a fixed savings percentage.

Switch manually when you know a task needs more capability:

/model sonnet

Or use Haimaker’s auto-router to handle the routing for you. The auto-router detects task complexity and sends hard problems to cloud models automatically, so you don’t have to think about when to switch.

Troubleshooting

Model loads slowly or crashes. Inspect actual memory use, shorten context, or choose a smaller verified build. Pull tags exactly as listed in the Ollama library; do not assume a quantization name exists for every model.

Tool calls fail. Confirm the selected build supports tools and that your agent sends the expected schema. Update the runtime if needed, then test a short tool sequence before enabling unattended work.

Context window errors. Keep the agent’s configured window within the model’s supported window and the machine’s working-memory budget. The 32K example above is a starting point, not a guaranteed fit on every device.

Slow generation. Check whether the model is fully GPU-resident, whether other applications compete for memory, and whether the intended backend is active. Record prompt-processing and generation time separately.

TRY HAIMAKER FOR CLOUD ROUTING


For model pricing comparisons, see cheapest models for OpenClaw. For reducing token costs on cloud models, see cutting costs by 96% with QMD.