Which local AI models fit on which hardware

Reviewed by the Contractor AI Shop research team · Last updated Oct 14, 2026 · How we research

Why this matters: running a model on hardware you own keeps bids, specs and pricing private. Two numbers decide whether that works: memory (does the model fit?) and memory bandwidth (how fast does it write?). This guide gives you the math, real download sizes, fits-on matrices at two context lengths, measured speeds with the software used, and picks per contractor task. Every number links to its source; the full list is at the bottom.

1. Tokens, and tokens per second, in plain words

Models read and write in tokens, small chunks of text. OpenAI's rule of thumb for English is that one token is about four characters, or about three-quarters of a word, so 100 tokens is roughly 75 words. Speeds are quoted in tokens per second (tok/s), and there are two very different speeds:

So a machine can read a 50-page spec quickly and still write slowly, or the reverse. Quote both when you compare hardware.

2. The memory math

Memory needed = model weights + KV cache + runtime overhead.

3. Long documents: how memory grows with context

A spec book is where local AI gets tight. Using OpenAI's ratio, 30,000 words is about 40,000 tokens. The KV cache for that context, per user, at FP16, computed from each model's published configuration:

ModelPer 1,000 tokens8K tokens (about 6,000 words)32K (about 24,000 words)128K (about 96,000 words)
Llama 3.1 8B0.13GB1.1GB4.3GB17GB
Qwen3 32B0.26GB2.1GB8.6GBn/a (native limit about 41K)
Llama 3.3 70B0.33GB2.7GB10.7GB43GB
gpt-oss 120B0.07GB or less0.6GB2.4GB9.7GB

Computed with the Together AI formula from the config.json files linked in the references (decimal GB). gpt-oss uses a 128-token sliding window on half its layers, so its real cache is smaller than shown. Qwen3's config lists a 40,960-token native context.

