Safeguard
Developer Tools•

Apple silicon for local LLMs: what unified memory changes

Shared CPU and GPU memory changes how you budget for a local model. What MLX and llama.cpp document, and what to measure before you buy hardware.

Safeguard Security Team
3 min read

On Apple silicon the CPU and GPU share one memory pool, so there is no separate VRAM limit to cap model size. Your budget is total memory minus what macOS and your apps use. That makes larger models possible on a laptop, but memory speed and thermals still decide how fast it feels.

What the projects document

Apple's MLX project describes itself as an array framework for machine learning on Apple silicon, from Apple machine learning research. Its README says arrays in MLX live in shared memory, and operations can run on supported device types, currently the CPU and the GPU, without copying data between them.

The llama.cpp README lists Metal as the backend for Apple silicon, alongside CUDA, Vulkan and CPU backends.

Together these confirm the point: two mature local inference options target Apple silicon, and the memory model is shared.

How to budget

The weight arithmetic is the same as anywhere. See how much memory a model needs. What differs is the limit.

  1. Start with total memory.
  2. Subtract the operating system and your normal workload. A browser, an IDE and containers can take a large share.
  3. Subtract room for the KV cache at your context length.
  4. What is left is your weight budget.

I could not confirm from the pages I fetched whether macOS caps how much of the pool the GPU may use by default, so check the current documentation for your macOS version and the settings your runtime exposes before you assume the whole pool is available.

What to measure before buying

Do not choose by memory size alone. Measure on hardware you can try:

  • tokens per second for your model and quantization at your context length
  • time to first token for a long prompt, since prompt processing is a different workload from generation
  • behavior when you run the model and your usual tools together
  • fan noise, throttling and battery drain during a long session

Published benchmarks from others rarely match your model, quantization and prompt mix. Treat them as hints.

Choosing a runtime on a Mac

  • llama.cpp and tools built on it use GGUF files and a Metal backend.
  • MLX uses its own array framework and model conversions. Check that your model is available in a format it supports.
  • Either way, keep the server on loopback. See binding and exposure.

Laptop practicalities

A model that stays loaded holds memory, which can squeeze everything else. Use a shorter keep alive on a laptop you also use for other work. See keep_alive. Put model files on a drive with room, and think about disk encryption policy. See where models are stored.

Quick check

Does a Mac with a lot of memory make a model run faster?

More memory lets a larger model fit. It does not by itself make generation faster, which depends on memory speed and the chip.

Is MLX the same as llama.cpp?

No. They are separate projects. MLX is an array framework from Apple machine learning research, and llama.cpp is an inference engine with a Metal backend among others.

Sources

Last reviewed: 19 October 2026.

Never miss an update

Weekly insights on software supply chain security, delivered to your inbox.

Self-healing security runs on Safeguard.

Your first fix PR is minutes away.

No sales call required, even your agent can complete the purchase over MCP.