Cloud VPS from $1.98/mo · pay with Bitcoin, Ethereum, Monero, USDT or Solana · paid in crypto
AI and machine learning

Unified memory for local LLMs: capacity versus bandwidth

Why Apple M5, AMD Ryzen AI Max and NVIDIA DGX Spark machines load models a gaming GPU cannot, how bandwidth caps their speed, and when a GPU server wins.

CloudSat teamNovember 18, 20267 min read
Abstract illustration of one large shared pool of light feeding both a processor and a graphics chip through short bright channels
On this pageWhat unified memory means

A desktop box the size of a hardcover book loading a 235-billion-parameter model sounds wrong until you look at its memory. Machines built on unified memory let the GPU use most of one large pool of RAM, so a model that would need several graphics cards fits on a single chip. Whether it then runs fast enough is a separate question, and the answer comes from one number on the spec sheet: memory bandwidth.

What unified memory means

In a typical PC or server, the CPU has system RAM and the GPU has its own VRAM on the graphics card. Data moves between them over PCIe, and a model must fit in VRAM to run at full speed. With unified memory, CPU and GPU sit in one package and read the same physical memory. Nothing is copied across a bus, and the GPU can address far more than any consumer card carries.

The trade-off is in the memory itself. Discrete GPUs use GDDR or HBM on very wide buses. Unified designs mostly use LPDDR5X, which is dense and efficient but delivers less bandwidth per gigabyte.

Not the CUDA feature with a similar name

CUDA also has "Unified Memory", a programming model: memory allocated with cudaMallocManaged is visible to both processors, and the driver migrates pages on demand. On a discrete card those pages still travel over PCIe, so it simplifies code without adding capacity at VRAM speed. This guide is about the hardware design, not that API.

The machines in this class

Machine Unified memory Bandwidth Notes
AMD Ryzen AI Max+ 395 mini PCs and laptops Up to 128 GB LPDDR5X-8000, 256-bit About 256 GB/s Up to 96 GB assignable to graphics on Windows
NVIDIA DGX Spark (GB10) 128 GB LPDDR5x, 256-bit 273 GB/s Runs CUDA; up to four units can be linked
Apple M5 Max (Mac Studio) Up to 128 GB 460 or 614 GB/s, by GPU configuration Metal and MLX instead of CUDA
Apple M5 Ultra (Mac Studio) Up to 512 GB 1.2 TB/s Metal and MLX instead of CUDA
For comparison: RTX 5090 32 GB GDDR7 1,792 GB/s Discrete card
For comparison: RTX PRO 6000 Blackwell 96 GB GDDR7 1,792 GB/s Discrete card

NVIDIA states that one DGX Spark handles models of up to 200 billion parameters, and two linked units up to 400 billion.

Fitting comes first

A model's weights must sit in memory the GPU can use. Streaming them from an SSD for every token is too slow to be useful. Take Qwen3-235B-A22B, a mixture-of-experts model with 235 billion parameters in total:

  • At about 4.9 bits per weight, typical of a 4-bit GGUF, the weights take roughly 144 GB. That fits neither a 128 GB machine nor a 96 GB card.
  • At about 3.5 bits, roughly 103 GB. A 128 GB machine can hold it once the GPU is allowed most of the pool, with a modest context on top.
  • At about 2.7 bits, roughly 79 GB, with more room for context and some loss of quality.

On a 512 GB M5 Ultra, the same model fits at 8 bits with room to spare. For the KV cache and runtime overhead that come on top of these figures, see the VRAM guide.

Bandwidth sets the speed, and MoE changes the math

To generate each token, the model reads its active weights from memory once. That gives a hard ceiling: tokens per second cannot exceed bandwidth divided by the bytes read per token. A dense model reads all of its weights for every token. A mixture-of-experts model reads only the experts its router picks, and Qwen3-235B-A22B activates about 22 billion parameters per token.

The table compares a dense 70B model at about 4.9 bits per weight (roughly 43 GB read per token) with that MoE model at about 3.5 bits (roughly 9.6 GB per token). These are arithmetic ceilings from published bandwidth, not benchmarks; real speeds land well below them.