Ways to stay inside memory: feed the model the relevant spec sections instead of the whole book (that is what document-Q&A tools such as Open WebUI's retrieval do); set the context length to what you actually use; and consider an 8-bit KV cache, which roughly halves cache size. LLMFit reports Q8 KV cache as near-lossless for most models, with 4-bit cache costing more quality. Long context also slows generation: in MacStories testing summarized by senn-tech, Qwen3.8-27B on an M5 Ultra went from 48 tok/s on a short prompt to 32 tok/s at 128K tokens.

4. Hardware tiers (verified specs)

HardwareMemory optionsBandwidthSoftwarePowerSourced price
Mac mini M616, 24 or 32GB unified153GB/s (16GB); 170GB/s (24/32GB)macOS: Metal, MLX, Ollama, LM Studion/aFrom $900 (Daring Fireball price table)
Mac mini M5 Pro24, 48 or 64GB307GB/smacOSn/aFrom $1,700 (Daring Fireball)
Mac Studio M5 Max36GB; 48, 64 or 128GB with the 40-core GPU460GB/s (32-core GPU); 614GB/s (40-core)macOS480W max continuous (Apple spec)From $2,499 (Apple)
Mac Studio M5 Ultra96GB; 256 or 512GB with the 80-core GPU1.2TB/smacOS480W max continuousFrom $5,499 (Apple); 512GB price not announced
NVIDIA DGX Spark128GB unified LPDDR5x (a 64GB OEM version ships Oct 23)273GB/sDGX OS (Ubuntu), CUDA, vLLM, SGLang, TensorRT-LLM, Ollama240W adapter; GB10 chip 140W$6,950 on NVIDIA Marketplace (128GB, 4TB); 64GB from $4,999 (NVIDIA)
RTX 409024GB GDDR6X1,008GB/sWindows or Linux, CUDA450W cardNo current NVIDIA list price; older card
RTX 509032GB GDDR71,792GB/sWindows or Linux, CUDA575W card$1,999 launch price (NVIDIA), card only

Specs: Apple Mac mini specs, Apple Mac Studio specs, NVIDIA DGX Spark, DGX Spark user guide, NVIDIA GeForce comparison, NVIDIA RTX Blackwell whitepaper (card power). DGX Spark pricing history: $3,999 at launch, $4,699 from Feb 23, 2026 (NVIDIA forum), $6,950 on NVIDIA's marketplace as of Oct 2026 (listing, tracked by GPUwerk). A GPU card needs a full PC around it, and its price is not included. Apple and NVIDIA prices are US prices and change; check before buying.

The usable memory for each column of the matrices below:

5. Fits-on matrix at 8K tokens (everyday chat, email, short documents)

ModelDownload size Q4 / Q8 / FP16KV cache at 8,192 tokens16GB MacRTX 4090RTX 509032GB Mac64GB MacDGX Spark128GB Mac256GB Mac512GB Mac
Llama 3.1 8B
Dense · 8.03B · llama3.1:8b
4.9GB / 8.5GB / 16GB1.1GBQ8FP16FP16FP16FP16FP16FP16FP16FP16
Qwen3 14B
Dense · 14.8B · qwen3:14b
9.3GB / 16GB / 30GB1.3GBQ4Q8Q8Q8FP16FP16FP16FP16FP16
gpt-oss 20B
MoE · 20.9B · gpt-oss:20b
14GB (MXFP4)0.4GB
upper bound; half the layers use a 128-token sliding window
NoMXFP4MXFP4MXFP4MXFP4MXFP4MXFP4MXFP4MXFP4
Mistral Small 3.2 24B
Dense · 24.0B · mistral-small3.2:24b
15GB / 26GB / n/a1.3GBNoQ4Q8Q4Q8Q8Q8Q8Q8
Gemma 3 27B
Dense · 27.4B · gemma3:27b
17GB / 30GB / 55GB4.2GB
upper bound; most layers use a 1,024-token sliding window
NoQ4Q4Q4Q8FP16FP16FP16FP16
Gemma 4 26B-A4B
MoE · 26B (per name) · gemma4:26b
18GB / 28GB / 52GBnot computedNoQ4Q8Q4Q8FP16FP16FP16FP16
Gemma 4 31B
Dense · 31B (per name) · gemma4:31b
20GB / 34GB / 63GBnot computedNoQ4Q4Q4Q8FP16FP16FP16FP16
Qwen3.6 27B
Dense · 27.8B · qwen3.6:27b
17GB / 30GB / 56GBnot computedNoQ4Q8Q4Q8FP16FP16FP16FP16
Qwen3 30B-A3B
MoE · 30.5B · qwen3:30b-a3b
19GB / 33GB / 61GB0.8GBNoQ4Q4Q4Q8FP16FP16FP16FP16
Qwen3 32B
Dense · 32.8B · qwen3:32b
20GB / 35GB / 66GB2.1GBNoQ4Q4Q4Q8FP16FP16FP16FP16
Qwen3.6 35B-A3B
MoE · 36.0B · qwen3.6:35b-a3b
23GB / 39GB / 72GBnot computedNoNoQ4NoQ8FP16FP16FP16FP16
Llama 3.1 / 3.3 70B
Dense · 70.6B · llama3.3:70b
43GB / 75GB / 141GB2.7GBNoNoNoNoQ4Q8Q8FP16FP16
gpt-oss 120B
MoE · 116.8B · gpt-oss:120b
65GB (MXFP4)0.6GB
upper bound; half the layers use a 128-token sliding window
NoNoNoNoNoMXFP4MXFP4MXFP4MXFP4
Qwen3 235B-A22B
MoE · 235.1B · qwen3:235b
142GB / 250GB / 470GB1.6GBNoNoNoNoNoNoNoQ4Q8
Llama 3.1 405B
Dense · 405B · llama3.1:405b
243GB / 431GB / 812GB4.2GBNoNoNoNoNoNoNoNoQ4
DeepSeek-R1 671B
MoE · 684.5B (incl. MTP layer) · deepseek-r1:671b
404GB / 713GB / 1300GB0.6GB
compressed MLA cache, assumes the runtime supports it
NoNoNoNoNoNoNoNoNo

Cells show the highest-quality version that fits at 8,192 tokens of context. A model fits when download size + KV cache at the stated context (FP16 cache, from each model's config.json) + runtime overhead (0.9GB + 3%, the Ollama figure published by VRAMCalculator) is at or below the tier's usable memory. Macs are counted at 75% of unified memory, the default GPU limit noted by the llama.cpp maintainer; NVIDIA GPUs at full VRAM; DGX Spark at its full 128GB, which DGX OS also shares. Models marked "not computed" use newer attention designs, so only weights and overhead are counted; leave extra room. Sizes are Ollama download sizes, checked Oct 14, 2026.

6. Fits-on matrix at 32K tokens (long specs, contracts, agent work)

ModelDownload size Q4 / Q8 / FP16KV cache at 32,768 tokens16GB MacRTX 4090RTX 509032GB Mac64GB MacDGX Spark128GB Mac256GB Mac512GB Mac
Llama 3.1 8B
Dense · 8.03B · llama3.1:8b
4.9GB / 8.5GB / 16GB4.3GBQ4FP16FP16FP16FP16FP16FP16FP16FP16
Qwen3 14B
Dense · 14.8B · qwen3:14b
9.3GB / 16GB / 30GB5.4GBNoQ8Q8Q8FP16FP16FP16FP16FP16
gpt-oss 20B
MoE · 20.9B · gpt-oss:20b
14GB (MXFP4)1.6GB
upper bound; half the layers use a 128-token sliding window
NoMXFP4MXFP4MXFP4MXFP4MXFP4MXFP4MXFP4MXFP4
Mistral Small 3.2 24B
Dense · 24.0B · mistral-small3.2:24b
15GB / 26GB / n/a5.4GBNoQ4Q4Q4Q8Q8Q8Q8Q8
Gemma 3 27B
Dense · 27.4B · gemma3:27b
17GB / 30GB / 55GB16.6GB
upper bound; most layers use a 1,024-token sliding window
NoNoNoNoQ4FP16FP16FP16FP16
Gemma 4 26B-A4B
MoE · 26B (per name) · gemma4:26b
18GB / 28GB / 52GBnot computedNoQ4Q8Q4Q8FP16FP16FP16FP16
Gemma 4 31B
Dense · 31B (per name) · gemma4:31b
20GB / 34GB / 63GBnot computedNoQ4Q4Q4Q8FP16FP16FP16FP16
Qwen3.6 27B
Dense · 27.8B · qwen3.6:27b
17GB / 30GB / 56GBnot computedNoQ4Q8Q4Q8FP16FP16FP16FP16
Qwen3 30B-A3B
MoE · 30.5B · qwen3:30b-a3b
19GB / 33GB / 61GB3.2GBNoQ4Q4Q4Q8FP16FP16FP16FP16
Qwen3 32B
Dense · 32.8B · qwen3:32b
20GB / 35GB / 66GB8.6GBNoNoQ4NoQ8FP16FP16FP16FP16
Qwen3.6 35B-A3B
MoE · 36.0B · qwen3.6:35b-a3b
23GB / 39GB / 72GBnot computedNoNoQ4NoQ8FP16FP16FP16FP16
Llama 3.1 / 3.3 70B
Dense · 70.6B · llama3.3:70b
43GB / 75GB / 141GB10.7GBNoNoNoNoNoQ8Q8FP16FP16
gpt-oss 120B
MoE · 116.8B · gpt-oss:120b
65GB (MXFP4)2.4GB
upper bound; half the layers use a 128-token sliding window
NoNoNoNoNoMXFP4MXFP4MXFP4MXFP4
Qwen3 235B-A22B
MoE · 235.1B · qwen3:235b
142GB / 250GB / 470GB6.3GBNoNoNoNoNoNoNoQ4Q8
Llama 3.1 405B
Dense · 405B · llama3.1:405b
243GB / 431GB / 812GB16.9GBNoNoNoNoNoNoNoNoQ4
DeepSeek-R1 671B
MoE · 684.5B (incl. MTP layer) · deepseek-r1:671b
404GB / 713GB / 1300GB2.3GB
compressed MLA cache, assumes the runtime supports it
NoNoNoNoNoNoNoNoNo

Cells show the highest-quality version that fits at 32,768 tokens of context. A model fits when download size + KV cache at the stated context (FP16 cache, from each model's config.json) + runtime overhead (0.9GB + 3%, the Ollama figure published by VRAMCalculator) is at or below the tier's usable memory. Macs are counted at 75% of unified memory, the default GPU limit noted by the llama.cpp maintainer; NVIDIA GPUs at full VRAM; DGX Spark at its full 128GB, which DGX OS also shares. Models marked "not computed" use newer attention designs, so only weights and overhead are counted; leave extra room. Sizes are Ollama download sizes, checked Oct 14, 2026.

These matrices are for one user. Each extra simultaneous user adds another KV cache, so an office of five people on one box needs five times the cache column.

7. Measured speeds

Same small model, every machine. The llama.cpp project keeps community scoreboards that run one standard test (Llama 2 7B at Q4_0, reading 512 tokens and writing 128) on each machine. That isolates the hardware:

HardwareReads (prompt tok/s)Writes (generation tok/s)llama.cpp build
RTX 509014,9703008cf6b42 (flash attention on)
RTX 409014,7711892241453 (flash attention on)
Mac Studio M5 Ultra (80-core GPU)4,945179c1d0e7a
M5 Max (40-core GPU)3,220120c1d0e7a
DGX Spark3,661575acd455 (flash attention on)
Mac mini M5 Pro (16-core GPU)1,3406860081bb
Mac mini M6 (32GB)98936c1d0e7a

Sources: llama.cpp CUDA scoreboard (NVIDIA rows) and llama.cpp Apple Silicon scoreboard (Mac rows). Builds differ between rows, so treat small gaps as noise.

Big models people actually run:

HardwareModelSoftwareReads (tok/s)Writes (tok/s)Source
DGX Sparkgpt-oss 120B (MXFP4)llama.cpp build 7941 (11fb327bf)2,444 (2,048-token prompt)58.7llama.cpp DGX Spark benches
DGX Sparkgpt-oss 120BSGLang (after LMSYS and NVIDIA optimizations)n/aabout 50LMSYS, Nov 2025
DGX Sparkgpt-oss 120BOllama at launch (Oct 2025)9511.7LMSYS review
DGX SparkLlama 3.1 70B (FP8)SGLang, 1 user8042.7LMSYS review
DGX SparkLlama 3.1 8B (FP8)SGLang, 32 users at once7,949368 combinedLMSYS review
DGX SparkQwen3-Coder 30B-A3B (Q8_0)llama.cpp build 79412,98761.1llama.cpp DGX Spark benches
DGX Sparkgpt-oss 20B (MXFP4)llama.cpp build 79414,50683.4llama.cpp DGX Spark benches
RTX 5090gpt-oss 20B (MXFP4)Ollama8,519205LMSYS review
Mac Studio M5 Ultra 256GBgpt-oss 120BoMLX v0.7.0.dev4, macOS 27.01,049 (1K prompt); 2,829 (4K)110oMLX benchmark

Three lessons: software matters (gpt-oss 120B on the Spark went from 11.7 tok/s in Ollama at launch to about 50 to 59 with tuned engines); mixture-of-experts models are much faster than dense models of similar size on bandwidth-limited machines, because only a few billion weights are active per token; and batching multiplies throughput when several people or an agent share one box.

8. Mac vs DGX Spark vs GPU PC

9. Recommended picks per tier

TierEmail drafting, quick answersDocument Q&A (specs, RFIs, contracts)Estimating help and agents
16GB MacLlama 3.1 8B (Q8)Qwen3 14B (Q4), short documents onlyUse a bigger machine; keep this one as a client
RTX 4090 / 32GB Macgpt-oss 20BGemma 4 26B-A4B or Qwen3.6 27B (Q4)Qwen3 30B-A3B (Q4)
RTX 5090gpt-oss 20BQwen3.6 27B or Gemma 4 26B-A4B (Q8 at 8K)Qwen3.6 35B-A3B (Q4)
64GB Macgpt-oss 20BQwen3.6 27B (Q8)Qwen3.6 35B-A3B (Q8); Llama 3.3 70B (Q4) at short context
DGX Sparkgpt-oss 20Bgpt-oss 120Bgpt-oss 120B; dense 70B only for batch jobs
128GB Macgpt-oss 20Bgpt-oss 120Bgpt-oss 120B
256GB Macgpt-oss 20Bgpt-oss 120BQwen3 235B-A22B (Q4)
512GB Macgpt-oss 20Bgpt-oss 120B or Qwen3 235B-A22B (Q8)Qwen3 235B-A22B (Q8); Llama 3.1 405B (Q4) for batch work

Picks are editorial suggestions based on what fits with room for context. Model quality was not benchmarked here; test two candidates on your own bids and documents before you standardize, and always check numbers in an estimate yourself.

10. DGX Spark in depth

The DGX Spark pairs a Blackwell GPU and a 20-core Arm CPU with 128GB of coherent unified memory at 273GB/s. NVIDIA rates one unit for models up to 200 billion parameters, and the user guide says two linked units handle up to 405B. NVIDIA's new 64GB OEM version is rated for models up to 100B.

What fits: everything in the DGX Spark column above, including gpt-oss 120B (65GB), Llama 3.3 70B at Q8 (75GB) and every 30B-class model at FP16. Qwen3 235B-A22B at Q4 (142GB) does not fit on one unit; NVIDIA demonstrates Qwen-235B on two connected Sparks in NVFP4.

Recommended: gpt-oss 120B as the office's main model for document Q&A, estimating help and agents (about 50 to 59 tok/s with SGLang or current llama.cpp); gpt-oss 20B or Qwen3 30B-A3B for fast drafting (61 to 83 tok/s in llama.cpp); dense 70B models only for overnight batch work, since they write at about 2.7 tok/s for one user.

Real-world tips:

11. Mac Studio M5 Ultra with 512GB: confirmed for late October

Status as of Oct 14, 2026: announced by Apple, not yet shipping. Apple's August 25, 2026 press release says "Mac Studio with 512GB of unified memory is coming in late October," and the Mac Studio page carries the footnote "512GB memory option for M5 Ultra coming late October." The 96GB and 256GB M5 Ultra models began arriving September 22. Apple has not published the 512GB price; The Verge lists it as TBD, and MacRumors expects it to start well above $10,000 (an expectation, not an Apple price).

The 512GB option requires the 36-core CPU and 80-core GPU M5 Ultra, with 1.2TB/s of memory bandwidth (Apple tech specs). With about 384GB usable by default, it would hold, per the matrices above:

No independent tests of the 512GB configuration exist yet. The 256GB M5 Ultra uses the same chip and bandwidth, so its gpt-oss 120B result (110 tok/s writing in oMLX) is a reasonable guide for models that fit in both; larger models will write more slowly because more weights are read per token.

12. Getting started

Find your column, pick one model from section 9, and run it with Ollama (for example ollama run gpt-oss:20b). For a Mac walkthrough see Local AI on a Mac Studio with Ollama. To size a model we do not list, the calculators at VRAMCalculator, LLMFit and CanItRun use the same weights-plus-cache-plus-overhead approach.

Research notes

How we research

Independent guide; not affiliated with Apple, NVIDIA, Ollama or any model publisher.

References

All accessed Oct 14, 2026.

  1. Apple, "Apple introduces new Mac Studio with M5 Max and M5 Ultra," press release, Aug 25, 2026. apple.com/newsroom
  2. Apple, Mac Studio product page. apple.com/mac-studio
  3. Apple Support, Mac Studio (M5 Max or M5 Ultra) Tech Specs. support.apple.com/en-us/128107
  4. Apple, Mac Studio compare page. apple.com/mac-studio/compare
  5. Apple, Mac mini Technical Specifications. apple.com/mac-mini/specs
  6. Daring Fireball, configurations and pricing for the new Mac minis and Mac Studios, Aug 2026. daringfireball.net
  7. The Verge, Mac Studio M5 Max and M5 Ultra launch. theverge.com
  8. MacRumors, Mac Studio with M5 Ultra and 512GB launching in October, Aug 25, 2026. macrumors.com
  9. NVIDIA, DGX Spark product page. nvidia.com
  10. NVIDIA, DGX Spark User Guide, Hardware Overview. docs.nvidia.com
  11. NVIDIA Marketplace, DGX Spark listing. marketplace.nvidia.com
  12. NVIDIA Developer Forums, "2/23/2026 Price Change Announcement." forums.developer.nvidia.com
  13. NVIDIA Blog, "NVIDIA DGX Spark 64GB," Oct 2, 2026. blogs.nvidia.com
  14. GPUwerk, DGX Spark price history. gpuwerk.com
  15. NVIDIA Technical Blog, "New Software and Model Optimizations Supercharge NVIDIA DGX Spark." developer.nvidia.com
  16. NVIDIA, DGX Spark playbooks and "Connect Two Sparks." build.nvidia.com/spark, stacked sparks
  17. NVIDIA, GeForce RTX 5090 and RTX 4090 pages and GeForce comparison. RTX 5090, RTX 4090, compare
  18. NVIDIA, RTX Blackwell GPU Architecture whitepaper. images.nvidia.com
  19. NVIDIA Newsroom, GeForce RTX 50 Series announcement (RTX 5090 at $1,999). nvidianews.nvidia.com
  20. llama.cpp, "Performance of llama.cpp on Apple Silicon M-series," Discussion #4167. github.com
  21. llama.cpp, "Performance of llama.cpp on Nvidia CUDA," Discussion #15013. github.com
  22. llama.cpp, DGX Spark benchmarks. github.com
  23. LMSYS, "NVIDIA DGX Spark In-Depth Review," Oct 13, 2025. lmsys.org
  24. LMSYS, "Optimizing GPT-OSS on NVIDIA DGX Spark," Nov 3, 2025. lmsys.org
  25. oMLX, gpt-oss-120b on M5 Ultra (80c) benchmark. omlx.ai
  26. senn-tech, "M5 Ultra: the first measured numbers for local language models," Sep 22, 2026 (summarizes MacStories, Alex Ziskind and Alex Grankin). senn-tech.com
  27. ServeTheHome, NVIDIA DGX Spark review, page 4 (power and noise). servethehome.com
  28. Tom's Hardware, NVIDIA DGX Spark review, page 4 (power, heat and noise). tomshardware.com
  29. Together AI, "KV cache explained." together.ai
  30. NVIDIA Technical Blog, "Mastering LLM Techniques: Inference Optimization." developer.nvidia.com
  31. NVIDIA Technical Blog, "Accelerate Large-Scale LLM Inference and KV Cache Offload with CPU-GPU Memory Sharing." developer.nvidia.com
  32. VRAMCalculator, engine overhead figures. vramcalculator.com
  33. LLMFit, context length calculator and "What can I run." context calculator, what can I run
  34. CanItRun. canitrun.dev
  35. OpenAI Help Center, "Understanding and counting tokens." help.openai.com
  36. Ollama library tag pages: llama3.1, llama3.3, qwen3, qwen3.6, gemma3, gemma4, deepseek-r1, mistral-small3.2, gpt-oss
  37. Hugging Face model cards and configs (parameter counts, layers, KV heads): Llama 3.1 8B, Llama 3.3 70B, Llama 3.1 405B architecture (Hermes 3), Qwen3 14B, Qwen3 30B-A3B, Qwen3 32B, Qwen3 235B-A22B, Qwen3.6 27B, Qwen3.6 35B-A3B, gpt-oss 20B, gpt-oss 120B, Mistral Small 3.2, Gemma 3 27B, DeepSeek-R1