# What is unified memory, and is it as good as VRAM?

> Unified memory is one pool shared by the CPU and GPU. It counts like VRAM for capacity but is slower. gpt-oss-120b at MXFP4 needs 64.3 GB at 8k context (estimate, The Local Bench, 2026-11-19): it fits a 128 GB unified machine, while a 24 GB RTX 3090 must offload. Unified bandwidth is 256 to 614 GB/s (verified, AMD and Apple, 2026-11-29) against the 3090's 936 GB/s (sourced, 2026-11-19).

Canonical: https://thelocalbench.com/learn/unified-memory · Data as of 2026-11-19 · The Local Bench (thelocalbench.com), data as of 2026-11-19, CC BY 4.0

Flags: [verified] checked against primary source · [sourced] cited · [estimate] formula · [sample] placeholder

Reviewed 2026-12-01 · REV 2026.12

## The plain version

Unified memory is one pool of RAM that the CPU and GPU share. VRAM is memory on a discrete graphics card, reserved for that card's GPU. Apple silicon Macs, AMD's Ryzen AI Max+ 395 (Strix Halo) and NVIDIA's DGX Spark use unified memory. A used RTX 3090 carries its own 24 GB of GDDR6X (verified: [NVIDIA RTX 3090 page](https://www.nvidia.com/en-us/geforce/graphics-cards/30-series/rtx-3090/), 2026-11-29).

Think of a large shared pitcher and a small private cup. The pitcher holds far more, but it pours slowly and two people draw from it. The cup holds little and refills fast.

Two things surprise buyers. First, the GPU never gets the whole pool: the operating system and CPU keep a share, and each platform sets its own cap. Second, more gigabytes do not add speed.

Decode, the step that writes each new token, reads the model's active weights from memory once per token. Its speed follows [memory bandwidth](/learn/memory-bandwidth), the rate memory delivers data in GB/s. [Issue 001](/issues/001) drew the 24 GB line; unified memory is one way across it.

