[PR #9661] [MERGED] engine: add gemma support #13030

Closed
opened 2026-04-13 00:15:55 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/9661
Author: @mxyng
Created: 3/11/2025
Status: Merged
Merged: 3/11/2025
Merged by: @mxyng

Base: mainHead: gemma


📝 Commits (10+)

📊 Changes

31 files changed (+1735 additions, -55 deletions)

View changed files

📝 convert/convert.go (+16 -2)
📝 convert/convert_gemma.go (+1 -1)
convert/convert_gemma3.go (+142 -0)
📝 convert/tokenizer_spm.go (+66 -8)
📝 fs/ggml/ggml.go (+14 -1)
📝 kvcache/causal.go (+14 -12)
📝 kvcache/causal_test.go (+13 -1)
llama/patches/0020-ollama-debug-tensor.patch (+33 -0)
📝 llm/server.go (+1 -1)
📝 ml/backend.go (+5 -1)
📝 ml/backend/ggml/ggml.go (+43 -14)
ml/backend/ggml/ggml/include/ollama-debug.h (+11 -0)
ml/backend/ggml/ggml/src/ggml-cpu/cpu_debug.go (+6 -0)
📝 ml/backend/ggml/ggml/src/ggml-cpu/ggml-cpu.c (+6 -0)
ml/backend/ggml/ggml/src/ollama-debug.c (+115 -0)
ml/backend/ggml/threads.go (+7 -0)
ml/backend/ggml/threads_debug.go (+7 -0)
model/models/gemma2/model.go (+220 -0)
model/models/gemma3/model.go (+173 -0)
model/models/gemma3/model_text.go (+254 -0)

...and 11 more files

📄 Description

No description provided


🔄 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/9661 **Author:** [@mxyng](https://github.com/mxyng) **Created:** 3/11/2025 **Status:** ✅ Merged **Merged:** 3/11/2025 **Merged by:** [@mxyng](https://github.com/mxyng) **Base:** `main` ← **Head:** `gemma` --- ### 📝 Commits (10+) - [`5f74d1f`](https://github.com/ollama/ollama/commit/5f74d1fd47ec396ba40f60aee0a1a585ad0fcb4f) gemma2 impl - [`4b037a9`](https://github.com/ollama/ollama/commit/4b037a97dcc0387d2b94d293d4bd20e7e262d609) add gemma vision encoder - [`4346c24`](https://github.com/ollama/ollama/commit/4346c2409dec7bb182aa91d236f0759d592a1b42) fix drift from main - [`631fecc`](https://github.com/ollama/ollama/commit/631fecc6d9fe644a793a9ca185c080db4fea77e7) temporary work around for converting spm - [`0df1800`](https://github.com/ollama/ollama/commit/0df1800436bfb48b0556fce8f37c5d2e256c1d0a) set non-causal attention - [`c62861f`](https://github.com/ollama/ollama/commit/c62861f4fa4bd5a82a1c8b46bea74b1672d384b3) fix conversion - [`0e88659`](https://github.com/ollama/ollama/commit/0e886595bf3d4ee33737f4b30154210b0df2d2df) Fix tests and drift from main - [`8934324`](https://github.com/ollama/ollama/commit/8934324b72c962fdff69ecee9c13d5d69580a1b7) use fast attention - [`46bb016`](https://github.com/ollama/ollama/commit/46bb0169c40f466994cde8a89b455d8e3f9e177e) update model - [`9b54267`](https://github.com/ollama/ollama/commit/9b54267e6951ec6cff7fc2188899ac5d4169ab79) fix configs ### 📊 Changes **31 files changed** (+1735 additions, -55 deletions) <details> <summary>View changed files</summary> 📝 `convert/convert.go` (+16 -2) 📝 `convert/convert_gemma.go` (+1 -1) ➕ `convert/convert_gemma3.go` (+142 -0) 📝 `convert/tokenizer_spm.go` (+66 -8) 📝 `fs/ggml/ggml.go` (+14 -1) 📝 `kvcache/causal.go` (+14 -12) 📝 `kvcache/causal_test.go` (+13 -1) ➕ `llama/patches/0020-ollama-debug-tensor.patch` (+33 -0) 📝 `llm/server.go` (+1 -1) 📝 `ml/backend.go` (+5 -1) 📝 `ml/backend/ggml/ggml.go` (+43 -14) ➕ `ml/backend/ggml/ggml/include/ollama-debug.h` (+11 -0) ➕ `ml/backend/ggml/ggml/src/ggml-cpu/cpu_debug.go` (+6 -0) 📝 `ml/backend/ggml/ggml/src/ggml-cpu/ggml-cpu.c` (+6 -0) ➕ `ml/backend/ggml/ggml/src/ollama-debug.c` (+115 -0) ➕ `ml/backend/ggml/threads.go` (+7 -0) ➕ `ml/backend/ggml/threads_debug.go` (+7 -0) ➕ `model/models/gemma2/model.go` (+220 -0) ➕ `model/models/gemma3/model.go` (+173 -0) ➕ `model/models/gemma3/model_text.go` (+254 -0) _...and 11 more files_ </details> ### 📄 Description _No description provided_ --- <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-13 00:15:55 -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#13030