[PR #14185] [MERGED] Add MLX runner with GLM4-MoE-Lite model support #25097

Closed
opened 2026-04-19 17:59:53 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/14185
Author: @pdevine
Created: 2/10/2026
Status: Merged
Merged: 2/10/2026
Merged by: @pdevine

Base: mainHead: pdevine/merge-mlx-runner


📝 Commits (5)

📊 Changes

42 files changed (+14900 additions, -9 deletions)

View changed files

📝 go.mod (+4 -1)
📝 go.sum (+30 -1)
📝 runner/runner.go (+3 -0)
📝 x/imagegen/manifest/weights.go (+21 -7)
x/mlxrunner/cache.go (+96 -0)
x/mlxrunner/cache/cache.go (+198 -0)
x/mlxrunner/client.go (+174 -0)
x/mlxrunner/mlx/.gitignore (+3 -0)
x/mlxrunner/mlx/CMakeLists.txt (+26 -0)
x/mlxrunner/mlx/act.go (+23 -0)
x/mlxrunner/mlx/array.go (+273 -0)
x/mlxrunner/mlx/array_test.go (+45 -0)
x/mlxrunner/mlx/dtype.go (+96 -0)
x/mlxrunner/mlx/dynamic.c (+34 -0)
x/mlxrunner/mlx/dynamic.go (+65 -0)
x/mlxrunner/mlx/dynamic.h (+41 -0)
x/mlxrunner/mlx/fast.go (+74 -0)
x/mlxrunner/mlx/generated.c (+2724 -0)
x/mlxrunner/mlx/generated.h (+7135 -0)
x/mlxrunner/mlx/generator/generated.c.gotmpl (+17 -0)

...and 22 more files

📄 Description

This change adds a new MLX based runner which includes:

  • Method-based MLX bindings
  • Subprocess-based MLX runner (x/mlxrunner)
  • KV cache with tree management
  • A basic sampler

The GLM4-MoE-Lite model has been ported to use the new bindings.

This change depends on #14184


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ollama/ollama/pull/14185 **Author:** [@pdevine](https://github.com/pdevine) **Created:** 2/10/2026 **Status:** ✅ Merged **Merged:** 2/10/2026 **Merged by:** [@pdevine](https://github.com/pdevine) **Base:** `main` ← **Head:** `pdevine/merge-mlx-runner` --- ### 📝 Commits (5) - [`3ef3989`](https://github.com/ollama/ollama/commit/3ef3989fe8add55ee9365916174018775f746d22) Add MLX runner with GLM4-MoE-Lite model support - [`fc7377c`](https://github.com/ollama/ollama/commit/fc7377c7b6dc93eaaacd090d134c5f5becd473c6) fix imagegen model loading - [`b60d686`](https://github.com/ollama/ollama/commit/b60d6866924732ffa2ca579af3f5479f7fde7af7) extra build tags - [`2a98429`](https://github.com/ollama/ollama/commit/2a984291cf4e2ba3dae292a0ac033db1c7e92b65) more build tags - [`a452788`](https://github.com/ollama/ollama/commit/a452788c9785d30c615eef43701d27da97f1a69d) fix build for non-arm64 ### 📊 Changes **42 files changed** (+14900 additions, -9 deletions) <details> <summary>View changed files</summary> 📝 `go.mod` (+4 -1) 📝 `go.sum` (+30 -1) 📝 `runner/runner.go` (+3 -0) 📝 `x/imagegen/manifest/weights.go` (+21 -7) ➕ `x/mlxrunner/cache.go` (+96 -0) ➕ `x/mlxrunner/cache/cache.go` (+198 -0) ➕ `x/mlxrunner/client.go` (+174 -0) ➕ `x/mlxrunner/mlx/.gitignore` (+3 -0) ➕ `x/mlxrunner/mlx/CMakeLists.txt` (+26 -0) ➕ `x/mlxrunner/mlx/act.go` (+23 -0) ➕ `x/mlxrunner/mlx/array.go` (+273 -0) ➕ `x/mlxrunner/mlx/array_test.go` (+45 -0) ➕ `x/mlxrunner/mlx/dtype.go` (+96 -0) ➕ `x/mlxrunner/mlx/dynamic.c` (+34 -0) ➕ `x/mlxrunner/mlx/dynamic.go` (+65 -0) ➕ `x/mlxrunner/mlx/dynamic.h` (+41 -0) ➕ `x/mlxrunner/mlx/fast.go` (+74 -0) ➕ `x/mlxrunner/mlx/generated.c` (+2724 -0) ➕ `x/mlxrunner/mlx/generated.h` (+7135 -0) ➕ `x/mlxrunner/mlx/generator/generated.c.gotmpl` (+17 -0) _...and 22 more files_ </details> ### 📄 Description This change adds a new MLX based runner which includes: * Method-based MLX bindings * Subprocess-based MLX runner (x/mlxrunner) * KV cache with tree management * A basic sampler The GLM4-MoE-Lite model has been ported to use the new bindings. This change depends on #14184 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-19 17:59:53 -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#25097