published fresh until

Qwen3.8 27B vs Gemma 4 26B-A4B vs Qwen3-Coder 30B on 24-32 GB: runtime

Summary A size and runtime comparison for 24 to 32 GB: Qwen3.8 27B (Apache-2.0, 16.6 GB at Q4) for quality, Gemma 4 26B-A4B or Qwen3-Coder 30B-A3B for speed, plus Ollama, llama.cpp, MLX and LM Studio (checked 2026-10-19). Check Ollama's VRAM-based context default before raising it.

Not for three-model hands-on trial, see local-coding-model-24-32gb-machine; Mac wired-memory limit, see mac-mini-24gb-qwen27b-wired-limit-and-mtp

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

What this thread does

The problem

You have a Mac with 24 or 32 GB of unified memory, or a 24 GB graphics card, and want an open-weight model that can drive a coding agent through a local server. Three choices interact: the model, its quantisation (how many bits per weight), and the runtime. Memory has to hold the weights, the context cache and the operating system.

This page compares candidate models, quants and runtimes from published sizes and community reports. For a hands-on trial of three models on one machine, see local-coding-model-24-32gb-machine.

Candidates and sizes, checked 19 October 2026

ModelSize on diskLicence and ageNotes
Qwen3.8 27B (dense)Ollama qwen3.8:27b 18 GB; Unsloth GGUF UD-Q4_K_M 16.6 GB, UD-Q5_K_M 19.9 GB (checked 2026-11-24), UD-Q6_K 22.0 GB, Q8_0 29.0 GBApache-2.0, Hugging Face card updated 14 Aug 2026Ollama lists tools, thinking and vision, 256K context; an MLX 4-bit build exists in mlx-community
Qwen3-Coder 30B-A3B (mixture of experts)Ollama qwen3-coder:30b 19 GB; Unsloth GGUF Q4_K_M 18.6 GB, Q8_0 32.5 GBApache-2.0, card updated 3 Dec 2025Coding-specific but ten months old; Ollama lists tools
Gemma 4 26B-A4BOllama gemma4:26b 16 to 19 GBApache-2.0 on Hugging Face, updated 20 Jul 2026Mixture of experts; general model, not coding-specific
gpt-oss 20BOllama gpt-oss:20b 14 GBApache-2.0Tools and thinking; 128K context
Nemotron 3.5 Bolt 74B-A9B, 24GB buildGGUF file 22.0 GBOpenMDW 1.1 per Hugging Face metadata, released mid-October 2026Four days old; a 22 GB file leaves little room for context on a 24 GB machine

Too big for this class: Qwen3-Coder-Next (80B, Ollama 52 GB at Q4_K_M) and Devstral 2 123B (Ollama 75 GB, modified MIT with a revenue limit). Qwen3.6 35B-A3B (Apache-2.0, April 2026) came up in comments; I did not check its file sizes.

Rule of thumb that the sizes support: weights should be well under your memory, because the context cache grows with every token and macOS or your desktop also needs memory. A 29 GB Q8 file does not fit a 32 GB machine in practice.

Runtimes, checked 19 October 2026

  • As of November 2026, Ollama v0.40.17 (10 Nov 2026, MIT) is the simplest. Its context guide gives VRAM-based defaults: 4K below 24 GiB, 32K at 24–48 GiB and 256K at 48 GiB or more; check the allocated context before setting OLLAMA_CONTEXT_LENGTH (checked 2026-11-17). OLLAMA_FLASH_ATTENTION=1 plus OLLAMA_KV_CACHE_TYPE=q8_0 roughly halves cache memory versus f16, with q4_0 cutting more at some quality cost.
  • llama.cpp (ggml-org, MIT; releases include semantic versions and build tags (checked 2026-11-17); as of November 2026, v1.0.0 on 13 Nov 2026) gives the most control over quantisation files, cache types and speculative decoding. Two existing WhatWorks threads cover Mac memory limits and the llama.cpp reprocessing trap.
  • MLX through mlx-lm 0.32.2 (PyPI, 16 Oct 2026, MIT) is the Apple-silicon native path; Ollama also lists a qwen3.8:27b-mlx tag. I did not benchmark MLX against GGUF.
  • LM Studio gives a GUI and an OpenAI-compatible server. Its docs say tool calling works through /v1/chat/completions, natively when the model's chat template supports it and through a generic prompt format otherwise, with results varying by model.

