← All guides

Best Local LLM for 32GB RAM (2026): Chat and Coding Picks

The best local LLM for 32GB RAM is Qwen3.8 27B at UD-Q6_K. The file is 20.47 GiB. A 32GB Mac gives the GPU about 24 GiB, so about 3.5 GiB stays free for context. For OpenClaw autonomous loops, run gpt-oss 20B at Q8_0: the file is only 11.28 GiB and its tool calls are cleaner. 32GB runs 20B-27B dense models well; it does not run 70B-class models.

Shopping, not just reading? Our full gear ladder lists every verified pick by tier — Macs, single GPUs, and multi-GPU builds — with what to buy and what to skip.

Best local LLM for 32GB RAM: the direct answer

The best local LLM for 32GB RAM is Qwen3.8 27B at UD-Q6_K. The GGUF file is 20.47 GiB [HF, unsloth/Qwen3.8-27B-GGUF, read 2026-11-04]. A 32GB Mac gives the GPU about 24 GiB by default, so about 3.5 GiB stays free for the KV cache. No other current model at this tier holds that balance of quality and headroom.

Correction (November 2026): this page said gpt-oss 20B at Q8_0 uses about 22GB. The file is 11.28 GiB. It is the smallest serious pick on this tier, not the largest.

Two answers cover almost everyone on this tier:

  1. General use and coding: Qwen3.8 27B at UD-Q6_K (20.47 GiB) — ollama run hf.co/unsloth/Qwen3.8-27B-GGUF:UD-Q6_K
  2. OpenClaw autonomous loops: gpt-oss 20B at Q8_0 (11.28 GiB) — its tool-call JSON is cleaner, which beats raw parameter count on unattended runs.
What you wantBest LLM for 32GB RAMRAM in useWhy this one
Best overallQwen3.8 27B at UD-Q6_K20.47 GiBCurrent Qwen dense 27B, near-Q8 quality, ~3.5 GiB left for context
Best for OpenClaw agentsgpt-oss 20B at Q8_011.28 GiBCleanest tool calls, least drift over 4-6 hour loops
Best for coding onlyDevstral Small 24B at Q4_K_M13.35 GiBCoding-tuned, small enough to run beside gpt-oss 20B
FastestQwen 3.6 35B-A3B at UD-Q4_K_XL20.82 GiBMoE, 3B active per token; the Q5_K_M file (24.64 GiB) is too big for a 32GB Mac
Best dense alternativeGemma 4 31B at Q4_K_M17.07 GiB256K context and image input; the Q6_K file (23.47 GiB) leaves no room for context
Do not run on 32GB70B at tiny quants, 120B models, any 27B at Q8_0 (26.63-27.05 GiB), 256K context on a 27B—Too slow, too degraded, or over the GPU limit

Is 32GB enough? Yes for 20B-27B dense models at Q6, 30B-35B MoE models at Q4, and normal OpenClaw work. Count GiB against the ~24 GiB Mac GPU limit, not against 32GB: macOS keeps the rest. (llama.cpp logs 28,991 MB on a 36GB Mac and 12,713 MB on a 16GB Mac; the 32GB value is an estimate from those two.) No for clean 70B-class daily use. Step up to best local LLM for 64GB RAM for 70B-class models and longer autonomous runs, or best local LLM for 128GB RAM for 120B-class models and multi-model routing.

Apple Mac for 32GB RAM local AI on Amazon
🛒 BEST MAC FOR 32GB RAM Apple MacBook Pro · 48GB+ unified memory For 32GB+ workloads, the premium Mac runs 32B models and dual-model OpenClaw setups without compromise. Check current price on Amazon →
Updated November 2026 — what changed on this tier
  • Qwen3.8 27B replaces Qwen 3.6 27B as the top pick: UD-Q6_K is 20.47 GiB (3.6 Q6_K was 20.98 GiB), same fit, current release
  • gpt-oss 20B size corrected — the Q8_0 file is 11.28 GiB, not ~22GB; it now pairs with a 13 GiB coding model on 32GB
  • Gemma 4 31B (dense) — run Q4_K_M (17.07 GiB); Q6_K (23.47 GiB) is over the practical limit on a 32GB Mac
  • Gemma 4 26B-A4B (Google, June 3) — 26B MoE, ~15GB at Q4, ~4B active, 45+ tok/sec, Apache 2.0
  • Devstral Small 24B (Mistral) — coding-focused, ~14.5GB at Q4, strong HumanEval
  • MLX backend — 2-3x faster than llama.cpp for Qwen 3.6 on M-series; use MLX-LM for speed

