[PR #15244] [MERGED] Gemma4 on MLX #20362

Closed
opened 2026-04-16 07:34:13 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/15244
Author: @dhiltgen
Created: 4/2/2026
Status: Merged
Merged: 4/13/2026
Merged by: @dhiltgen

Base: mainHead: gemma4-mlx


📝 Commits (3)

  • 868aaa9 gemma4: implement Gemma 4 model for MLX (text-only runtime)
  • 3412a83 gemma4: two MoE + SWA prefill perf fixes
  • b2d2a07 review comments

📊 Changes

8 files changed (+2715 additions, -0 deletions)

View changed files

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

📄 Description

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:


🔄 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/15244 **Author:** [@dhiltgen](https://github.com/dhiltgen) **Created:** 4/2/2026 **Status:** ✅ Merged **Merged:** 4/13/2026 **Merged by:** [@dhiltgen](https://github.com/dhiltgen) **Base:** `main` ← **Head:** `gemma4-mlx` --- ### 📝 Commits (3) - [`868aaa9`](https://github.com/ollama/ollama/commit/868aaa989793f2122a1f9425d04788365e18ad89) gemma4: implement Gemma 4 model for MLX (text-only runtime) - [`3412a83`](https://github.com/ollama/ollama/commit/3412a8320707314fefc108646cd739fb04471b27) gemma4: two MoE + SWA prefill perf fixes - [`b2d2a07`](https://github.com/ollama/ollama/commit/b2d2a07b18ba06b816e493a2acbb1934ee096509) review comments ### 📊 Changes **8 files changed** (+2715 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `x/create/client/create.go` (+12 -0) 📝 `x/create/create.go` (+2 -0) ➕ `x/create/gemma4.go` (+264 -0) ➕ `x/create/gemma4_test.go` (+191 -0) 📝 `x/mlxrunner/imports.go` (+1 -0) ➕ `x/models/gemma4/gemma4.go` (+1514 -0) ➕ `x/models/gemma4/gemma4_moe_test.go` (+228 -0) ➕ `x/models/gemma4/gemma4_test.go` (+503 -0) </details> ### 📄 Description 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 --- <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-16 07:34:13 -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#20362