Local LLMs on Apple Silicon: unified memory, MLX, and Ollama compared
On a Mac with Apple Silicon, the memory architecture for local language models differs from a PC with a dedicated graphics card: there is no separate VRAM bank, as the GPU shares system memory with the rest of the machine. This guide explains what unified memory means for your model choice, how the three common paths (Ollama, MLX, and LM Studio) compare, and what to watch out for; verified on 2026-08-07.
Within the "Getting Started & Installation" pillar of this guide canon, macOS occupies a distinct position. Where traditional systems require balancing graphics card capacity against system memory, the Mac demands an integrated look at total unified memory. In building your local AI environment, this article follows a structured path: choose route -> install -> use -> integrate -> manage/serve. If you are not yet familiar with the baseline hardware requirements, consult the hardware baseline for local LLMs to determine which physical specifications are required before unified memory replaces traditional VRAM calculations. For those looking to dive straight into deploying Ollama on macOS, the Ollama macOS installation guide provides step-by-step instructions for setting up the software.
Baseline and hardware requirements
The examples and memory calculations in this article assume an Apple Silicon Mac (M2, M3, or M4 generation) equipped with at least 16 GB of unified memory. With this configuration, you can run a 7 to 8 billion parameter language model in a 4-bit quantization (Q4) reliably and with ample context space. For quickly testing basic tasks, an M1 Mac with 8 GB of RAM will suffice, provided you opt for a smaller 3 to 4 billion parameter model in Q4 format.
When selecting an appropriate Mac configuration, it is crucial to understand that minimum requirements on macOS are directly tied to the operating system's baseline footprint. On an 8 GB RAM machine, macOS and standard desktop applications often leave only 4 to 5 GB available for the GPU and the loaded model. A 16 GB configuration provides the necessary breathing room to run the model, the context window's KV cache, and your daily applications side by side without memory pressure.
Unified memory: how VRAM considerations change on macOS
On a traditional x86 architecture (Windows or Linux), video memory (VRAM) is physically located on the graphics card, separate from system memory (RAM). The processor (CPU) and graphics chip (GPU) must exchange data via the PCIe bus, which acts as a clear bottleneck. If a language model does not fit entirely onto the graphics card, part of the computations must take place on the CPU, resulting in a drastic drop in generation speed.
Apple Silicon uses a unified memory architecture (UMA). In this setup, the CPU, GPU, and Neural Engine share a single physical pool of memory integrated on the same chip package. This has direct implications for running local LLMs:
- No hard VRAM limit: In principle, the GPU can access a very large portion of the total system memory. By default, macOS sets a dynamic limit on the amount of memory the GPU can allocate (usually around 70% to 75% of the total), but this limit can be increased via software if necessary.
- High memory bandwidth: An LLM's generation speed during inference is primarily limited by memory bandwidth (how quickly weights can be transferred from memory to the compute cores) and to a lesser extent by raw compute performance in teraflops. Refer to the theoretical explanation of attention and memory bandwidth to understand why the speed at which data flows through memory directly dictates the processing time per token.
- Not upgradable after purchase: Because memory is soldered directly onto the M chip, upgrading after purchase is impossible. The choice you make when buying a Mac permanently dictates the maximum model size you can run locally across the entire lifespan of the device.
The table below illustrates the difference in memory architecture between a conventional PC and an Apple Silicon Mac:
| Feature | Traditional PC (Windows/Linux) | Apple Silicon Mac (macOS) |
|---|---|---|
| Memory structure | Separate RAM (system) and VRAM (GPU) | Shared Unified Memory (CPU/GPU/Neural Engine) |
| Physical location of VRAM | Dedicated GDDR6/HBM on graphics card | Integrated LPDDR memory on the chip package |
| CPU-GPU data transfer | Via PCIe bus (limited bandwidth) | High-bandwidth internal bus on the SoC |
| Upgradability | RAM and GPU can be upgraded independently | Not upgradable; soldered during manufacturing |
| Primary bottleneck | Capacity of dedicated VRAM on the graphics card | Total memory bandwidth of the specific M chip variant |
Three routes for local LLMs on macOS compared
There are three primary routes for running a local language model on a Mac. Each route utilizes the hardware differently, follows a specific setup method, and has distinct limitations.
1. Ollama (GGUF via llama.cpp and Metal)
Ollama is the most accessible method for running models locally on macOS. Under the hood, Ollama utilizes llama.cpp, a highly optimized C/C++ inference engine that directly uses Apple's Metal API on macOS for hardware acceleration.
When to choose: Choose Ollama when you want to get started quickly via the terminal, are looking for a thoroughly mature ecosystem, and want to call the model via a local REST API for integrations. Read the getting started guide for Ollama on macOS for a complete description of the installation and system background service.
Model format: Ollama uses the GGUF format. This format bundles all model weights, metadata, and quantization information into a single file, making sharing between Linux, Windows, and macOS very straightforward.
Limitation: Ollama runs as an abstracted background service. While this simplifies usage, you have less direct control over specific Metal settings or layer-by-layer allocation than when working directly with the latest development versions of llama.cpp or MLX.
2. MLX (Apple Silicon native framework)
MLX is an open-source framework developed by Apple's AI research team specifically for Apple Silicon. It is designed to make optimal use of the M-series chip architecture via Python bindings that closely resemble PyTorch.
When to choose: Choose MLX (via the Python library mlx-lm) when you want to achieve maximum generation speed on Apple Silicon, want to fine-tune models, or are building custom Python scripts and pipelines.
Model format: MLX requires models specifically converted to the MLX format. A large collection of these is available on Hugging Face under the organization mlx-community.
Limitation: The ecosystem is younger and smaller than that of GGUF/llama.cpp. Not every new open-weight model is immediately available in MLX format, and tooling for simple REST servers is less widespread than with Ollama.
To use MLX from the command line, run the following commands in the terminal:
pip install mlx-lm
python -m mlx_lm.generate --model mlx-community/Llama-3.2-3B-Instruct-4bit --prompt "Vat de voordelen van unified memory samen in drie punten."
3. LM Studio (Graphical interface with Metal)
LM Studio is a desktop application that provides a full graphical wrapper around local model execution via Metal acceleration. It allows users to search for GGUF files directly on Hugging Face from within the application, download them, and start a chat interface with them.
When to choose: Choose LM Studio if you prefer not to work with the terminal, want to visually experiment with parameters like temperature and system prompts, or want to launch a local OpenAI-compatible API server from a graphical interface.
Limitation: LM Studio is closed-source software. The source code is not accessible, and the application uses more background system memory than a lightweight command-line tool like Ollama.
If you want to deploy LM Studio on a dedicated Mac running headlessly, consult the guide for LM Studio as a headless server for instructions on setting up a network service.
Model selection and memory budgeting
Because working memory on a Mac is shared between the operating system, open applications, and the language model, accurate memory calculation is essential. The amount of RAM in your Mac is the determining factor for which model you can run.
A language model requires memory for two main components: the static model weights and the dynamic context cache (KV cache). See the explanation of quantization techniques to understand how reducing precision (for example, from 16-bit to 4-bit) drastically decreases the file size of weights without significant loss of quality.
When determining the required RAM, we use the following rules of thumb for models in 4-bit quantization (Q4):
- 3B to 4B parameters (Q4): Requires approximately 2.5 to 3.5 GB of memory for the weights. Suitable for Mac systems with 8 GB RAM.
- 7B to 8B parameters (Q4): Requires approximately 5.0 to 5.5 GB of memory for the weights. Suitable for Mac systems with 16 GB RAM.
- 13B to 14B parameters (Q4): Requires approximately 9.0 to 10.0 GB of memory for the weights. Suitable for Mac systems with 24 GB or 32 GB RAM.
- 32B to 34B parameters (Q4): Requires approximately 20.0 to 22.0 GB of memory for the weights. Requires a Mac with at least 36 GB or 48 GB RAM.
- 70B parameters (Q4): Requires approximately 40.0 to 43.0 GB of memory for the weights. This requires a Mac with at least 64 GB or 128 GB RAM.
To determine which specific model architecture (such as Llama, Mistral, or Qwen) best fits your intended tasks, check the guide to choosing a local model which explains the functional differences between model families.
Context and memory footprint
In addition to the memory space for the model weights, you need to account for the dynamic memory usage of the context cache (the Key-Value or KV cache). As the input text and generated responses become longer, the amount of memory needed to retain previous tokens increases.
On a Mac, this memory is drawn directly from the same unified memory. With a context window of 8,192 tokens on an 8B model, the KV cache often takes less than 1 GB of additional memory. If you scale the same model up to a context window of 32,768 or 128,000 tokens, the KV cache can claim several additional gigabytes of RAM.
Consult the guide to context window optimization to learn how to balance context length with available hardware capacity. To understand the fundamental mechanics of this memory footprint, check the background page on the context window where the technical structure of the KV cache is analyzed in greater detail.
Practical installation steps with Ollama on macOS
To demonstrate how quickly a local model can be up and running on a Mac, here is a summary of the standard deployment via Ollama:
- Download the macOS installer from the official Ollama website or install the application via Homebrew using the command
brew install --cask ollama. - Launch the Ollama application. This initializes the background service and automatically configures Metal support for your specific M-series chip.
- Open the Terminal app and pull the desired model from the library using the command:
ollama pull llama3.2 - Start a direct interactive chat session in the terminal by entering the following command:
ollama run llama3.2
After these steps, the model runs entirely locally on your Mac, and the REST API is available in the background via http://localhost:11434 for further integrations with other software.
Testing Dutch AI tasks on Apple Silicon
When deploying local language models for Dutch tasks, the quality of the chosen model is crucial. Smaller models (3B to 8B) primarily trained on English data sometimes exhibit grammatical errors or Anglicisms in Dutch.
A practical test prompt for a locally loaded 8B model on macOS might look like this:
ollama run llama3.2 "Vat de onderstaande tekst samen in drie heldere opsommingstekens in het Nederlands: De uitrol van lokale taalmodellen op Apple Silicon maakt gebruik van unified memory. Hierdoor hoeven gewichten niet meer via trage PCIe-bussen te worden getransporteerd, maar heeft de GPU direct toegang tot het systeemgeheugen. Dit zorgt voor een efficiënte verwerking van tekst op compacte hardware."
When running on an M2 or M3 Mac with 16 GB RAM, the Metal backend generates the response almost instantly. The model provides a summary such as:
- Unified memory allows the GPU to directly access system memory on Apple Silicon.
- Transferring model weights across slow PCIe buses has therefore become obsolete.
- As a result, local language models can be processed very efficiently on compact hardware.
To further enhance the quality of Dutch responses for models that struggle with language structure, see the guide for better Dutch AI output which covers instructions and system prompt techniques.
Connecting documents and RAG on the Mac
A common use case for a locally running language model is Retrieval-Augmented Generation (RAG). In this setup, the Mac first searches a local collection of documents (such as PDFs or text files) using an embeddings model, after which relevant text snippets are passed to the language model as context.
Because both the embeddings model and the language model are loaded into shared unified memory, you need to account for their combined memory footprint. A local embeddings model (such as bge-m3 or nomic-embed-text) typically requires 0.5 to 1 GB of additional RAM. See the guide to local RAG on the Mac to securely connect your own documents and files to a locally running language model on macOS.
For those looking to build a more comprehensive RAG architecture independent of the specific macOS quickstart, the overview for searching local documents provides additional information on vector databases and indexing strategies.
Weaknesses and system limitations of macOS
Although Apple Silicon is a highly efficient platform for running local language models, it has distinct limitations to keep in mind beforehand:
- No CUDA ecosystem: Apple Silicon does not support Nvidia CUDA. Software that strictly depends on CUDA-specific libraries or advanced enterprise server optimizations (such as vLLM or TensorRT-LLM) will not work on macOS. The ecosystem relies on Metal, MLX, and
llama.cpp. - MLX is a younger platform: Although MLX delivers excellent performance on Apple Silicon, the number of ready-to-use models in MLX format is smaller than the availability of general GGUF files on Hugging Face.
- Significant bandwidth differences between M chips: The name "Apple Silicon" is no automatic guarantee of high speed. The base versions of the M1, M2, M3, and M4 chips feature a memory bandwidth between 68 GB/s and 150 GB/s. In contrast, Pro, Max, and Ultra variants offer bandwidths ranging from 150 GB/s to well over 800 GB/s. As a result, the processing speed of an 8B model on a base M1 is only a fraction of the speed on an M3 Max.
- Memory pressure affects the entire system: Because memory is shared, loading an oversized model can force macOS to page memory to the SSD (swapping). This not only drastically slows down the language model, but also makes the rest of the macOS user interface sluggish and unresponsive.
Use the inference speed measurement guide to calculate the exact number of tokens per second on your specific Mac configuration yourself and objectively determine the impact of memory bandwidth.
Privacy, security, and power consumption
Running language models locally on a Mac provides maximum privacy. When using Ollama, MLX, or LM Studio, all computations are executed entirely locally on the M-series chip. No text prompts, generated responses, or uploaded documents are sent to external servers or cloud providers.
Expanding your local AI setup introduces specific privacy considerations. Consult the guide to privacy-friendly AI for an overview of security settings and shielding data streams on local systems.
In terms of power consumption, Apple Silicon is among the most efficient hardware on the market. Under full AI load (when the CPU and GPU cores are pushed to their limits), a Mac mini or MacBook Pro typically draws only a few dozen watts from the wall. This stands in stark contrast to traditional desktop PCs with dedicated graphics cards, which consume hundreds of watts under load.
For a detailed analysis of operational costs and the impact on your electricity bill when running a local server continuously, check out the article on power consumption in local AI which breaks down consumption figures by system profile.
Conclusion and reference date
With unified memory, Apple Silicon provides a remarkably powerful architecture for running language models locally. By eliminating the strict boundary between RAM and VRAM, you can run relatively large models on a Mac, provided you choose the right route and establish a realistic memory budget. Ollama remains the most accessible entry point for general use, while MLX delivers maximum performance for Python developers and LM Studio offers a pleasant graphical environment.
This article was verified on 2026-08-07. The development of local AI software on macOS is progressing rapidly. Versions of Ollama, mlx-lm and LM Studio are updated regularly, meaning performance and feature sets can change. Therefore, treat the mentioned verification date as the applicable reference point for the described features and software versions.


