How to Run Local LLMs on Mac Studio with Ollama

The Mac Studio is Apple’s most capable desktop for local LLM inference outside of the Mac Pro. With M4 Max (up to 128GB) or M4 Ultra (up to 192GB) unified memory options, it can run models that no other consumer or prosumer hardware can fit in a single machine — including 70B models comfortably and 100B+ models in reduced quantisation. This guide covers setting up Ollama on Mac Studio, performance expectations across memory configurations, and the specific use cases where Mac Studio’s capabilities matter most.

Why Mac Studio for Local LLMs

The Mac Studio occupies a unique position: desktop performance and memory capacity in a compact, quiet, power-efficient form. For local LLM inference specifically, the M4 Max and Ultra chips combine extremely high memory bandwidth with unified memory pools that consumer GPU hardware cannot match at the price point. An M4 Max Mac Studio with 128GB unified memory runs a 70B model at Q4 quantisation (approximately 42GB) at 20–30 tokens per second — fast interactive speed — while consuming around 60–80W. A Windows workstation capable of fitting a 70B model entirely in GPU VRAM requires two NVIDIA RTX 4090s (48GB total VRAM) at approximately $3,000–4,000 in GPU cost alone, drawing 600–800W. For users who primarily work on macOS, value power efficiency, or want a single machine for both daily work and AI inference, Mac Studio is the most practical choice for the 70B tier and above.

Installing Ollama on Mac Studio

Ollama installation on Mac Studio is identical to any macOS install. Download the Ollama app from ollama.com, open the DMG, drag to Applications, and launch. Ollama automatically detects Apple Silicon and uses Metal GPU acceleration — no configuration required. On first launch, the Ollama icon appears in the menu bar and the server starts on port 11434. Verify Metal acceleration is working by running a model and checking GPU usage in Activity Monitor (GPU History view) — you should see GPU utilisation above 50% during inference.

Recommended Models by Memory Configuration

Mac Studio ships in several memory configurations, each enabling a different model tier:

  • M4 Max 48GB: Runs 32B–34B models at Q4 (approximately 20–22GB) with comfortable context headroom. Qwen2.5-32B and DeepSeek-R1-32B fit well. Step up from MacBook Pro territory without paying for Ultra.
  • M4 Max 64GB: The most popular Mac Studio configuration for LLM work. Fits 70B models at Q4 (approximately 42GB) with room for the OS, context cache, and other applications. Llama 3.3 70B, Qwen2.5-72B, DeepSeek-R1 70B all run at interactive speeds.
  • M4 Max 128GB: Fits two 34B models simultaneously (useful for speculative decoding), or 70B models at higher quantisation (Q8, approximately 70GB) for better output quality, or experimental 100B+ models in Q2.
  • M4 Ultra 192GB: The maximum configuration. Runs full 70B models at Q8, fits multiple large models simultaneously, or enables the largest open-weight models (Llama 3.1 405B in heavy quantisation).

Figure 1 — Mac Studio M4 Max/Ultra: LLM performance at a glance

Config Largest model Speed (tok/s) Best use case M4 Max 48GB32B Q425–40 tok/sPower developer workstation M4 Max 64GB70B Q420–30 tok/sFrontier local quality, most users M4 Max 128GB70B Q815–25 tok/sMulti-model, highest quality M4 Ultra 192GB405B Q210–18 tok/sResearch, maximum model size

Performance Benchmarks on Mac Studio

With the M4 Max chip, memory bandwidth reaches approximately 546 GB/s for the Max and over 800 GB/s for the Ultra configuration. This bandwidth directly determines tokens per second for the memory-bandwidth-bound decode phase of LLM inference. In practice on the M4 Max 64GB: Llama 3.3 70B at Q4 generates at approximately 20–28 tokens per second with Ollama using Metal acceleration — fast enough for fluid interactive conversation. Smaller models are proportionally faster: Qwen2.5-14B at Q4 runs at 60–80 tokens per second on the same machine, and 7B models exceed 100 tokens per second. For comparison, the M4 Max is approximately 30–40% faster than the M3 Max at equivalent model sizes due to improved memory bandwidth and compute architecture.

Using MLX for Maximum Performance

While Ollama is the most convenient setup, Apple’s MLX framework delivers better tokens-per-second numbers on Mac Studio than Ollama’s llama.cpp backend for many models. Install mlx-lm with pip, download an MLX-format model from Hugging Face (the MLX Community organisation maintains conversions of most popular models), and run inference with the generate command. MLX exploits the Apple Neural Engine and optimised Metal compute paths more aggressively than llama.cpp’s generic Metal backend. For users who want maximum inference speed and are comfortable with a Python environment, MLX benchmarks 15–30% faster than Ollama on the same Mac Studio hardware. For users who want the simplest setup, full model library, and OpenAI-compatible API, Ollama remains the better choice.

