Apple now sells the Mac Studio with the M5 Ultra chip and up to 512GB of unified memory. This guide uses Apple's own pages and the TokenLab model API, both read on 2026-11-11. It covers what the machine costs, which open-weight models fit in its memory, when a hosted API costs less, and how to keep a hosted fallback in OpenClaw.
What Apple sells today
Apple announced the M5 Max and M5 Ultra Mac Studio on 2026-08-25 and began delivery on 2026-09-22 (Apple newsroom: announcement and availability). The 512GB memory option was announced for late October. Apple's store lists it today.
| Configuration | CPU / GPU cores | Memory | Memory bandwidth | US price |
|---|---|---|---|---|
| M5 Max, 512GB SSD | 18 / 32 | 36GB | 460GB/s | $2,499 |
| M5 Max, 1TB SSD | 18 / 40 | 64GB | 614GB/s | $3,099 |
| M5 Ultra, 1TB SSD | 30 / 64 | 96GB | 1.2TB/s | $5,499 |
| M5 Ultra, 1TB SSD | 36 / 80 | 96GB | 1.2TB/s | $6,799 |
| M5 Ultra, 1TB SSD | 36 / 80 | 256GB | 1.2TB/s | $10,799 |
| M5 Ultra, 1TB SSD | 36 / 80 | 512GB | 1.2TB/s | $22,299 |
Sources: Apple's Mac Studio store page and its tech specs, read 2026-11-11. The store shows the 36-core CPU and 80-core GPU option as +$1,300, and the 256GB and 512GB memory options as +$4,000 and +$15,500 over the 96GB base. The 256GB price in the table is the sum of the base price and those two upgrades. Apple's tech specs say the 256GB and 512GB options require the 36-core CPU and 80-core GPU.
Apple's AI claims are relative numbers. For the M5 Ultra it reports up to 4x faster LLM prompt processing than the M3 Ultra, and up to 9.8x faster than the M1 Ultra, in LM Studio. The test used an 8K-token prompt and a 14-billion-parameter model at 4-bit, on preproduction hardware, in July 2026 (footnotes on Apple's page). Apple publishes no tokens-per-second figure for text generation, so measure your own model before you buy.
Memory decides which models fit
The weights of a model take about parameters (billions) × bits ÷ 8 gigabytes. The KV cache, macOS and your other apps need memory on top of that. OpenClaw's own docs say that fit depends on the weights, the context size, the runtime and other work on the host (local models guide).
| Model (open weights) | Parameters on the model card | Weights at 4-bit | Weights at 8-bit | Checkpoint size on Hugging Face | TokenLab model ID |
|---|---|---|---|---|---|
| gpt-oss-20b | 21B, 3.6B active | 10.5GB | 21GB | 13.8GB | gpt-oss-20b |
| Qwen3.8-27B | 27B, dense | 13.5GB | 27GB | 55.6GB (BF16) | qwen3.8-27b |
| gpt-oss-120b | 117B, 5.1B active | 58.5GB | 117GB | 65.2GB | gpt-oss-120b |
| GLM-5.3-Flash | 320B, 18B active | 160GB | 320GB | 328.3GB (FP8) | glm-5.3-flash |
| Qwen3.8-2.4T-A95B | 2.4T, 95B active | 1,200GB | 2,400GB | 4,892.4GB | qwen3.8-2.4t-a95b |
Read against Apple's memory options of 96GB, 256GB and 512GB:
- The weights of the first three models fit in 96GB.
- GLM-5.3-Flash needs 256GB at 4-bit. Its 328.3GB official checkpoint needs the 512GB option.
- Qwen3.8-2.4T-A95B does not fit in any option, even at 4-bit.
- The DeepSeek-V4.1-Flash checkpoint is 510.3GB, which is close to the whole 512GB option. Plan for a lower-bit build. OpenClaw documents a ds4 backend for running DeepSeek V4 Flash on macOS.
Memory bandwidth decides how fast a model writes. Each generated token reads the active weights once, so bandwidth divided by the size of the active weights is a ceiling on tokens per second. Example: Qwen3.8-27B at 4-bit is 13.5GB. At the M5 Ultra's 1.2TB/s the ceiling is 1,200 ÷ 13.5 ≈ 89 tokens per second. At the M5 Max's 614GB/s it is about 45. These are upper limits, not measurements.
Local or hosted: the break-even
A local machine is a fixed cost. A hosted API is a cost per token. The table asks how many tokens per month the machine must replace to pay for itself over 36 months, compared with the hosted price of the same open model on TokenLab.
| Machine | Price | Per month over 36 months | Hosted model, same weights (in / out per 1M tokens) | Hosted cost per 1M tokens | Million tokens per month to break even | Tokens per second, around the clock |
|---|---|---|---|---|---|---|
| M5 Ultra 30 / 64, 96GB | $5,499 | $152.75 | gpt-oss-120b ($0.15 / $0.60) |
$0.24 | 636 | 246 |
| M5 Ultra 30 / 64, 96GB | $5,499 | $152.75 | qwen3.8-27b ($0.50 / $3.00) |
$1.00 | 153 | 59 |
| M5 Ultra 36 / 80, 512GB | $22,299 | $619.42 | glm-5.3-flash ($0.15 / $0.50) |
$0.22 | 2,816 | 1,086 |
Assumptions: 36 months of use, no resale value, no electricity, no setup time, and a mix of 80% input and 20% output tokens (cost per 1M tokens = 0.8 × input price + 0.2 × output price). Prices were read from the TokenLab pricing API on 2026-11-11. These models have no Verified delivery, so TokenLab charges the Official route price. The last column divides the monthly tokens by 2,592,000 seconds (30 days).
If your real volume is below the line, the hosted API is cheaper. Compare these volumes with your own monthly token usage before you buy hardware.
Power adds a smaller cost. Apple lists 480W as the maximum continuous power and gives no idle or typical figure. At that maximum, 24 hours a day for 30 days, the machine uses at most 0.48 kW × 720 h = 345.6 kWh. At an example rate of $0.20 per kWh that is $69.12 per month. Use your own rate. Real use is lower.
Cost is not the only reason to run locally. If data must not leave your machine, that reason has no price comparison. If you need a model that is not available as open weights, use a hosted API.
OpenClaw with a hosted fallback
OpenClaw is an open-source (MIT) assistant that runs on your own devices and works through chat apps. It works with hosted and local model providers (openclaw.ai). You register a provider under models.providers with a base URL, an API type and a model list. A local server such as LM Studio or mlx_lm.server and a hosted OpenAI-compatible API such as TokenLab use the same format (custom providers reference).
This configuration, in ~/.openclaw/openclaw.json, uses a local model first and claude-sonnet-5-5 through TokenLab as the fallback. Export TOKENLAB_API_KEY where the OpenClaw Gateway runs. Replace my-local-model with the ID that your local server lists at /v1/models.
{
agents: {
defaults: {
model: {
primary: "local/my-local-model",
fallbacks: ["tokenlab/claude-sonnet-5-5"],
},
models: {
"local/my-local-model": { alias: "Local" },
"tokenlab/claude-sonnet-5-5": { alias: "Sonnet" },
},
},
},
models: {
mode: "merge",
providers: {
local: {
baseUrl: "http://127.0.0.1:8000/v1",
apiKey: "sk-local",
api: "openai-completions",
timeoutSeconds: 300,
models: [
{
id: "my-local-model",
name: "Local Model",
reasoning: false,
input: ["text"],
contextWindow: 120000,
maxTokens: 8192,
},
],
},
tokenlab: {
baseUrl: "https://api.tokenlab.sh/v1",
apiKey: "${TOKENLAB_API_KEY}",
api: "openai-completions",
models: [
{
id: "claude-sonnet-5-5",
name: "Claude Sonnet 5.5 (TokenLab)",
reasoning: false,
input: ["text"],
contextWindow: 1000000,
maxTokens: 128000,
},
],
},
},
},
}
The base URL https://api.tokenlab.sh/v1 is the one in the TokenLab SDKs guide. claude-sonnet-5-5 lists openai_chat_completions as an accepted format. The context and output limits in the sample are the limits listed for the model on 2026-11-11.
Two behaviors matter:
- Fallbacks handle failures. OpenClaw moves to the next model in
fallbackswhen the current model fails, for example on a provider error or a missing model. It does not judge how hard a task is (model failover). - You choose the model for a hard task. Select the hosted model for a session with the
/modelcommand or the model picker. A model you select this way is strict: if it fails, OpenClaw reports the failure instead of answering from an unrelated fallback.
The hosted side stays small if the local model does most of the work. For 10 million tokens a month on claude-sonnet-5-5 with the same 80/20 mix, Verified delivery at $0.70 in / $3.50 out per 1M tokens costs $12.60. Official delivery at $2 in / $10 out costs $36.00. Prices read 2026-11-11. The delivery tiers guide explains the difference.
Which configuration to buy
- 96GB ($5,499): models up to the size of gpt-oss-120b, and dense models around 27B. Check the break-even table first.
- 256GB ($10,799): a model like GLM-5.3-Flash at 4-bit, with room for context.
- 512GB ($22,299): larger checkpoints, such as the 328.3GB GLM-5.3-Flash, and long contexts. It needs a clear reason: privacy, steady heavy volume, or both.
- No local machine: if your volume is below the break-even line and your data may go to a provider, use the API. You can compare the open models above with hosted frontier models on the same key in the model catalog.
Test the model you plan to run on the hardware you plan to buy. Memory size says what loads. Only a test says how fast it runs and whether the answers are good enough for your work.
See TokenLab prices and create a key to run the same workload on a hosted model before you decide.