What the community says

  • In r/LocalLLaMA, "What models can I run locally on a Mac mini m4 32GB" (u/TangeloOk9486, 28 September 2026), u/diy-it said Qwen3.8 27B at Q4 gave only 6 to 9 tokens a second while Gemma 4 26B-A4B reached about 42, and u/brainchillzZ argued dense models run badly on that chip and favoured mixture-of-experts models. u/ttkciar disagreed: dense models give the best quality for a fixed memory footprint, but are several times slower. u/lynxooo returned a 32 GB machine because 27B answers took minutes and were still wrong in their homelab tests. These are individual reports on different chips; none is a benchmark.
  • In r/LocalLLaMA, a post comparing Qwen3.8 27B at Unsloth Q6 and a Qwen3.8 Flash Next coder quant with Claude Opus 4.6 on three coding tasks (u/Short_Regular_7191, 3 October 2026), the author says one local model tied Opus on their tasks, with thinking set to high. A commenter (u/Excellent-Issue-5956) said that on a 16 GB card at 3-bit with 48K context, drafting with the model's multi-token-prediction head took them from about 56 to 88 tokens a second. Commenters also doubted small task counts. I did not reproduce any figure.
  • In the same sub, a 24 GB-class post about Nemotron Bolt (u/BTA_Labs, 18 October 2026) says it is the only recent big release that fits in 24 GB. I have not run it.

Recommendation by constraint

  • 32 GB Mac, quality first, patient: Qwen3.8 27B at Q4 or Q5 with a moderate context (start at 32K), expecting single-digit to low-teens tokens a second per commenters.
  • 32 GB Mac, speed first: a mixture-of-experts model such as Gemma 4 26B-A4B or Qwen3-Coder 30B-A3B at Q4; accept a quality drop on hard tasks.
  • 24 GB Mac: the 27B Q4 file is about 16.6 GB, so it only works with a short context and probably a raised GPU memory limit; see the existing thread on the Mac wired limit. A 14 GB gpt-oss 20B is the safe fallback.
  • 24 GB NVIDIA card: Qwen3.8 27B UD-Q4_K_M or Q5 with q8 cache; Q6 at 22 GB leaves almost nothing for context.
  • Quantisation: stay at Q4 or above for agents. For lower quants and long tasks, see the existing GGUF quant thread; sub-4-bit looks fine on short prompts and fails on long multi-step work.

A prompt to give your agent

Set up a local coding model on this <Mac with 32 GB | machine with a 24 GB GPU>. Compare Qwen3.8 27B at Q4 against Gemma 4 26B-A4B using the runtime I name. Raise the context to at least 32K, run the same small refactor task with tool calls through the OpenAI-compatible endpoint, and report tokens per second (ollama run --verbose or the server log), peak memory, and whether tool calls parsed. Do not download anything over 25 GB without asking me.

Mistakes to check

  • Leaving Ollama's allocated context too small, then blaming the model when the agent forgets files.
  • Picking a quant by file size alone and leaving no memory for the cache.
  • Reading a thinking model's long reasoning as slowness of the runtime; compare tokens per second and total tokens separately.
  • Treating a three-task comparison against a frontier model as a ranking.

Limits

I ran no model. Sizes, licences and dates come from Hugging Face, Ollama library pages, GitHub and PyPI read on 19 October 2026. I read the post text and top comments of the r/LocalLLaMA threads linked, not every reply. Speeds above are commenters' claims on mixed hardware. I did not verify Ollama tool-call quality per model or any model's coding benchmark scores.

Started from a post by @TangeloOk9486, packaged by the editor. Original post

Subjects

More in local models

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# Qwen3.8 27B vs Gemma 4 26B-A4B vs Qwen3-Coder 30B on 24-32 GB: runtime
Summary: A size and runtime comparison for 24 to 32 GB: Qwen3.8 27B (Apache-2.0, 16.6 GB at Q4) for quality, Gemma 4 26B-A4B or Qwen3-Coder 30B-A3B for speed, plus Ollama, llama.cpp, MLX and LM Studio (checked 2026-10-19). Check Ollama's VRAM-based context default before raising it.
Copy for agent
get the whatworks thread local-coding-model-and-runtime-for-24-32-gb-mac-or-gpu-2026 and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread local-coding-model-and-runtime-for-24-32-gb-mac-or-gpu-2026
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp/login and sign me in so I have an account. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp/login && claude mcp login whatworks
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp/login && codex mcp login whatworks