[PR #12274] [MERGED] model: add pre:, suf: to struct tags #13762

Closed
opened 2026-04-13 00:35:39 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/12274
Author: @mxyng
Created: 9/12/2025
Status: Merged
Merged: 9/23/2025
Merged by: @mxyng

Base: mainHead: mxyng/gguf-tag-pre-suf


📝 Commits (1)

📊 Changes

3 files changed (+102 additions, -42 deletions)

View changed files

📝 model/model.go (+45 -24)
📝 model/model_test.go (+56 -5)
📝 model/models/llama4/model_text.go (+1 -13)

📄 Description

this changes introduces prefix and suffix gguf tag components. these are useful when models use existing structures but have slightly different names. the best example is llama4.TextSharedExpert which is identical to llama4.TextMLP but with a _shexp suffix to its tensor name, e.g. blk.0.ffn_up_shexp.weight vs. blk.0.ffn_up.weight. this was previously handled by duplicating the code for llama4.TextMLP


🔄 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/12274 **Author:** [@mxyng](https://github.com/mxyng) **Created:** 9/12/2025 **Status:** ✅ Merged **Merged:** 9/23/2025 **Merged by:** [@mxyng](https://github.com/mxyng) **Base:** `main` ← **Head:** `mxyng/gguf-tag-pre-suf` --- ### 📝 Commits (1) - [`a0a19ee`](https://github.com/ollama/ollama/commit/a0a19eed440878798f3db60049da42b415ab62f1) add pre:, suf: to tags ### 📊 Changes **3 files changed** (+102 additions, -42 deletions) <details> <summary>View changed files</summary> 📝 `model/model.go` (+45 -24) 📝 `model/model_test.go` (+56 -5) 📝 `model/models/llama4/model_text.go` (+1 -13) </details> ### 📄 Description this changes introduces prefix and suffix gguf tag components. these are useful when models use existing structures but have slightly different names. the best example is `llama4.TextSharedExpert` which is identical to `llama4.TextMLP` but with a `_shexp` suffix to its tensor name, e.g. `blk.0.ffn_up_shexp.weight` vs. `blk.0.ffn_up.weight`. this was previously handled by duplicating the code for `llama4.TextMLP` --- <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:35:39 -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#13762