[PR #6645] [MERGED] Fix gemma2 2b conversion #12184

Closed
opened 2026-04-12 23:51:31 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/6645
Author: @pdevine
Created: 9/5/2024
Status: Merged
Merged: 9/6/2024
Merged by: @pdevine

Base: mainHead: pdevine/gemma2-2b


📝 Commits (5)

📊 Changes

4 files changed (+376 additions, -19 deletions)

View changed files

📝 convert/convert_gemma2.go (+13 -3)
📝 convert/convert_test.go (+43 -15)
📝 convert/reader_safetensors.go (+8 -1)
convert/testdata/gemma-2-2b-it.json (+312 -0)

📄 Description

Gemma2 added some tensors which were not getting named correctly which caused a collision for the ffm_norm tensors. This change fixes the tensor names and adds a new unit test for converting gemma2 2b.


🔄 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/6645 **Author:** [@pdevine](https://github.com/pdevine) **Created:** 9/5/2024 **Status:** ✅ Merged **Merged:** 9/6/2024 **Merged by:** [@pdevine](https://github.com/pdevine) **Base:** `main` ← **Head:** `pdevine/gemma2-2b` --- ### 📝 Commits (5) - [`db8c944`](https://github.com/ollama/ollama/commit/db8c944498e795e2bc2df799c14c9cc89a95933b) fix gemma2-2b conversion - [`085c2d4`](https://github.com/ollama/ollama/commit/085c2d4bf0b8dded9598ccd3aee4b57ea48b7160) add testdata - [`bd7e451`](https://github.com/ollama/ollama/commit/bd7e451f3e01dcd2b396abfb7304340a1bbaa8b3) catch duplicate tensor names - [`e326093`](https://github.com/ollama/ollama/commit/e3260936180356bc79a69ceb179415c1f9002ff3) feed the linter - [`ceca791`](https://github.com/ollama/ollama/commit/ceca79174cf125c6d5c334793cb09a8d53ccb803) comments ### 📊 Changes **4 files changed** (+376 additions, -19 deletions) <details> <summary>View changed files</summary> 📝 `convert/convert_gemma2.go` (+13 -3) 📝 `convert/convert_test.go` (+43 -15) 📝 `convert/reader_safetensors.go` (+8 -1) ➕ `convert/testdata/gemma-2-2b-it.json` (+312 -0) </details> ### 📄 Description Gemma2 added some tensors which were not getting named correctly which caused a collision for the `ffm_norm` tensors. This change fixes the tensor names and adds a new unit test for converting gemma2 2b. --- <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-12 23:51:31 -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#12184