---
title: "Use Qwen 3.8 27B locally with OpenClaw"
description: "Run Qwen 3.8 27B locally behind OpenClaw on your Mac: which quantization fits your RAM (24 GB vs 32 GB), how to tame its thinking mode, llama.cpp and Ollama setup, and the one-click route with HolaClaw."
updated: 2026-08-18
canonical: https://holaclaw.ai/docs/tutorials/use-qwen-3-8-27b-with-openclaw
---

Qwen 3.8 27B is Qwen's agent-focused open model, released on August 14, 2026. It's a 27B multimodal model with a 262K context window, published under Apache 2.0, and tuned for exactly the work an assistant does: planning, using tools, and reacting to feedback from its environment. **That's perfect for OpenClaw, and running it locally means no API key, no per-token bill, and no conversation ever leaving your Mac.**

OpenClaw itself never touches the weights: an inference engine serves the model over a local endpoint, and OpenClaw is a client of that endpoint. Wiring up Qwen 3.8 27B therefore has two halves: get an engine serving the model, then point OpenClaw at it.

This guide covers a path for every starting point: bringing your own inference server, Ollama, or [HolaClaw](/download), our native macOS app that runs OpenClaw in an isolated VM and manages the model for you.

## Before anything: pick your quantization

Qwen 3.8 27B ships in several quantizations: compressed builds of the same model at different precision. On a Mac, your unified memory decides which one you can run, and this guide refers to these two throughout:

