Ollama v0.40.0: models run on MLX by default on Apple Silicon

5 days ago

Ollama v0.40.0 runs models on MLX by default on Apple Silicon, including Qwen 3.8, Gemma 4 and the decision models. Also new: EmbeddingGemma 2 with image and audio embeddings, one model tag holding a build per runner, and in-place conversion of models already on disk. https://github.com/ollama/ollama/releases/tag/v0.40.0 https://github.com/ollama/ollama/compare/v0.35.1...v0.40.0 https://docs.ollama.com/api

Ask

Ask about this presentation

Answers are generated from this presentation.

Chapters

  1. 0:00Ollama v0.40.0: models run on MLX by default on Apple Silicon
  2. 0:15Qwen 3.8, Gemma 4, Qwen 3.6 and Qwen 3.5 run on MLX
  3. 0:26Only architectures MLX supports move to MLX
  4. 0:39Nimble, Tev1, Clef and Clef Flash now run on MLX
  5. 0:49MLX models stay in memory between requests on macOS 27
  6. 1:0302: Embeddings with images and audio
  7. 1:06EmbeddingGemma 2 runs on MLX
  8. 1:16The embed API accepts images and audio
  9. 1:2903: One model tag, several runners
  10. 1:32One model tag can hold an MLX build and a llama.cpp build
  11. 1:43ollama ps shows which runner serves each model
  12. 1:53Models already on disk convert in place, without a re-pull
  13. 2:05The in-place conversion is temporary
  14. 2:1604: Smaller fixes
  15. 2:18Tool results keep their call ID, and overlong decision requests are rejected
  16. 2:34llama.cpp and MLX are updated
Show transcript

Ollama v0.40.0: models run on MLX by default on Apple Silicon

Ollama
Ollama v0.40.0
On Apple Silicon, models now run on MLX by default.
GitHub release notes, ollama/ollama v0.40.0
Part 01

In Ollama v0.40.0, Macs with Apple Silicon run models on MLX by default. When MLX supports a model's architecture, Ollama picks MLX automatically, and you pull and run the model the same way.

Qwen 3.8, Gemma 4, Qwen 3.6 and Qwen 3.5 run on MLX

Ollama
Ollama
v0.40.0
qwen3.8
gemma4
qwen3.6
qwen3.5
GitHub release notes, ollama/ollama v0.40.0
Part 01

Qwen 3.8 is the release's own example. Gemma 4, Qwen 3.6 and Qwen 3.5 also run on MLX now, with no setting to change.

Only architectures MLX supports move to MLX

Ollama
Ollama
v0.40.0

Only architectures MLX supports move over

More models follow as the team tests and enables them.
GitHub release notes, ollama/ollama v0.40.0
Part 01

The switch covers only the model architectures that the MLX runtime supports. A model outside that set stays off MLX in this release, and the team says it will keep testing and enabling more models.

Nimble, Tev1, Clef and Clef Flash now run on MLX

Ollama
Ollama
v0.40.0

Decision models run on MLX too

Nimble
Tev1
Clef
Clef Flash
Clef and Clef Flash still judge images on MLX.
Release notes · mlxrunner/model/clef
Part 01

The decision models moved as well. Nimble, Tev1, Clef and Clef Flash now score on MLX, and Clef and Clef Flash can still judge an image alongside the text.

MLX models stay in memory between requests on macOS 27

Ollama
Ollama
v0.40.0

The slow first request after idle is fixed

On macOS 27, MLX weights stay in memory between requests again.
mlx/compat/mlx/0001-metal-residency-refresh.patch · issue #18744
Part 01

On macOS 27, MLX let go of a model's memory about two seconds after each request, so the next request waited while the weights paged back in. The runner now refreshes that memory every second.

02: Embeddings with images and audio

Ollama
Ollama
v0.40.0
02
Embeddings with images and audio
GitHub release notes, ollama/ollama v0.40.0
Part 02

Embeddings now take images and audio.

EmbeddingGemma 2 runs on MLX

Ollama
Ollama
v0.40.0
text
image
audio
Release notes · mlxrunner/model/gemma4embedding
Part 02

MLX now runs an embedding model, EmbeddingGemma 2. It turns text, images and audio into vectors, so one local model can index all three for search.

The embed API accepts images and audio

Ollama
Ollama
v0.40.0
Each item in a batch carries its own media. Video is not accepted yet.
docs/api.md
Part 02

The embed endpoint now accepts an image or an audio clip with each item, and one batch can mix plain text with media. Video isn't accepted, and only multimodal embedding models take media.

03: One model tag, several runners

Ollama
Ollama
v0.40.0
03
One model tag, several runners
GitHub release notes, ollama/ollama v0.40.0
Part 03

One model name can now hold several runners.

One model tag can hold an MLX build and a llama.cpp build

Ollama
Ollama
v0.40.0

One model tag can hold a build for each runner

one model tag
mlx
ggml
llamacpp
manifest/manifest.go · api/types.go
Part 03

A model tag can now be a list. Each entry targets one runner, MLX, GGML or llama.cpp, and pull, push, copy and remove all handle the whole list.

ollama ps shows which runner serves each model

Ollama
Ollama
v0.40.0

The running-models table names the runner

NAME  ID  SIZE  PROCESSOR  CONTEXT  RUNNER  UNTIL
cmd/cmd.go
Part 03

You can see which one you got. The table of running models gains a runner column, and showing a model prints its selected runner plus every runner its tag offers.

Models already on disk convert in place, without a re-pull

Ollama
Ollama
v0.40.0

Models already on disk convert in place

After the first load, a background step writes a llama.cpp build next to the original.
compatmigrate/migrate.go
Part 03

Models you already downloaded don't need a fresh pull. After the first load, Ollama converts older model files into a llama.cpp build in the background, as long as the disk has room for it.

The in-place conversion is temporary

Ollama
Ollama
v0.40.0

The conversion step is temporary

A later release removes it. Unconverted models will then need a re-pull.
compatmigrate/migrate.go
Part 03

That conversion step won't stay. Ollama plans to remove it once enough releases ship models in the new format, and a model still unconverted by then will need a fresh pull.

04: Smaller fixes

Ollama
Ollama
v0.40.0
04
Smaller fixes
GitHub release notes, ollama/ollama v0.40.0
Part 04

And a few smaller fixes.

Tool results keep their call ID, and overlong decision requests are rejected

Ollama
Ollama
v0.40.0

Also in this release

  • OpenAI API tool results keep their call ID when sent as parts
  • Decision models reject an overlong request instead of cutting it
  • MLX tokenizer matches each publisher’s tokenizer
openai/openai.go · mlxrunner/tokenizer · #18776
Part 04

Tool results sent through the OpenAI-compatible API keep their call ID when split into parts. Overlong decision requests are rejected instead of cut short. And MLX now splits text into tokens the way each publisher's tokenizer does.

llama.cpp and MLX are updated

Ollama
Ollama
v0.40.0
Full list: Ollama v0.40.0 release notes on GitHub
LLAMA_CPP_VERSION · MLX_VERSION
Part 04

Both engines are updated, llama.cpp and MLX. The full list of changes is in the Ollama release notes on GitHub.