Bottom Line (November 2026)

  • Best overall pick: Qwen3.8 27B at UD-Q6_K (20.47 GiB, the current Qwen dense 27B)
  • Best for OpenClaw production: gpt-oss 20B at Q8_0 (11.28 GiB, cleanest tool-call output)
  • Fastest inference: Qwen 3.6 35B-A3B MoE at UD-Q4_K_XL (20.82 GiB, 3B active per token)
  • Best for code (new): Devstral Small 24B — Mistral’s dedicated coding model, fits easily
  • Best general lightweight: Gemma 4 26B-A4B — new June model, fast and tiny RAM footprint
  • Best dense alternative to Qwen: Gemma 4 31B at Q4_K_M (17.07 GiB) — 256K context and multimodal input, if you want a second opinion to Qwen3.8 27B

Top Picks for 32GB RAM

1. Qwen3.8 27B (UD-Q6_K) — best general-purpose

The current Qwen dense 27B. Unsloth’s UD-Q6_K file is 20.47 GiB, so it fits under the ~24 GiB Mac GPU limit with about 3.5 GiB for context. Q6_K keeps near-Q8 quality; the Q8_0 file (27.05 GiB) does not fit this tier. If you already run Qwen 3.6 27B at Q6_K (20.98 GiB), it still fits; 3.8 is the newer release at the same size.

ollama run hf.co/unsloth/Qwen3.8-27B-GGUF:UD-Q6_K

openclaw config set agents.defaults.models.chat ollama/hf.co/unsloth/Qwen3.8-27B-GGUF:UD-Q6_K
openclaw chat "Refactor src/auth.ts and update the callers"

A dense 27B at Q6 reads about 20 GiB per token, so speed follows memory bandwidth: expect 18-30 tok/sec on M2 Max and M3 Pro class chips.

2. gpt-oss 20B (Q8_0) — best for OpenClaw production

OpenAI’s open-weight 20B. The Q8_0 GGUF is 11.28 GiB (the weights are MXFP4, so Q8_0 adds almost nothing over the 11.28 GiB MXFP4 file). Cleanest tool-call JSON of any open-weight model, and small enough to sit beside Devstral Small 24B (13.35 GiB) on 32GB. The production OpenClaw pick when reliability matters more than peak benchmark scores.

ollama pull gpt-oss:20b-q8_0
openclaw config set agents.defaults.models.chat ollama/gpt-oss:20b-q8_0
openclaw run --agent --max-hours 4 "Implement the spec end-to-end"

3. Qwen 3.6 35B-A3B (UD-Q4_K_XL) — fastest at this tier

Mixture-of-Experts variant of Qwen 3.6. 35B total parameters, 3B active per token, so each token reads about 2 GiB instead of 20. Run UD-Q4_K_XL (20.82 GiB). The UD-Q5_K_M file is 24.64 GiB and is over the ~24 GiB Mac GPU limit; use it only on a PC with CPU offload.

ollama run hf.co/unsloth/Qwen3.6-35B-A3B-GGUF:UD-Q4_K_XL

openclaw config set agents.defaults.models.chat ollama/hf.co/unsloth/Qwen3.6-35B-A3B-GGUF:UD-Q4_K_XL

4. Nemotron Cascade 2 30B (Q5_K_M) — strong on structured output

NVIDIA’s late-March 2026 release. 30B dense, 256K context, strong on JSON output and structured generation. About 22GB at Q5_K_M.

ollama pull nemotron-cascade-2:30b-q5_K_M

5. Gemma 4 26B-A4B — new June model, tiny footprint [New June 2026]