Mac Studio as a Local AI Server

Mac Studio’s combination of memory capacity, speed, and silent operation makes it excellent as a dedicated local AI inference server. Set OLLAMA_HOST to 0.0.0.0:11434 and OLLAMA_KEEP_ALIVE to -1, configure a firewall rule allowing port 11434 from your local network devices, and every device in your home or office can query the Mac Studio as a shared LLM server. The M4 Max draws approximately 60–80W under sustained LLM load — significantly less than an equivalent Windows GPU workstation. A Mac Studio running 24/7 as an inference server adds roughly 10–15 AUD per month to electricity costs at typical Australian rates, making it practical to leave running continuously.

Frequently Asked Questions

Is Mac Studio M4 Max worth upgrading from M3 Max for LLMs?
The M4 Max is approximately 30–40% faster at LLM inference than M3 Max due to higher memory bandwidth. If inference speed is a daily bottleneck, the upgrade is worthwhile. If you already have an M3 Max and speed is acceptable, wait for M5.
Can Mac Studio run Llama 3.1 405B?
The 192GB M4 Ultra can run Llama 3.1 405B at Q2 quantisation (approximately 170GB). Output quality at Q2 is noticeably degraded compared to Q4. Q4 would require approximately 230GB and does not currently fit in any single Mac Studio configuration.
How does Mac Studio compare to an NVIDIA workstation for local LLMs?
For models under 34B, an RTX 4090 (24GB VRAM) is faster per dollar. For 70B models, the 64GB Mac Studio has no affordable single-GPU equivalent. The Mac Studio wins on memory capacity, power efficiency, and silence; the NVIDIA workstation wins on raw throughput for models that fit in VRAM.

Last updated: October 2026

Optimising Ollama Settings for Mac Studio

A few Ollama settings make a meaningful difference on Mac Studio. Set OLLAMA_KEEP_ALIVE to -1 in your shell profile or as a launchctl environment variable to keep models permanently loaded — on a machine with 64GB+ of unified memory, there is no reason to unload your primary model between sessions. Set num_ctx in a custom Modelfile to 16,384 or higher if you regularly work with long documents or code files — the default 2,048 token context is conservative for a machine with this much memory. For the best token generation speed on Apple Silicon, set num_gpu to 99 in the Modelfile to ensure all layers load to the GPU rather than splitting across CPU and GPU. By default Ollama already handles this for models that fit in memory, but explicitly setting it prevents partial CPU offloading if the system is under memory pressure from other applications. Monitor actual GPU layer counts with ollama ps after loading a model — the output shows how many layers are on GPU versus CPU.

Comparing Mac Studio to Mac Mini M4 Pro for LLM Work

For developers choosing between Mac Mini M4 Pro (24GB or 48GB) and Mac Studio M4 Max (64GB or 128GB), the decision hinges on whether 70B model quality is worth the price premium. The Mac Mini M4 Pro 24GB at its current price runs 14B models at excellent speed — Qwen2.5-14B at 60+ tokens per second. The Mac Studio M4 Max 64GB runs 70B models at interactive speed. For most daily coding assistance, document summarisation, and chat tasks, a well-prompted 14B model is sufficient and the Mac Mini is the better value. The Mac Studio becomes clearly worth it when you are doing complex multi-step reasoning tasks, evaluating model quality differences systematically, or building applications where you need the best available local model quality. The 70B tier is a genuine qualitative step above 14B for tasks like long-form writing, nuanced analysis, and complex code generation.

Setting Up a Persistent Ollama Service on Mac Studio

For Mac Studio used primarily as an inference server, configure Ollama to launch at login and stay running persistently. The Ollama menu bar app already handles this when you enable “Launch at Login” in its settings. For a headless setup without the menu bar app, create a launchd plist file in ~/Library/LaunchAgents/ that runs ollama serve with your environment variables (OLLAMA_HOST, OLLAMA_KEEP_ALIVE) set as environment keys in the plist. Load it with launchctl load ~/Library/LaunchAgents/com.ollama.server.plist and Ollama will start automatically at login and restart if it crashes. Pair this with Open WebUI in Docker (set to restart: unless-stopped in your compose file) for a complete local AI stack that survives reboots and is accessible from all devices on your network without any manual startup steps.

Leave a Comment