gemma-4-31B-it on local hardware
Estimated comfort for repository coding with Aider on a MacBook Pro M4 Pro 48GB.
gemma-4-31B-itOpen source
google · apache-2.0 · 8,974,781 downloads
VisionReasoning / thinking mode
- Parameters
- 31B exact
- Context window
- 256K tokens
- Attention
- Sliding-window + global layers
- Layers · KV heads · head dim
- 60 · 16 · 256
- KV cache
- 80 KB/token · 3.3 GB at 32K
- Tool calling
- good (from chat template)
- Thinking
- good (from chat template)
- Vision
- good (from config)
- Commercial use
- allowedRetain the required license and attribution notices
- Import confidence
- medium · capabilities estimated
Weights by quantization
Q3_K_M
14 GB
gguf file size
Q4_K_M
17 GB
gguf file size
Q5_K_M
20 GB
gguf file size
Q6_K
23 GB
gguf file size
Q8_0
30 GB
gguf file size
F16 / BF16
57 GB
gguf file size
- • vision: good, inferred from config (low confidence).
- • Capability ratings are estimated from model size and name — this model hasn't been assessed by hand.
- • GGUF sizes come from community conversions matched by model name; equivalence and runtime support are not verified. MLX conversion availability is unverified.
gemma-4-31B-it — 4-bit
Borderline for your workload
Speed
9–12 tok/s
Slow
Memory left
15 GB
of 48 GB
First word in
≈2 min
Too slow
All the details
- Your setup
- MacBook Pro M4 Pro 48 GB
- Workload
- Repository coding with Aider
- Runtime → tool
- LM Studio → Aider
- Memory used
- 21 GB
- Context
- 32K · up to 32K practical
- Tool support
- Official
- Use-case fit
- Partly suited
Why?
- Model fits with approximately 15 GB of memory headroom.
- LM Studio supports hardware acceleration on this machine (Metal (Apple GPU)).
- Aider can connect to LM Studio (officially supported).
- 32K window; generation drops to 8–11 tok/s when it is full.
- Coding capability is below what interactive coding ideally needs — expect more mistakes or retries.
- Generation (9–12 tok/s) is slow for interactive coding.
- Ingesting a prompt of 14K tokens takes ≈2 min and each step ≈2 min; across ~4 calls a task takes ≈11 min.
Why “Borderline” rather than “Acceptable”?
- Prompt processing: Ingesting the first prompt (14K tokens) takes ≈2 min; each of the ~4 follow-up turns takes ≈2 min (≈11 min per task).
- Generation: Expected 9–12 tok/s at ~16K tokens of context. Coding with repository context is comfortable from about 28 tok/s.
- Context: 32K window; generation drops to 8–11 tok/s when it is full.
- Workload suitability: Coding capability is below what interactive coding ideally needs — expect more mistakes or retries.
How sure are we?
Medium confidenceEstimated from bandwidth and compute, calibrated against 2 verified benchmarks of other models on this same chip (measured with a different engine, so calibration is partial).
- Calibrated with verified benchmarks of other models on this chip.
- Hybrid/sliding attention performance varies more between runtimes.
Medium confidence