Machine Dense 70B ceiling 235B MoE ceiling
Ryzen AI Max+ 395 (256 GB/s) About 6 tokens/s About 27 tokens/s
DGX Spark (273 GB/s) About 6 tokens/s About 28 tokens/s
M5 Max, 40-core GPU (614 GB/s) About 14 tokens/s About 64 tokens/s
M5 Ultra (1.2 TB/s) About 28 tokens/s About 125 tokens/s
RTX PRO 6000 (1,792 GB/s) About 42 tokens/s Does not fit at 3.5 bits

Two lessons follow. Large MoE models suit unified memory well, because capacity is plentiful and each token reads only a fraction of the weights. Large dense models expose the bandwidth gap, and that is where a discrete GPU pulls away.

Where unified memory falls behind

  • Long prompts. Reading a prompt is limited by compute, not bandwidth, and these chips have far less compute than large discrete GPUs. Pasting a long document can mean a noticeable wait before the first word appears.
  • Many users at once. Batching several conversations is what lets a server GPU multiply its throughput, and it needs compute these machines lack.
  • Training. Fine-tuning anything sizable is compute-bound. Small LoRA runs work, especially with MLX on Apple machines, but a data center GPU finishes the same job much sooner.
  • Software. Apple machines run Metal and MLX instead of CUDA, and AMD machines use ROCm or Vulkan, so CUDA-only tools need alternatives. DGX Spark runs CUDA on an Arm CPU, so check that your Python packages ship Arm builds.

Settings that decide how much the GPU gets

Capacity on the box is not the same as capacity for the model. macOS lets the GPU wire only part of unified memory by default, and the limit can be raised until the next reboot:

sudo sysctl iogpu.wired_limit_mb=114688    # let the GPU use 112 GB of a 128 GB Mac

On Ryzen AI Max machines under Windows, the firmware and AMD's software assign up to 96 GB to graphics. On Linux, the amdgpu driver can also map ordinary system memory for the GPU, and how much depends on kernel version and parameters, so follow your distribution's guidance. Whatever the platform, leave several gigabytes for the operating system.

Then load every layer onto the GPU. With llama.cpp, the same command works on Metal, Vulkan, ROCm or CUDA builds:

llama-server -m model.gguf -ngl 999 -c 16384 --host 127.0.0.1 --port 8080

Unified memory box or GPU server?

A unified memory machine fits one person or a small team running large models privately at reading speed, with a single purchase and no data center. A GPU server fits when several users share the model, prompts are long, the model is dense and large, or you need CUDA software and training time. Many people combine them: a quiet box on the desk for daily use, rented GPUs for the heavy jobs.

Renting an RTX PRO 6000 with 96 GB, or a multi-card A100 80 GB setup, as a CloudSat GPU server for a few hours is a cheap way to see how a model behaves on high-bandwidth memory before you buy hardware.

FAQ

Is unified memory as fast as VRAM?

No. The unified pools in current machines deliver roughly 256 GB/s to 1.2 TB/s, while large discrete GPUs reach about 1.8 TB/s or more. Unified memory wins on capacity, not on speed.

Does DGX Spark run normal CUDA software?

Yes. It has an NVIDIA Blackwell GPU and runs CUDA, but its CPU is Arm-based, so Python packages and containers must be available for Arm64.

Can a Mac fine-tune models?

Small ones, yes. MLX supports LoRA fine-tuning on Apple silicon. For full fine-tuning or anything large, a data center GPU is far faster.

How much of a 128 GB machine can the GPU use?

It depends on the platform: up to 96 GB through AMD's setting on Windows, more on Linux with the right driver settings, and an adjustable share on macOS. Always leave room for the operating system and the KV cache.

Run it on CloudSat. Cloud VPS on AMD EPYC and NVMe from $1.98/mo in 13 regions, delivered in under 5 minutes and paid in crypto. See plans or deploy a server.