You acquire the Mac Mini for Openclaw. Good.
late, Anthropic has pushed OpenClaw customers towards its pay-per-token API1, turning what was as soon as a one-time {hardware} buy into an (giant) ongoing expense2. Even in the event you use OpenAI, you’re nonetheless going to be paying fairly a bit month-to-month.
💵💵 Working an area mannequin eliminates the month-to-month value in your OpenClaw brokers, fully. 💵💵
Nonetheless, getting all the things put in and configured might be complicated, particularly in the event you’re new to native LLMs.
On this article, I’ll present you the way to arrange an area LLM (in probably the most pain-free method) in your Mac Mini that may energy your agent at no cost.
You need to use it even in the event you’re a newbie.
🤨 “I’ve heard that native LLMs don’t work as properly, is that true?”
A neighborhood LLM (correctly arrange) will carry out virtually indistinguishably for duties like emails, calendar administration, reminders, dwelling IoT automation and fundamental web analysis (stuff you really do with OpenClaw).
If you must do one thing extra superior, like utilizing OpenClaw for software program engineering, there’s a hyperlink on the backside which highlights the way to arrange a fallback mannequin.
⚠️Notice: This information isn’t a full OpenClaw tutorial.
It’s meant that can assist you get your native LLM up and working together with your agent(s) as rapidly as doable.
{Hardware}
This text was examined on a Mac Mini with the next specs
| OS | macOS Tahoe |
| Model | 26.3.1 |
| Processor | M2 |
| Cores | 8 |
| Unified Reminiscence | 24GB |
In case you’re fascinated about shopping for a Mac Mini, I’d advocate at the very least an M2+ processor with at the very least 24GB of RAM. You may get away with 16GB, nevertheless, issues will probably be fairly tight and also you may run into errors with bigger contexts.
Setting issues up
First, set up OpenClaw utilizing the official information. In case you’ve already performed this, skip this step.
1. Set up llama.cpp
We’re going to skip utilizing Ollama (the really helpful native supplier), and go for llama.cpp. Through the use of a quantized mannequin together with llama.cpp, we are able to velocity up inference by as a lot as 70%
We have to construct llama.cpp from the supply with steel flags on and cuda off. This handles a few of the optimizations wanted to run the mannequin in your Mac at full velocity. Merely comply with the steps under.
1️⃣ First, from your property listing, set up some conditions utilizing brew.
# paste this into your terminal
$ brew set up cmake curl
2️⃣ Then, construct llama.cpp with the suitable flags
# Clone llama.cpp
git clone https://github.com/ggml-org/llama.cpp
# Configure construct with Metallic acceleration
cmake llama.cpp -B llama.cpp/construct
-DBUILD_SHARED_LIBS=OFF
-DGGML_METAL=ON
-DGGML_CUDA=OFF
# Construct
cmake --build llama.cpp/construct
--config Launch
-j$(sysctl -n hw.ncpu)
--clean-first
--target llama-cli llama-mtmd-cli llama-server llama-gguf-split
Now, we’ve got llama.cpp accessible to make use of
2. Obtain the native LLM
As talked about, the important thing to getting good efficiency from an area mannequin is quantization.
Quantizing permits us to make use of a bigger, extra succesful mannequin, “compressed” intelligently in order that it matches on smaller {hardware}. This enables the quantized mannequin to retain a lot of the efficiency of its full-size supply mannequin.
Until you’ve a big GPU or Mac with the utmost quantity of unified reminiscence (80GB+ VRAM) quantizing is a should
Blindly following the OpenClaw documentation whereas making an attempt to make use of a quantized mannequin will go away you confused and pissed off.
There may be merely no information accessible which clearly outlines the way to make quantized fashions work with brokers.
Beneath is a examined recipe that may work in your agent.
Mannequin Alternative: Qwen 3.5-9B
Right here we’re utilizing Qwen 3.5 (the 9B parameter model).
As of June 2026, it’s a prime performer for native fashions, edging out Gemma 4-12B. This may match on each a 16GB or 24GB Mac with a complete of 6-8GB of RAM required. Customers additionally rank this extremely for OpenClaw.
Additionally keep in mind that brokers require longer contexts, which is able to stop us from working a bigger 27B model, even with quantization.
1️⃣ Let’s obtain the mannequin
# obtain mannequin
curl -L -o fashions/Qwen3.5-9B-UD-Q4_K_KL.gguf
"https://huggingface.co/unsloth/Qwen3.5-9B-MTP-GGUF/resolve/important/Qwen3.5-9B-UD-Q4_K_XL.gguf?obtain=true"
2️⃣ Obtain the template, put it aside to templates.
mkdir templates &&
curl -o templates/qwen35.jinja
"https://huggingface.co/froggeric/Qwen-Mounted-Chat-Templates/resolve/important/chat_template.jinja"
Vital, you need to use an agent appropriate template for OpenClaw. With out this step, nothing will work.
3. Begin llama-server
Llama-server will function our backend API. OpenClaw will use this webservice as a substitute of calling the API from OpenAI or Anthropic instantly.
We put in llama-server already, and downloaded our mannequin. Let’s run a fast check.
1️⃣ Run a fast check
./llama.cpp/llama-server
-m fashions/Qwen3.5-9B-UD-Q4_K_XL.gguf
--chat-template-file templates/qwen35.jinja
--temp 0.7
--top-p 0.9
--top-k 20
-c 64000
-ngl 20
--host 127.0.0.1
--port 8080
It’s best to see one thing like so (with out errors)
srv llama_server: mannequin loaded
llama_server: server is listening on http://127.0.0.1:8080
update_slots: all slots are idle
2️⃣ Now, lets write a launchd daemon, so your native LLM server begins robotically and stays accessible after reboot. In case you’re acquainted with Linux, launchd is actually systemd for macOS
Save the next as /Library/LaunchDaemons/com.openclaw.llama-server.plist. You will have to make use of sudo for this.
Increase this for the plist file
❗Be certain that you substitute YOUR_USERNAME together with your precise username within the xml.
Label
com.openclaw.llama-server
UserName
YOUR_USERNAME
ProgramArguments
/Customers/YOUR_USERNAME/llama.cpp/llama-server
-m
/Customers/YOUR_USERNAME/fashions/Qwen3.5-9B-UD-Q4_K_XL.gguf
--chat-template-file
/Customers/YOUR_USERNAME/templates/qwen35.jinja
--temp
0.7
--top-p
0.9
--top-k
20
-c
64000
-ngl
20
--host
127.0.0.1
--port
8080
WorkingDirectory
/Customers/YOUR_USERNAME
RunAtLoad
KeepAlive
StandardOutPath
/tmp/llama-server.log
StandardErrorPath
/tmp/llama-server.err
Now, allow it.
sudo chown root:wheel /Library/LaunchDaemons/com.openclaw.llama-server.plist &&
sudo chmod 644 /Library/LaunchDaemons/com.openclaw.llama-server.plist &&
sudo launchctl bootstrap system /Library/LaunchDaemons/com.openclaw.llama-server.plist
We will examine to see if the service is working appropriately by tailing our log file
tail -f /tmp/llama-server.err
Now we’ve got each our native LLM loaded, working efficiently as a daemon. All we have to do now’s reconfigure OpenClaw.
4. Reconfigure OpenClaw to make use of the native mannequin
We now want so as to add this native mannequin to our OpenClaw config so it’s useable by our gateway.
1️⃣ Add to the “fashions” block in .openclaw/openclaw.json
{
"fashions": {
"suppliers": {
"native": {
"baseUrl": "http://127.0.0.1:8080/v1",
"apiKey": "sk-local",
"api": "openai-completions",
"fashions": [
{
"id": "qwen3-9b",
"name": "Qwen3.5 9B Local",
"contextWindow": 64000,
"maxTokens": 8192
}
]
}
/* REMOVE THIS COMMENT */
/* chances are you'll add further suppliers, like anthropic right here */
}
}
}
Notice: the settings for
contextWindowandmaxTokenscould must be adjusted in your particular workflows
You’ll additionally have to set the default mannequin in your brokers
"brokers": {
"defaults": {
"mannequin": {
"main": "native/qwen3-9b"
},
"fashions": {
"native/qwen3-9b": {}
}
}
It’s additionally useful to confirm the config is correct, run this command under to examine the syntax
openclaw config validate
2️⃣ Restart the gateway, making certain that the native mannequin is now accessible
openclaw gateway restart
3️⃣ Check to see if OpenClaw has correctly registered our native mannequin
openclaw fashions listing --provider native
We will additionally run a easy inference name
openclaw infer mannequin run
--model native/qwen3-9b
--prompt "Reply with precisely: pong"
--json
It’s best to obtain a JSON object in return. Vital: confirm that you simply wouldn’t have any leaked tags within the response. You shouldn’t, however that is doubly essential for safety
{
"okay": true,
"functionality": "mannequin.run",
"transport": "native",
"supplier": "native",
"mannequin": "qwen3-9b",
"makes an attempt": [],
"outputs": [
{
"text": "pong",
"mediaUrl": null
}
]
}
We’ve now verified all of the plumbing works appropriately. To be fully certain (or if that is your first agent), let’s arrange a pattern talent, and make sure that the mannequin appropriately causes and performs device calling as anticipated
5. Confirm performance with a check talent
Let’s create a check ‘python-calc’ talent, that may permit us to check whether or not our native mannequin can appropriately purpose and output device calls.
1️⃣ Run this to create the talent. This may add this device for all your openclaw brokers.
mkdir -p ~/.openclaw/workspace/expertise/python-calc
cat << 'EOF' > ~/.openclaw/workspace/expertise/python-calc/SKILL.md
---
title: python-calc
description: A device that evaluates mathematical expressions by executing a Python one-liner.
model: 1.0.0
---
## Directions
1. Extract the precise mathematical expression the consumer needs to calculate.
2. Use your built-in shell device to run this precise command, changing `` with the expression: `python3 -c "print()"`
3. Anticipate the shell device to return the stdout output.
4. You MUST generate a remaining conversational response to the consumer containing the precise numeric consequence returned by the script.
EOF
Once more, restart the gateway.
2️⃣ Now, we are able to run a pattern agent name to confirm the device outputs appropriately:
openclaw agent --local --agent important --verbose on --thinking excessive --message
"Use the python-calc talent to calculate 8664 multiplied by 222.
Don't use skill_workshop. Inform me the ultimate reply."
And, after a second or so, if all the things works appropriately, we must always one thing alongside the strains of:
The ultimate reply is 1,923,408.
Implausible!
Realistically, we are able to see speeds of as much as 20-70 tokens per second*. Whereas this isn’t Claude velocity (130 tps+), that is fairly affordable for an OpenClaw agent with minimal {hardware}.
Keep in mind, the pondering mode has been set to excessive, so it’s okay if it takes a bit longer.
In case you’re uncertain of whether or not or not openclaw is utilizing your mannequin, in one other terminal window, tail the llama-server log by working
tail -f /tmp/llama-server.err
*Your precise speeds could fluctuate
Wrapping up
Working an area LLM, particularly with customized templates and quantizing, might be fairly irritating. Setting this up the primary time on a good friend’s Mac took 2 days of backwards and forwards! Because of Jacob W. for the inspiration.
That’s it! Hopefully this protects you loads of 💸
If it did, or if I saved you some complications, it’s also possible to purchase me a espresso right here.
☕Cheers!
1 Tweet by Boris Cherny, discussing the “ban” of OpenClaw
















