[PR #9198] [CLOSED] gemma2 implementation for the new engine #12884

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

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/9198
Author: @pdevine
Created: 2/18/2025
Status: Closed

Base: mainHead: pdevine/gemma2


📝 Commits (9)

📊 Changes

12 files changed (+455 additions, -14 deletions)

View changed files

📝 fs/ggml/ggml.go (+9 -0)
📝 go.mod (+1 -0)
📝 go.sum (+2 -0)
📝 kvcache/causal_test.go (+1 -1)
📝 ml/backend.go (+2 -1)
📝 ml/backend/ggml/ggml.go (+7 -4)
model/models/gemma2/model.go (+193 -0)
📝 model/models/llama/model.go (+4 -3)
📝 model/models/mllama/model_text.go (+4 -3)
📝 model/models/models.go (+1 -0)
📝 model/process_text.go (+11 -2)
model/process_text_spm.go (+220 -0)

📄 Description

This change includes:

  • fixes for some of the existing ggml configuration + RoPE routines
  • a new SPM tokenizer (based loosely on the BPE tokenizer)
  • a gemma2 implementation

🔄 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/9198 **Author:** [@pdevine](https://github.com/pdevine) **Created:** 2/18/2025 **Status:** ❌ Closed **Base:** `main` ← **Head:** `pdevine/gemma2` --- ### 📝 Commits (9) - [`fad98fa`](https://github.com/ollama/ollama/commit/fad98fabab9f56fd4bea7050c6e05f3bfdef875c) gemma2 impl - [`d231229`](https://github.com/ollama/ollama/commit/d231229122749f3110b3fa49f15236a3a300cd1d) cache is king - [`8cf1ea4`](https://github.com/ollama/ollama/commit/8cf1ea4fd830f991c0ef216615b2a88030304fa7) add sentence piece tokenizer - [`10e06d0`](https://github.com/ollama/ollama/commit/10e06d0a4508ee950b2d9dc59e10034446e76e5a) gemma2 ftw - [`035e697`](https://github.com/ollama/ollama/commit/035e69799e789ffa4cce92e776b79c5866e47de1) clean up - [`83d1a1a`](https://github.com/ollama/ollama/commit/83d1a1ab5547f1af8b28876ac3bb1fd8fd5408f6) cleanup - [`95fbf1d`](https://github.com/ollama/ollama/commit/95fbf1da12bd7bbc984cf902ff5fe87336b7e5f8) fix causal test - [`4cda3e3`](https://github.com/ollama/ollama/commit/4cda3e3622d018574334188f4144ebebba8ef28a) feed the linter - [`b7349a4`](https://github.com/ollama/ollama/commit/b7349a4efd0f2741de6ee9b5a01dfe358a2479c3) more linter feeding ### 📊 Changes **12 files changed** (+455 additions, -14 deletions) <details> <summary>View changed files</summary> 📝 `fs/ggml/ggml.go` (+9 -0) 📝 `go.mod` (+1 -0) 📝 `go.sum` (+2 -0) 📝 `kvcache/causal_test.go` (+1 -1) 📝 `ml/backend.go` (+2 -1) 📝 `ml/backend/ggml/ggml.go` (+7 -4) ➕ `model/models/gemma2/model.go` (+193 -0) 📝 `model/models/llama/model.go` (+4 -3) 📝 `model/models/mllama/model_text.go` (+4 -3) 📝 `model/models/models.go` (+1 -0) 📝 `model/process_text.go` (+11 -2) ➕ `model/process_text_spm.go` (+220 -0) </details> ### 📄 Description This change includes: * fixes for some of the existing ggml configuration + RoPE routines * a new SPM tokenizer (based loosely on the BPE tokenizer) * a gemma2 implementation --- <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:11: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#12884