[GH-ISSUE #15496] Ollama 0.20.5 crashes on Apple M5 (MacBook Air, 16GB) with Metal backend init failure, even on qwen2.5:0.5b #35663

Closed
opened 2026-04-22 20:20:12 -05:00 by GiteaMirror · 0 comments
Owner

Originally created by @Azu126 on GitHub (Apr 11, 2026).
Original GitHub issue: https://github.com/ollama/ollama/issues/15496

What is the issue?

Environment

  • Device: MacBook Air M5
  • Memory: 16GB
  • Storage: 512GB
  • OS: macOS
  • Ollama version: 0.20.5
  • Architecture: arm64

Problem
Ollama fails to run even very small models such as qwen2.5:0.5b.

I first noticed the issue after trying Qwen3.5 35B A3B, but now the same error happens even with qwen2.5:0.5b.
This does not look like a memory issue, because the same failure occurs with a 0.5B model.

Reproduction

ollama run qwen2.5:0.5b

Also reproduced with:

pkill ollama
ollama serve
# in another terminal
ollama run qwen2.5:0.5b

Observed behavior
The request fails with:

Error: 500 Internal Server Error: llama runner process has terminated: %!w(<nil>)

Server logs show Metal backend initialization failure.

Additional info
	•	ollama --version works normally
	•	ollama list works normally
	•	Removing and pulling qwen2.5:0.5b again did not help
	•	Restarting Ollama did not help
	•	ollama ps is empty after failure
	•	The model file appears to load, but the runner crashes when initializing Metal
	•	Logs mention:
	•	GPU name: Apple M5
	•	the device does not have a precompiled Metal library - this is unexpected
	•	will try to compile it on the fly

Expectation
At minimum, qwen2.5:0.5b should run on this machine.
Instead, Ollama crashes during Metal backend initialization.

Question
Is this a known compatibility issue with Apple M5 / Metal in Ollama 0.20.5?
Is there any workaround, such as disabling the problematic Metal path completely?


### Relevant log output

```shell
ggml_metal_library_init: error: Error Domain=MTLLibraryErrorDomain Code=3
...
static_assert failed due to requirement '__tensor_ops_detail::__is_same_v<bfloat, half>' "Input types must match cooperative tensor types"
...
static_assert failed due to requirement '__tensor_ops_detail::__is_same_v<half, bfloat>' "Input types must match cooperative tensor types"
...
ggml_metal_init: error: failed to initialize the Metal library
ggml_backend_metal_device_init: error: failed to allocate context
llama_init_from_model: failed to initialize the context: failed to initialize Metal backend
panic: unable to create llama context
...
llama runner terminated
...
Load failed ... error="llama runner process has terminated: %!w(<nil>)"

OS

macOS

GPU

Apple

CPU

Apple

Ollama version

Version 0.20.5 (0.20.5)

Originally created by @Azu126 on GitHub (Apr 11, 2026). Original GitHub issue: https://github.com/ollama/ollama/issues/15496 ### What is the issue? **Environment** - Device: MacBook Air M5 - Memory: 16GB - Storage: 512GB - OS: macOS - Ollama version: 0.20.5 - Architecture: arm64 **Problem** Ollama fails to run even very small models such as `qwen2.5:0.5b`. I first noticed the issue after trying `Qwen3.5 35B A3B`, but now the same error happens even with `qwen2.5:0.5b`. This does not look like a memory issue, because the same failure occurs with a 0.5B model. **Reproduction** ```bash ollama run qwen2.5:0.5b Also reproduced with: pkill ollama ollama serve # in another terminal ollama run qwen2.5:0.5b Observed behavior The request fails with: Error: 500 Internal Server Error: llama runner process has terminated: %!w(<nil>) Server logs show Metal backend initialization failure. Additional info • ollama --version works normally • ollama list works normally • Removing and pulling qwen2.5:0.5b again did not help • Restarting Ollama did not help • ollama ps is empty after failure • The model file appears to load, but the runner crashes when initializing Metal • Logs mention: • GPU name: Apple M5 • the device does not have a precompiled Metal library - this is unexpected • will try to compile it on the fly Expectation At minimum, qwen2.5:0.5b should run on this machine. Instead, Ollama crashes during Metal backend initialization. Question Is this a known compatibility issue with Apple M5 / Metal in Ollama 0.20.5? Is there any workaround, such as disabling the problematic Metal path completely? ### Relevant log output ```shell ggml_metal_library_init: error: Error Domain=MTLLibraryErrorDomain Code=3 ... static_assert failed due to requirement '__tensor_ops_detail::__is_same_v<bfloat, half>' "Input types must match cooperative tensor types" ... static_assert failed due to requirement '__tensor_ops_detail::__is_same_v<half, bfloat>' "Input types must match cooperative tensor types" ... ggml_metal_init: error: failed to initialize the Metal library ggml_backend_metal_device_init: error: failed to allocate context llama_init_from_model: failed to initialize the context: failed to initialize Metal backend panic: unable to create llama context ... llama runner terminated ... Load failed ... error="llama runner process has terminated: %!w(<nil>)" ``` ### OS macOS ### GPU Apple ### CPU Apple ### Ollama version Version 0.20.5 (0.20.5)
GiteaMirror added the bug label 2026-04-22 20:20:12 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#35663