Google’s June 3, 2026 MoE release. 26B total / ~4B active per token. At Q4_K_M it uses about 15GB — the smallest footprint of any capable model at this tier. Runs 45+ tok/sec on M4 Pro. Apache 2.0 license.

ollama run gemma4:e4b
# or
ollama pull gemma4:26b-a4b

Strong for multilingual chat, light coding tasks, and fast RAG responses. Use it paired with gpt-oss 20B (11.28 GiB) when you need two models loaded at once.

6. Devstral Small 24B — best dedicated coding model [New June 2026]

Mistral’s coding-focused 24B dense model. Fits at ~14.5GB at Q4_K_M. Strong HumanEval scores and built for agentic coding workflows.

ollama run devstral-small:24b
openclaw config set agents.defaults.models.code ollama/devstral-small:24b

Use this as your dedicated coding model in OpenClaw. It fits beside gpt-oss 20B (13.35 + 11.28 = 24.63 GiB), but not beside Qwen3.8 27B on 32GB.

7. Qwen 3.5 27B (Q6_K) — skip this, use 3.8

The older Qwen 3.5 27B at Q6 is the same size class. Avoid for OpenClaw — tool-calling bug in Ollama (GitHub issue #14493). Pick Qwen3.8 27B; Qwen 3.6 27B (Q6_K, 20.98 GiB) is the fallback.

MLX vs Ollama on Apple Silicon

On M-series Macs, Apple’s MLX framework runs 2-3x faster than llama.cpp for token generation. On a 32GB M4 Pro, Qwen3-Coder-30B-A3B hits 130 tok/sec in MLX versus 43 tok/sec in Ollama/llama.cpp. The gap narrows above 40K context.

# Install MLX-LM for speed
pip install mlx-lm

# Run a Qwen 27B via MLX (3.6 shown; use the 3.8 MLX build when mlx-community publishes it)
mlx_lm.generate --model mlx-community/Qwen3.6-27B-4bit --prompt "Your prompt"

Tradeoff: MLX doesn’t yet support all Ollama OpenClaw integrations. Use Ollama for OpenClaw tool-calling loops, MLX for pure speed (standalone inference, fast chat).

Not sure a model fits your exact 32GB machine?

Check it in seconds: the local LLM calculator (preloaded for 32GB) shows which quants fit with context headroom, or run the token speed & cost estimator to compare against cloud pricing.

What Fits in 32GB

ModelQuantRAM UsedTok/s (M4 Pro)Tool Calling
Qwen3.8 27BUD-Q6_K20.47 GiB18-30 (Ollama) / 60+ (MLX)Excellent
Qwen 3.6 35B-A3B MoEUD-Q4_K_XL20.82 GiB30-55 (Ollama) / 130 (MLX)Excellent
gpt-oss 20BQ8_011.28 GiB35-55Excellent (production)
Gemma 4 26B-A4B MoE ✦ newQ4_K_M~15 GB45-65Good
Devstral Small 24B ✦ new (coding)Q4_K_M13.35 GiB30-45Good
Gemma 4 31B (dense, 256K ctx)Q4_K_M17.07 GiB12-20Good
Nemotron Cascade 2 30BQ5_K_M~24 GB25-40Good
Qwen3.8 27BQ8_027.05 GiB (does not fit a 32GB Mac)—Needs 48GB

OpenClaw Setup on 32GB

This is the first tier where OpenClaw runs autonomous loops without babysitting:

# 1. Pull Qwen3.8 27B at UD-Q6_K (20.47 GiB) for general use
ollama pull hf.co/unsloth/Qwen3.8-27B-GGUF:UD-Q6_K

# 2. Pull gpt-oss 20B at Q8 (11.28 GiB) for autonomous agent runs
ollama pull gpt-oss:20b-q8_0

# 3. Configure routing
openclaw config set agents.defaults.models.chat ollama/hf.co/unsloth/Qwen3.8-27B-GGUF:UD-Q6_K
openclaw config set agents.defaults.models.agent ollama/gpt-oss:20b-q8_0

# 4. 64K context (about 3.5 GiB is free beside the 27B)
openclaw config set agents.defaults.context_limit 65536

# 5. Run an autonomous loop
openclaw run --agent "Refactor the auth module and update all callers"

Common Mistakes at 32GB

  1. Defaulting to Llama 3.3 70B at IQ2. It used to fit at IQ2_XXS but quality is so degraded that Qwen3.8 27B at Q6 beats it.
  2. Picking Qwen 3.5 27B instead of 3.8. Tool calling bug in Ollama. Pick 3.8 (3.6 is the fallback).
  3. Setting context to 256K with a 27B Q6 model. The model already takes 20.47 of the ~24 GiB GPU budget. Cap at 64K, raise only if needed.
  4. Skipping gpt-oss 20B because it is “smaller”. For OpenClaw tool-call reliability, gpt-oss 20B Q8 (11.28 GiB) beats every 27-32B model at Q4 because the JSON output is cleaner.

Hardware That Actually Hits 32GB

The best current options (November 2026):

  • MacBook Pro M4 Pro 36GB — best laptop for this tier; the extra 4GB raises the GPU limit to about 27 GiB (llama.cpp logs 28,991 MB on 36GB), which is what Qwen3.8 27B at Q8_0 (27.05 GiB) needs. On 32GB, stay at UD-Q6_K.
  • MacBook Pro M3 Max 32GB — still a solid pick; slightly lower bandwidth than M4 Pro; Qwen 3.6 35B-A3B at UD-Q4_K_XL (20.82 GiB) fits
  • Mac Studio M2 Max 32GB — quiet, always-on host; the right choice if you want a dedicated unattended machine for OpenClaw overnight loops
  • 2× RTX 4090 24GB (48GB total NVLink split) — complex CUDA setup, not recommended unless you’re already on Windows/Linux
  • NVIDIA RTX A6000 48GB — workstation, single card, more comfortable at 48GB than 32GB

One honest note: if you’re considering a new Mac purchase and primarily do OpenClaw autonomous agent runs, the jump to 48GB MacBook Pro at 48GB pays off: a 48GB Mac gives the GPU about 37 GiB, enough for Qwen3.8 27B at Q8_0 (27.05 GiB) with long context, or Qwen3.8 27B at UD-Q6_K and gpt-oss 20B loaded at the same time (31.75 GiB). gpt-oss 120B (59.03 GiB) does not fit 48GB or 64GB.

FAQ

What is the best local LLM for 32GB RAM in 2026?

Qwen3.8 27B at UD-Q6_K is the best general-purpose local LLM for 32GB RAM. The GGUF file is 20.47 GiB. A 32GB Mac gives the GPU about 24 GiB by default, so about 3.5 GiB stays free for context. For OpenClaw autonomous loops, gpt-oss 20B at Q8_0 is the safer production pick: the file is 11.28 GiB and its tool-call JSON is cleaner.

What local LLMs fit well in 32GB RAM?

Qwen3.8 27B at UD-Q6_K (20.47 GiB), Qwen 3.6 27B at Q6_K (20.98 GiB), gpt-oss 20B at Q8_0 (11.28 GiB), Gemma 4 31B at Q4_K_M (17.07 GiB), Devstral Small 24B at Q4_K_M (13.35 GiB) and Gemma 4 26B-A4B at Q4_K_M all fit under the ~24 GiB Mac GPU limit with room for context. Gemma 4 31B at Q6_K (23.47 GiB) and Qwen 3.6 35B-A3B at Q5_K_M (24.64 GiB) do not leave room for context on a 32GB Mac at default settings.

Can I run 32B models on 32GB RAM?

Only at 4-bit. Qwen 3.6 35B-A3B at UD-Q4_K_XL is 20.82 GiB and fits; its Q5_K_M file is 24.64 GiB and is over the ~24 GiB Mac GPU limit. Dense 30B-32B models fit at Q4, not at Q5 or Q6. For the best quality at this tier, run Qwen3.8 27B at UD-Q6_K (20.47 GiB).

What local LLMs should I avoid on 32GB RAM?

Avoid 70B models at extreme low-bit quants, 120B-class models, and large context windows such as 256K with a 27B Q6 model. They may technically load in edge cases, but quality, speed, or swap pressure makes them poor daily-driver choices on 32GB RAM.

Is 32GB enough for OpenClaw autonomous runs?

Yes. 32GB is the first tier where OpenClaw runs unattended autonomous loops reliably. gpt-oss 20B at Q8 passes tool-calling validation through 4-6 hour sessions without drift. For 8-hour loops or larger parallel model setups, step up to 48GB or 64GB.

Is MLX faster than Ollama for local LLMs on Apple Silicon?

Yes, significantly. MLX runs 2-3x faster than llama.cpp on M-series chips for token generation on supported models. Use MLX-LM when speed matters; use Ollama when you need compatibility with OpenClaw tool-calling loops.

What local LLM runs on a 32GB Mac mini?

A 32GB Mac mini M4 Pro runs Qwen3.8 27B at UD-Q6_K (20.47 GiB) for general use or gpt-oss 20B at Q8_0 (11.28 GiB) for OpenClaw loops. For speed, run Qwen 3.6 35B-A3B at UD-Q4_K_XL (20.82 GiB): it has 3B active parameters per token, and MLX runs supported MoE models 2-3x faster. Keep the context at 64K or lower.

How fast is a dense 27B on an M4 Pro?

We have not measured the M4 Pro directly. A dense 27B at Q6_K reads about 20 GiB per token, so the speed follows memory bandwidth: 18-30 tok/sec in Ollama on M2 Max and M3 Pro class chips, and the M4 Pro sits in the same band. The MoE Qwen 3.6 35B-A3B runs faster at 30-50 tok/sec, and on a 32GB M4 Pro a 30B-A3B MoE hits 130 tok/sec in MLX versus 43 in Ollama.

Does Qwen3.8 27B work with OpenClaw on 32GB?

Yes. Set Qwen3.8 27B UD-Q6_K (20.47 GiB) as the chat model and gpt-oss 20B Q8_0 (11.28 GiB) as the agent model. Together they are 31.75 GiB, so only one stays resident at a time on 32GB. Set the context limit to 65536. Avoid Qwen 3.5 27B, which has the Ollama tool-calling bug (issue #14493).

Before you order parts, check the tested hardware list for current prices by tier.

See Also

Hardware check

Which local LLM can your machine run?

Pick your setup. You get the model size that actually fits, plus a practical upgrade that moves you up a tier.

Read next

Best Local LLM for 64GB RAM (2026): Qwen3.8 27B at Q8
Best local LLM for 64GB RAM: Qwen3.8 27B at Q8_0 (27.05 GiB). A 64GB Mac gives the GPU 51.84 GiB, so gpt-oss 120B (59.03 GiB) and Llama 4 Scout Q4 do not fit by default. Also Qwen3.6 35B-A3B Q8_0, Gemma 4 31B, Laguna XS 2.1.
Best Local LLMs for 16GB RAM: Qwen 3.5 9B & gpt-oss 20B
Best local LLMs that run well on 16GB RAM in 2026. Verified picks: Qwen 3.5 9B (Q8), gpt-oss 20B (Q4), Qwen 3.6 27B (squeeze IQ3), with quantization, speed, and OpenClaw setup.
Best Local LLMs for 24GB RAM (2026): Qwen 3.6 27B Headlines
Best local LLMs for 24GB RAM in 2026. Qwen 3.6 27B (released Apr 22) is the new headline pick — outperforms 397B MoE models on agentic coding. Plus gpt-oss 20B, Qwen 3.5 9B at Q8.
Best Local LLM for 36GB RAM (2026): Qwen3.8 27B on MLX
Best local LLM for a 36GB Mac: Qwen3.8 27B in MLX 4-bit (14.95 GiB) with about 181K of context. Why the same model runs 6.5-8.8 tok/s in llama.cpp on a 36GB M4 Max, the 27.00 GiB GPU limit, and October 2026 prices.