| Your Mac | Build to use | Download |
|---|---|---|
| 32 GB or more | [`Q4_K_M`](https://huggingface.co/unsloth/Qwen3.8-27B-GGUF/blob/main/Qwen3.8-27B-Q4_K_M.gguf) | 18.0 GB |
| 24 GB | [`UD-Q3_K_XL`](https://huggingface.co/unsloth/Qwen3.8-27B-GGUF/blob/main/Qwen3.8-27B-UD-Q3_K_XL.gguf) | 14.4 GB |

The 4-bit `Q4_K_M` is the standard pick and what we recommend when your Mac fits it. The 3-bit `UD-Q3_K_XL` gives up some answer quality to bring the model to 24 GB machines; [our tests](/blog/qwen-3-8-27b-on-mac) measured how both builds perform.

## What you need

- **An Apple-silicon Mac (M-series).** Inference runs on the GPU through Metal; Intel Macs are out.
- **24 GB of unified memory as the floor.** That runs the 3-bit build. From 32 GB up, run the standard 4-bit build instead.
- **Roughly 25 GB of free disk.** Up to ~18 GB of weights, ~1 GB of vision projector, and room for OpenClaw plus whichever apps your chosen option installs.
- **Any M-series chip runs it.** On our test MacBook Airs (M3 and M4), generation lands between 3 and 6 tokens per second; chips with more memory bandwidth (Pro, Max, Ultra) are faster.
- **An existing OpenClaw install, for options A and B only.** Starting fresh? Jump straight to [If you are starting from zero](#if-you-are-starting-from-zero).

One more thing to know before you start: Qwen 3.8 27B is a **thinking model**. It reasons internally before answering, and the depth is adjustable (`low`, `medium`, `xhigh`), with a default of `xhigh` that thinks far too long for interactive use on local hardware. Every setup below turns the dial down.

## How to run OpenClaw with Qwen 3.8 27B?

Pick your route by where you're starting from:

- **OpenClaw is already running on your Mac.** Add an engine next to it: [Option A (Ollama)](#option-a-serve-it-with-ollama) if that app is already in your dock, or [Option B (Llama / llama.cpp)](#option-b-serve-it-with-llama-llamacpp) if you want the flags we test with and direct control of the reasoning level.
- **Nothing installed yet.** One step sets up both the agent and the model: [Option C (`ollama launch`)](#option-c-ollama-launch) on your bare Mac, or [Option D (HolaClaw)](#option-d-holaclaw) to keep the agent inside a VM.

## If you already run OpenClaw

### Option A: serve it with Ollama

1. **Install Ollama.** Download the application from [ollama.com](https://ollama.com) and open it.

2. **Pull the model.** Open a terminal and run:

   ```bash
   ollama pull qwen3.8:27b-mlx
   ```

3. **Raise the context length.** In Ollama's **Settings**, set **Context length** to **64k**. Out of the box it's far smaller, and an OpenClaw assistant starts at roughly 19K tokens of system prompt, tools, and skills before your first word. On a thinking model, the reasoning tokens pile on top of that.

4. **Leave Ollama running.** It's the server OpenClaw will talk to.

5. **Point OpenClaw at Ollama.** On the Mac where OpenClaw lives, run:

    ```bash
    openclaw onboard --non-interactive --accept-risk --skip-health \
      --auth-choice ollama \
      --custom-base-url "http://localhost:11434" \
      --custom-model-id "qwen3.8:27b-mlx"
    ```

    Running OpenClaw on a separate machine? Enable **Expose Ollama to the network** in Ollama's Settings first, then swap `localhost` for that Mac's address in `--custom-base-url`. The [Ollama provider page in the OpenClaw docs](https://docs.openclaw.ai/providers/ollama) covers the remaining knobs.

6. **Turn the thinking level down.** Qwen 3.8 defaults to its deepest thinking, minutes of silence before each reply on local hardware. OpenClaw can lower it per model: in `openclaw.json` (typically at `~/.openclaw/openclaw.json`), set `params.thinking` on the model's entry under the Ollama provider:

    ```json
    {
      "models": {
        "providers": {
          "ollama": {
            "models": [
              {
                "id": "qwen3.8:27b-mlx",
                "name": "Qwen 3.8 27B",
                "input": ["text", "image"],
                "params": { "thinking": "low" }
              }
            ]
          }
        }
      }
    }
    ```

    OpenClaw forwards the level to Ollama with each request. Use `medium` on a 32 GB Mac and `low` on 24 GB, the same levels as the rest of this guide.

7. **Check it works.** Send a message and give it a moment: with a thinking model, the silence before the reply is reasoning being generated, not a hang.

### Option B: serve it with Llama (llama.cpp)

Llama wraps the llama.cpp engine in a native Mac app. It asks more of you than Ollama, but you set every flag yourself, including the reasoning level. It's also the engine our published numbers come from.

1. **Install Llama.** Grab it from [llama.app](https://llama.app) or `brew install --cask llama-app`.

2. **Pull the model and serve it.** Pick the build for your RAM from the table above. For a 32 GB Mac:

    ```bash
    llama serve -hf unsloth/Qwen3.8-27B-GGUF:Q4_K_M \
      -ngl 99 \
      -c 65536 \
      --flash-attn on -b 2048 -ub 512 \
      --cache-type-k q4_0 --cache-type-v q4_0 \
      --load-mode mlock --keep 512 \
      --jinja \
      --reasoning on --reasoning-effort medium \
      --port 8080
    ```

    For a 24 GB Mac, use the 3-bit build:

    ```bash
    llama serve -hf unsloth/Qwen3.8-27B-GGUF:UD-Q3_K_XL \
      -ngl 99 \
      -c 65536 \
      --flash-attn on -b 2048 -ub 512 \
      --cache-type-k q4_0 --cache-type-v q4_0 \
      --load-mode mlock --keep 512 \
      --jinja \
      --reasoning on --reasoning-effort low \
      --port 8080
    ```

   `-c` is the context length, and it's the setting that decides whether the model fits: bigger context means more memory. The `--cache-type` flags quantize the context cache to 4-bit, the same setting HolaClaw serves with to keep the 64K context affordable in memory.

   `--reasoning-effort` caps how deeply the model thinks. Left at its default (`xhigh`), you'll wait through minutes of reasoning on local hardware before answers start. We recommend `medium` for the 4-bit build and `low` for the 3-bit build, the levels HolaClaw ships.

3. **Leave that terminal open.** The server it started is what OpenClaw connects to.

4. **Register the server as a provider in OpenClaw.** Llama speaks the OpenAI-compatible API, so it slots in as a custom provider via `openclaw.json` (typically at `~/.openclaw/openclaw.json`). A starting point to adapt:

   ```json
   {
     "agents": {
       "defaults": {
         "model": { "primary": "local/qwen3.8-27b" }
       }
     },
     "models": {
       "mode": "merge",
       "providers": {
         "local": {
           "baseUrl": "http://127.0.0.1:8080/v1",
           "apiKey": "sk-local",
           "api": "openai-completions",
           "timeoutSeconds": 300,
           "models": [
             {
               "id": "qwen3.8-27b",
               "name": "Qwen 3.8 27B",
               "reasoning": true,
               "input": ["text", "image"],
               "cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0 },
               "contextWindow": 65536,
               "maxTokens": 8192
             }
           ]
         }
       }
     }
   }
   ```

    Serving from another machine? Point `baseUrl` at its address instead of `127.0.0.1`.

5. **Check it works.** Restart OpenClaw and send a first message. Thinking happens before the reply, so a pause up front is the model working, not stalling.

### If something doesn't work

- **Loading fails, or your Mac grinds and swaps.** The weights-plus-context total doesn't fit your memory: lower `-c` and retry. Still swapping on 24 GB even at a small context? You're on the wrong build: switch from the 4-bit to the 3-bit.
- **Replies take ages to start, then arrive all at once.** That's thinking, not a hang. Check the reasoning effort is set as shown above and not left at the model's `xhigh` default.
- **Replies come back empty.** Some clients read only the `content` field, and a thinking model's answer can land in `reasoning_content` depending on server flags. Update the serving flags rather than the client.
- **Tool calls fail or print raw `<tool_call>` markers into the chat.** The template-derived parser isn't matching. Make sure you're serving with `--jinja` so the model's own chat template is used.
- **The conversation degrades or dies after a few turns.** You've run out of the context you served: history, tool definitions, and thinking tokens all count against `-c`. Open a fresh conversation, or serve a bigger context if your memory allows it. Thinking models hit this sooner than others, which is another reason to keep the reasoning effort low.
- **OpenClaw can't reach the endpoint.** `curl http://127.0.0.1:8080/v1/models` tells you whether the server is actually up; if it is, look for a port conflict or a wrong `baseUrl`.

## If you are starting from zero

No OpenClaw yet? Two routes go from a blank Mac to a working assistant in one step.

### Option C: Ollama Launch

Ollama's [OpenClaw integration](https://docs.ollama.com/integrations/openclaw) bundles the whole setup into a single command: `ollama launch` installs OpenClaw and pre-wires the provider and model.

1. **Install Ollama.** Download the application from [ollama.com](https://ollama.com) and open it.

2. **Launch OpenClaw with Qwen 3.8 27B.** Open a terminal and run:

   ```bash
   ollama launch openclaw --model qwen3.8:27b-mlx
   ```

3. **Read the security notice and accept it.** On first launch Ollama walks you through the risks and asks for an explicit acknowledgement.

4. **Turn the thinking level down.** Qwen 3.8 defaults to its deepest thinking, minutes of silence before each reply on local hardware. Lower it in the `openclaw.json` the launch created (typically at `~/.openclaw/openclaw.json`) by setting `params.thinking` on the model's entry under the Ollama provider, with `medium` on a 32 GB Mac and `low` on 24 GB:

   ```json
   {
     "models": {
       "providers": {
         "ollama": {
           "models": [
             {
               "id": "qwen3.8:27b-mlx",
               "name": "Qwen 3.8 27B",
               "input": ["text", "image"],
               "params": { "thinking": "low" }
             }
           ]
         }
       }
     }
   }
   ```

5. **Check it works.** Send a message; the first reply follows the model's thinking pass.

This route installs OpenClaw directly on your Mac, running with your user's permissions. It's the most straightforward setup, but it comes with security concerns: the agent has the same access to your files that you have. If you'd rather keep the agent isolated, the next option runs it inside a virtual machine.

### Option D: HolaClaw

HolaClaw is our Mac app. OpenClaw lives inside an isolated virtual machine with secure defaults, so the agent never touches your files directly. The model download, the inference server, updates, and backups are all handled for you: no account, no terminal.

Qwen 3.8 27B ships in the local model catalog from [HolaClaw 1.6.0](/changelog) as two entries, one per quantization. Pick the one matching your Mac's memory from the table at the top. HolaClaw also picks the reasoning depth for you: the level we measured to keep answers fast on consumer hardware, shipped as part of the catalog.

1. **Install HolaClaw** from the [download page](/download) and open it.

2. **Click Get Started** to begin the Create Assistant flow.

3. **Choose your Qwen 3.8 entry.** In **Step 2 · Model provider**, pick **Local**: you'll see both Qwen 3.8 27B entries, each row showing its download size and the memory it needs. Match the entry to your Mac's RAM using the table at the top of this guide.

4. **Complete the flow.** The weights download on first use. At 14 to 18 GB, budget some time for that initial run.

5. **Start chatting.** The inference server starts and stops with your assistant; there's nothing to keep open.

[Download HolaClaw](/download) to try it.

## Questions people ask

**Can I run Qwen 3.8 27B on a 16 GB Mac?**
No. Even the 3-bit build leaves no room for the context an OpenClaw assistant needs once the OS has taken its share of 16 GB. The [local models guide](/docs/ai-providers/local-models) shows which smaller models serve that tier well.

**Can I run it on a 24 GB Mac?**
Yes, that's what the `UD-Q3_K_XL` build is for. You give up some answer quality against the 4-bit build; in [our tests](/blog/qwen-3-8-27b-on-mac) it was also the faster of the two builds.

**What's "thinking", and do I want it?**
Qwen 3.8 reasons internally before answering, which improves hard-task results but delays every reply, and its default depth is the slowest setting. On local hardware you want it turned down (or off): follow the reasoning-effort settings in this guide, or use HolaClaw, which ships the level we measured.

**Can it see images?**
Yes. Qwen 3.8 27B is multimodal, and HolaClaw serves it with vision enabled. If you self-serve with llama.cpp, add the `mmproj-F16.gguf` projector file from the same repository.

**Does it work offline?**
Yes. After the one-time weight download, nothing needs the network: inference, tool calls, images, all of it happens on your Mac.

**Is it free?**
Yes. The model is Apache 2.0-licensed open weights; the only cost of running it is your own electricity.

## Related

- [Qwen 3.8 27B on your Mac: 24 GB or 32 GB?](/blog/qwen-3-8-27b-on-mac): the tests this guide's recommendations come from.
- [Which local models can run OpenClaw on your Mac? We tested 6](/blog/running-openclaw-with-local-models): where the Qwen family sits among the models we tested.
- [Local models](/docs/ai-providers/local-models): everything in HolaClaw's local catalog.
- [Choosing an AI provider](/docs/ai-providers/choosing-a-provider): weighing local against the cloud.

Got Qwen 3.8 27B running on hardware we haven't covered? Bring your numbers to our [Discord](https://discord.gg/FbxAbS5sGQ): the build, the context size, and the tokens per second all help the next person choose.

