ollama - ✅(Solved) Fix gemma4:26b / 36b MLX 500 Internal Server Error on 0.20.8-rc0 [1 pull requests, 3 comments, 3 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
ollama/ollama#15577Fetched 2026-04-16 06:36:05
View on GitHub
Comments
3
Participants
3
Timeline
9
Reactions
0
Timeline (top)
commented ×3mentioned ×2subscribed ×2closed ×1

Error Message

~/Dev/jregeimbal/homelab on  main took 2m56s ❯ ollama run dhiltgen/gemma4:26b --verbose <<< "Write a Python code that implements binary search in insert,delete and search operations" 07:28:43 AM Error: 500 Internal Server Error: unable to load model: /Users/jonregeimbal/.ollama/models/blobs/sha256-27d4493f796da888a1c50d6d43876e446dbe697cd4c4330c44a063d468e35a52

~/Dev/jregeimbal/homelab on  main ❯ ollama run dhiltgen/gemma4:31b --verbose <<< "Write a Python code that implements binary search in insert,delete and search operations" 07:42:05 AM Error: 500 Internal Server Error: unable to load model: /Users/jonregeimbal/.ollama/models/blobs/sha256-5146d9e5f94c7e8793b56789a863ecaa36bf22affb5cecbae267cf835a5cbad9

~/Dev/jregeimbal/homelab on  main ❯ ollama --version 07:42:19 AM ollama version is 0.20.8-rc0

PR fix notes

PR #15244: Gemma4 on MLX

Description (problem / solution / changelog)

Port the Gemma4 model to the MLX engine. Text only initially.

For testing, use the models uploaded to https://ollama.com/dhiltgen/gemma4 (final weights published from Google, but still experimenting with quant strategy so subject to change)

Carries:

  • #15409
  • #15120
  • #14913

Changed files

  • x/create/client/create.go (modified, +12/-0)
  • x/create/create.go (modified, +2/-0)
  • x/create/gemma4.go (added, +264/-0)
  • x/create/gemma4_test.go (added, +191/-0)
  • x/mlxrunner/imports.go (modified, +1/-0)
  • x/models/gemma4/gemma4.go (added, +1514/-0)
  • x/models/gemma4/gemma4_moe_test.go (added, +228/-0)
  • x/models/gemma4/gemma4_test.go (added, +503/-0)

Code Example

~/Dev/jregeimbal/homelab on  main took 2m56s
❯ ollama run dhiltgen/gemma4:26b --verbose <<< "Write a Python code that implements binary search in insert,delete and search operations"                                                                07:28:43 AM
Error: 500 Internal Server Error: unable to load model: /Users/jonregeimbal/.ollama/models/blobs/sha256-27d4493f796da888a1c50d6d43876e446dbe697cd4c4330c44a063d468e35a52

~/Dev/jregeimbal/homelab on  main
❯ ollama run dhiltgen/gemma4:31b --verbose <<< "Write a Python code that implements binary search in insert,delete and search operations"                                                                07:42:05 AM
Error: 500 Internal Server Error: unable to load model: /Users/jonregeimbal/.ollama/models/blobs/sha256-5146d9e5f94c7e8793b56789a863ecaa36bf22affb5cecbae267cf835a5cbad9

~/Dev/jregeimbal/homelab on  main
❯ ollama --version                                                                                                                                                                                       07:42:19 AM
ollama version is 0.20.8-rc0

---

❯ ollama run gemma4:26b --verbose <<< "Write a Python code that implements binary search in insert,delete and search operations"                                                                         07:43:41 AM
Thinking...

*   Task: Imp...

---

❯ cat ~/.ollama/logs/server.log | tail -10                                                                                                                                                               07:43:24 AM
llama_model_loader: - type q8_0:   28 tensors
llama_model_loader: - type q4_K:  192 tensors
llama_model_loader: - type q6_K:   14 tensors
print_info: file format = GGUF V3 (latest)
print_info: file type   = Q4_K - Medium
print_info: file size   = 15.63 GiB (5.32 BPW)
llama_model_load: error loading model: error loading model architecture: unknown model architecture: 'gemma4'
llama_model_load_from_file_impl: failed to load model
time=2026-04-14T07:43:24.686-04:00 level=INFO source=sched.go:462 msg="failed to create server" model=dhiltgen/gemma4:26b error="unable to load model: /Users/jonregeimbal/.ollama/models/blobs/sha256-27d4493f796da888a1c50d6d43876e446dbe697cd4c4330c44a063d468e35a52"
[GIN] 2026/04/14 - 07:43:24 | 500 |  276.203459ms |       127.0.0.1 | POST     "/api/generate"
RAW_BUFFERClick to expand / collapse

What is the issue?

Hi Ollama team,

I have been watching the dev on MLX support closely (https://github.com/ollama/ollama/pull/15244) and wanted to give the RC a spin last night. Just wanted to report that it does not appear to be working on an M5 Max.

If there are other details I can pull that would be useful, let me know.

cc @dhiltgen

~/Dev/jregeimbal/homelab on  main took 2m56s
❯ ollama run dhiltgen/gemma4:26b --verbose <<< "Write a Python code that implements binary search in insert,delete and search operations"                                                                07:28:43 AM
Error: 500 Internal Server Error: unable to load model: /Users/jonregeimbal/.ollama/models/blobs/sha256-27d4493f796da888a1c50d6d43876e446dbe697cd4c4330c44a063d468e35a52

~/Dev/jregeimbal/homelab on  main
❯ ollama run dhiltgen/gemma4:31b --verbose <<< "Write a Python code that implements binary search in insert,delete and search operations"                                                                07:42:05 AM
Error: 500 Internal Server Error: unable to load model: /Users/jonregeimbal/.ollama/models/blobs/sha256-5146d9e5f94c7e8793b56789a863ecaa36bf22affb5cecbae267cf835a5cbad9

~/Dev/jregeimbal/homelab on  main
❯ ollama --version                                                                                                                                                                                       07:42:19 AM
ollama version is 0.20.8-rc0

Non-MLX models are still running fine:

❯ ollama run gemma4:26b --verbose <<< "Write a Python code that implements binary search in insert,delete and search operations"                                                                         07:43:41 AM
Thinking...

*   Task: Imp...

Relevant log output

cat ~/.ollama/logs/server.log | tail -10                                                                                                                                                               07:43:24 AM
llama_model_loader: - type q8_0:   28 tensors
llama_model_loader: - type q4_K:  192 tensors
llama_model_loader: - type q6_K:   14 tensors
print_info: file format = GGUF V3 (latest)
print_info: file type   = Q4_K - Medium
print_info: file size   = 15.63 GiB (5.32 BPW)
llama_model_load: error loading model: error loading model architecture: unknown model architecture: 'gemma4'
llama_model_load_from_file_impl: failed to load model
time=2026-04-14T07:43:24.686-04:00 level=INFO source=sched.go:462 msg="failed to create server" model=dhiltgen/gemma4:26b error="unable to load model: /Users/jonregeimbal/.ollama/models/blobs/sha256-27d4493f796da888a1c50d6d43876e446dbe697cd4c4330c44a063d468e35a52"
[GIN] 2026/04/14 - 07:43:24 | 500 |  276.203459ms |       127.0.0.1 | POST     "/api/generate"

OS

macOS

GPU

Apple

CPU

Apple

Ollama version

0.20.8-rc0

extent analysis

TL;DR

The issue is likely due to an incompatible model architecture, and a workaround may involve checking the model compatibility or waiting for an update to the Ollama version.

Guidance

  • The error message "unknown model architecture: 'gemma4'" suggests that the model architecture is not recognized by the current Ollama version.
  • The fact that non-MLX models are running fine indicates that the issue is specific to MLX models.
  • Checking the model compatibility with the current Ollama version (0.20.8-rc0) may help resolve the issue.
  • The user can try to check the Ollama documentation or wait for an update to the Ollama version that supports the MLX model architecture.

Notes

The issue seems to be specific to the MLX model architecture and the current Ollama version. Without more information about the model or the Ollama version, it's difficult to provide a more specific solution.

Recommendation

Apply workaround: The user can try to check the model compatibility or wait for an update to the Ollama version that supports the MLX model architecture, as the current version (0.20.8-rc0) seems to have issues with MLX models.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING