Local AI Advisor

Can Mac mini M2 24 GB run Gemma 4 12B?

24 GB unified · 100 GB/s memory bandwidth · Gemma 4 12B has 12B parameters.

Short answer

Yes, acceptable for chat; borderline for coding in a repository.

Best quantization for chat: 5-bit (7.8 GB of weights) on LM Studio. Generation: 8–11 tok/s, leaving about 7.3 GB free for your other apps.

How it rates for each workload

Same model and machine, different jobs. Agents and long documents send far bigger prompts than chat, so they need much more speed and memory.

WorkloadVerdictQuantGenerationFirst replyContext
Chatwith Open WebUIAcceptable5-bit8–11 tok/s≈7 s8KDetails
Coding questionswith ContinueAcceptable4-bit9–13 tok/s≈45 s16KDetails
Coding in a repositorywith AiderBorderline4-bit9–12 tok/s≈2 min32KDetails
Agentic codingwith OpenCodeBorderline5-bit8–10 tok/s≈3 min32KDetails
Long documents (64K)with Open WebUIAcceptable5-bit7–10 tok/s≈9 min64KDetails

Speeds are estimates calibrated against measured benchmarks on similar hardware. “First reply” is the time to read the workload’s opening prompt. How we calculate

Get it running

Copy-paste commands for the 5-bit build with a 64K context. Ollama and llama.cpp download the file straight from Hugging Face.

ollama run hf.co/unsloth/gemma-4-12B-it-GGUF:Q5_K_M

Downloads 8.41 GB (Q5_K_M). Ollama's default context is small: set OLLAMA_CONTEXT_LENGTH=65536 before `ollama serve` for long prompts.

Different tool, context size or workload?

These pages use typical settings. The full check models your exact setup.