**The rule of thumb.** Capacity decides what fits; bandwidth decides how fast it runs. Plan on about three quarters of a unified pool for the model (estimate: [Local Bench methodology](/about#methodology), 2026-11-19).

Take [gpt-oss-120b](/models/gpt-oss-120b) at MXFP4, a 4-bit format, with 8k tokens of context. Its 64.3 GB (estimate: [datasheet](/models/gpt-oss-120b), 2026-11-19) covers weights, the [KV cache](/learn/kv-cache) (memory that holds the conversation so far) and runtime overhead.

On a [Ryzen AI Max+ 395 128 GB mini PC](/hardware/ryzen-ai-max-395-128g), 128 × 0.75 = 96 GB is usable, with a fit line of 86.4 GB (estimate: [methodology](/about#methodology), 2026-11-29). The model fits.

On a [used RTX 3090](/hardware/rtx-3090-24g-used), usable VRAM is 23.5 GB (estimate: [methodology](/about#methodology), 2026-11-29). The rest spills to system RAM, called offloading, and decode runs at about 17.3 tok/s (estimate: [RTX 3090 datasheet](/hardware/rtx-3090-24g-used), 2026-11-19).

> **Why it matters for your rig**
>

Single-stream decode at 8k context: Qwen3 32B and Llama 3.3 70B at Q4_K_M, gpt-oss-120b at MXFP4. Each "fit check" opens the configurator for gpt-oss-120b on that device.

| Device | Memory (GB) | Usable for GPU (GB) | Bandwidth (GB/s) | [Qwen3 32B](/models/qwen3-32b) decode (tok/s) | [Llama 3.3 70B](/models/llama-3.3-70b) decode (tok/s) | gpt-oss-120b decode (tok/s) | Price (USD) |
| --- | --- | --- | --- | --- | --- | --- | --- |
| [RTX 3090 (used)](/hardware/rtx-3090-24g-used), [fit check](/configurator?model=gpt-oss-120b&quant=MXFP4&ctx=8192&hw=rtx-3090-24g-used) | 24 (verified: [NVIDIA](https://www.nvidia.com/en-us/geforce/graphics-cards/30-series/rtx-3090/), 2026-11-29) | 23.5 (estimate: [methodology](/about#methodology), 2026-11-29) | 936 (sourced: [datasheet, via Wikipedia](/hardware/rtx-3090-24g-used), 2026-11-19) | 25.6, tight (estimate: [datasheet](/hardware/rtx-3090-24g-used), 2026-11-19) | 1.4, offload (estimate: [datasheet](/hardware/rtx-3090-24g-used), 2026-11-19) | 17.3, offload (estimate: [datasheet](/hardware/rtx-3090-24g-used), 2026-11-19) | 1,403 used (sourced: [datasheet, via getpcparts.com](/hardware/rtx-3090-24g-used), 2026-11-14) |
| [Mac Studio M5 Max 128 GB](/hardware/mac-studio-m5-max-128g), [fit check](/configurator?model=gpt-oss-120b&quant=MXFP4&ctx=8192&hw=mac-studio-m5-max-128g) | 128 (sourced: [datasheet](/hardware/mac-studio-m5-max-128g), 2026-11-19) | 96 (estimate: [methodology](/about#methodology), 2026-11-29) | 614 (verified: [Apple](https://www.apple.com/mac-studio/specs/), 2026-11-29) | 12.6 (estimate: [datasheet](/hardware/mac-studio-m5-max-128g), 2026-11-19) | 6.1 (estimate: [datasheet](/hardware/mac-studio-m5-max-128g), 2026-11-19) | 89.9, fit (estimate: [datasheet](/hardware/mac-studio-m5-max-128g), 2026-11-19) | 5,399 new (sourced: [datasheet, Apple store](/hardware/mac-studio-m5-max-128g), 2026-11-19) |
| [Ryzen AI Max+ 395 mini PC 128 GB](/hardware/ryzen-ai-max-395-128g), [fit check](/configurator?model=gpt-oss-120b&quant=MXFP4&ctx=8192&hw=ryzen-ai-max-395-128g) | 128 (verified: [AMD](https://www.amd.com/en/products/processors/desktops/ryzen/ryzen-ai-halo/ryzen-ai-max-plus-395.html), 2026-11-29) | 96 (estimate: [methodology](/about#methodology), 2026-11-29) | 256 (verified: [AMD](https://www.amd.com/en/products/processors/desktops/ryzen/ryzen-ai-halo/ryzen-ai-max-plus-395.html), 2026-11-29) | 5.3 (estimate: [datasheet](/hardware/ryzen-ai-max-395-128g), 2026-11-19) | 2.5 (estimate: [datasheet](/hardware/ryzen-ai-max-395-128g), 2026-11-19) | 37.5, fit (estimate: [datasheet](/hardware/ryzen-ai-max-395-128g), 2026-11-19) | 3,599 new (sourced: [datasheet, via computingforgeeks.com](/hardware/ryzen-ai-max-395-128g), 2026-10-22) |
| [DGX Spark FE 128 GB](/hardware/dgx-spark-128g), [fit check](/configurator?model=gpt-oss-120b&quant=MXFP4&ctx=8192&hw=dgx-spark-128g) | 128 (verified: [NVIDIA](https://www.nvidia.com/en-us/products/workstations/dgx-spark/), 2026-11-17) | 96 (estimate: [methodology](/about#methodology), 2026-11-29) | 273 (verified: [NVIDIA](https://www.nvidia.com/en-us/products/workstations/dgx-spark/), 2026-11-17) | 5.6 (estimate: [datasheet](/hardware/dgx-spark-128g), 2026-11-19) | 2.7 (estimate: [datasheet](/hardware/dgx-spark-128g), 2026-11-19) | 52.9, fit (sourced: [datasheet](/hardware/dgx-spark-128g), 2026-11-19) | 4,699 new (sourced: [datasheet, via vucense.com](/hardware/dgx-spark-128g), 2026-10-12) |

The 3090 is faster on models that fit 24 GB: Qwen3 32B decodes at about twice the Mac's estimate. The 128 GB machines win on capacity: gpt-oss-120b fits all three, and the 3090 offloads it.

Ranked by decode tok/s within the 128 GB class only, the Mac leads on all three models, in line with its 614 GB/s. Its figures are estimates; the DGX Spark's gpt-oss-120b figure is the only sourced one.

Prices are hardware only, new except the used RTX 3090, with sources and dates as shown. Tax, shipping and peripherals are excluded.



## Room for disagreement

The three-quarters default is a Local Bench assumption, and no vendor publishes it. One 64 GB M4 Max reported a Metal working-set cap of 55,662.79 MB, about 85% (sourced: [llama.cpp discussion #16578, user spamshaker](https://github.com/ggml-org/llama.cpp/discussions/16578), 2025-11-16). Your Mac may sit higher or lower.

Stock Linux shrinks the pool further. On Strix Halo, the GTT limit (the RAM the GPU may map) defaults to about 50% of system RAM (verified: [ROCm 7.2.0 docs](https://rocm.docs.amd.com/en/docs-7.2.0/how-to/system-optimization/strixhalo.html), 2026-02-20). That is about 64 GB on 128 GB (estimate: derived from the ROCm 7.2.0 docs, 2026-11-29), so gpt-oss-120b does not fit until you raise it.

Dense models expose the bandwidth gap. Llama 3.3 70B, a dense model that reads every weight per token, decodes at about 2.5 tok/s on Strix Halo (estimate: [datasheet](/hardware/ryzen-ai-max-395-128g), 2026-11-19). gpt-oss-120b is quicker because it is a [mixture-of-experts](/learn/mixture-of-experts) model that reads only a few experts per token.

Prefill, the step that reads your prompt before the first token, is limited by compute. Long documents feel slower on these machines even when decode is fine. DGX Spark lists up to 1 PFLOP FP4 (verified: [NVIDIA](https://www.nvidia.com/en-us/products/workstations/dgx-spark/), 2026-11-17), a theoretical figure with sparsity; Local Bench prefill figures for these machines are not yet measured.

Other routes exist. [Two used RTX 3090s](/hardware/2x-rtx-3090-48g-used) add capacity, though one stream still passes through each card in turn (see the [memory bandwidth explainer](/learn/memory-bandwidth)). A [MacBook Pro M4 Max 128 GB](/hardware/macbook-pro-m4-max-128g) lists 546 GB/s (verified: [Apple Support specs](https://support.apple.com/en-us/121553), 2026-11-29) if the pool must travel.

**What we do not know yet.** Apple does not document the default GPU share of unified memory. NVIDIA documents no GPU-usable cap for DGX Spark. The η efficiency values are uncalibrated estimates, and The Local Bench has no owned-hardware measurements yet. The DGX Spark price has not been re-verified since 2026-10-12, and the RTX 3090 bandwidth comes from Wikipedia because NVIDIA's page lists no GB/s figure.

## The technical layer

### How much the GPU can actually use

| Platform | Default GPU share | How to change it | Source |
| --- | --- | --- | --- |
| macOS (Apple silicon) | Metal working-set cap, undocumented by Apple; llama.cpp prints it as `recommendedMaxWorkingSetSize` | `sudo sysctl iogpu.wired_limit_mb=<MB>`, kept below total memory | verified: [MLX set_wired_limit docs](https://ml-explore.github.io/mlx/build/html/python/_autosummary/mlx.core.set_wired_limit.html), 2026-11-29 |
| Strix Halo, Windows | Variable Graphics Memory up to 96 GB of 128 GB, subtracted from CPU RAM | AMD Software: Adrenalin Edition | verified: [AMD VGM blog](https://www.amd.com/en/blogs/2025/faqs-amd-variable-graphics-memory-vram-ai-model-sizes-quantization-mcp-more.html), 2025-07-29 |
| Strix Halo, Linux | GTT about 50% of RAM | Raise TTM `pages_limit`; keep BIOS VRAM at 0.5 GB | verified: [ROCm 7.2.0 docs](https://rocm.docs.amd.com/en/docs-7.2.0/how-to/system-optimization/strixhalo.html), 2026-02-20 |
| DGX Spark | 128 GB coherent unified; 2 GB display reserve by default (0.5 to 4 GB configurable); no documented GPU cap | UEFI display setting; `cudaMemGetInfo` may under-report | verified: [NVIDIA porting guide](https://docs.nvidia.com/dgx/dgx-spark-porting-guide/latest/optimization.html), 2026-11-16 |

With `raised=1`, the configurator assumes 0.90 of the pool: 115.2 GB on 128 GB, fit line 103.7 GB (estimate: [methodology](/about#methodology), 2026-11-29).

### The formula

From the [Local Bench methodology](/about#methodology) (estimate, 2026-11-19):

```
M   = W + KV + O
U   = VRAM − 0.5            (discrete GPU)
U   = RAM × 0.75            (unified; 0.90 with raised=1)
fit when M ≤ 0.9 × U
tps ≈ η × BW / (W × active/total + KV)
η   = 0.60 discrete GPU, 0.45 unified
```

W is the weight file in GB, KV the cache, O runtime overhead, M total memory and U usable memory. BW is bandwidth in GB/s. Read every speed result as an estimate with an uncalibrated band of plus or minus 25%, a Local Bench explainer convention.

gpt-oss-120b has a 63.39 GB MXFP4 file (verified: [datasheet](/models/gpt-oss-120b), 2026-11-19), with 116.83 B total parameters (verified) and 5.1 B active (sourced, same datasheet and date). Active bytes per token are 63.39 × 5.1 / 116.83 ≈ 2.77 GB (estimate: derived, 2026-11-29).

On Strix Halo, 256 / 2.77 gives a ceiling of about 92 tok/s before η (estimate: derived, 2026-11-29). The 37.5 tok/s datasheet figure applies η and adds KV reads.

Decode follows bandwidth because each token reads the active weights and the KV cache once. Memory moves a fixed number of bytes per second, so tokens per second is bandwidth divided by bytes per token.

Community llama-bench runs give a cross-check. User eugr reported 60.57 tok/s tg32 at depth 0 on DGX Spark (sourced: [llama.cpp #16578](https://github.com/ggml-org/llama.cpp/discussions/16578), 2025-11-02; CUDA, build 6922, Fedora 43). The same user reported 47.49 tok/s on a GMKtec Evo X2 Strix Halo (sourced: same thread, 2025-10-22; HIP/ROCm, build 6816). At a 32,768-token depth, those runs fell to 40.55 and 35.39 tok/s (sourced: same thread and dates). They are one user's builds, so use them to sanity-check the estimates, not to rank.

### Runtime flags

Flag names below are from llama.cpp current master (verified: [server README](https://github.com/ggml-org/llama.cpp/blob/master/tools/server/README.md) and [build.md](https://github.com/ggml-org/llama.cpp/blob/master/docs/build.md), 2026-11-29).

```
llama-server -m model.gguf -ngl auto -fa on --load-mode auto
GGML_CUDA_ENABLE_UNIFIED_MEMORY=1 llama-server -m model.gguf
```

- `-ngl` sets how many layers go to the GPU; the default is `auto`.
- `-fa` turns flash attention `on`, `off` or `auto`.
- `--load-mode` chooses mmap, mlock and related loading behaviour in current master.
- `GGML_CUDA_ENABLE_UNIFIED_MEMORY=1` on Linux CUDA lets a discrete GPU spill to system RAM instead of crashing. On HIP, the same variable shares memory with integrated GPUs and hurts performance on discrete GPUs.
- The configurator's `raised=1` switches the unified share from 0.75 to 0.90.

### Pitfalls

- Out-of-memory errors arrive below the headline capacity, because each platform caps the GPU share.
- Stock Linux on Strix Halo stops near 64 GB until you raise the GTT limit.
- With `GGML_CUDA_ENABLE_UNIFIED_MEMORY=1`, an oversized model on a discrete card runs at system-RAM speed rather than failing.
- The KV cache grows with context and can push a fitting model over the line; see [KV cache](/learn/kv-cache).
- On DGX Spark, buffer cache counts as used memory; NVIDIA gives `drop_caches` as a debugging workaround only.
- The MLX docs do not say whether a raised wired limit persists, so check the value after a restart.

## Sources

- [Apple, Mac Studio technical specifications](https://www.apple.com/mac-studio/specs/)
- [Apple Support, MacBook Pro (14-inch, M4 Pro or M4 Max, 2024) tech specs](https://support.apple.com/en-us/121553)
- [NVIDIA, DGX Spark product page](https://www.nvidia.com/en-us/products/workstations/dgx-spark/)
- [NVIDIA, DGX Spark porting guide: optimization](https://docs.nvidia.com/dgx/dgx-spark-porting-guide/latest/optimization.html)
- [AMD, Ryzen AI Max+ 395 product page](https://www.amd.com/en/products/processors/desktops/ryzen/ryzen-ai-halo/ryzen-ai-max-plus-395.html)
- [AMD blog, Variable Graphics Memory FAQ (2025-07-29)](https://www.amd.com/en/blogs/2025/faqs-amd-variable-graphics-memory-vram-ai-model-sizes-quantization-mcp-more.html)
- [AMD ROCm 7.2.0 docs, Strix Halo system optimization](https://rocm.docs.amd.com/en/docs-7.2.0/how-to/system-optimization/strixhalo.html)
- [MLX docs, mlx.core.set_wired_limit](https://ml-explore.github.io/mlx/build/html/python/_autosummary/mlx.core.set_wired_limit.html)
- [llama.cpp, docs/build.md](https://github.com/ggml-org/llama.cpp/blob/master/docs/build.md)
- [llama.cpp, server README (flags)](https://github.com/ggml-org/llama.cpp/blob/master/tools/server/README.md)
- [llama.cpp discussion #16578 (community runs and Metal logs)](https://github.com/ggml-org/llama.cpp/discussions/16578)
- [NVIDIA, GeForce RTX 3090 page](https://www.nvidia.com/en-us/geforce/graphics-cards/30-series/rtx-3090/)
- [Methodology: estimation method and η calibration](/about#methodology)

Try it: https://thelocalbench.com/configurator?model=gpt-oss-120b&quant=MXFP4&ctx=8192&hw=ryzen-ai-max-395-128g
