[PR #13779] [MERGED] model: add Glm4MoeLiteForCausalLM architecture to support GLM-4.7-Flash #61082

Closed
opened 2026-04-29 16:09:14 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/13779
Author: @jmorganca
Created: 1/19/2026
Status: Merged
Merged: 1/19/2026
Merged by: @jmorganca

Base: mainHead: jmorganca/glm-47-moe-lite


📝 Commits (6)

📊 Changes

17 files changed (+2577 additions, -1 deletions)

View changed files

📝 convert/convert.go (+2 -0)
convert/convert_glm4moelite.go (+150 -0)
📝 fs/ggml/ggml.go (+2 -0)
model/models/glm4moelite/model.go (+304 -0)
📝 model/models/models.go (+1 -0)
model/parsers/glm46.go (+410 -0)
model/parsers/glm46_test.go (+862 -0)
model/parsers/glm47.go (+20 -0)
model/parsers/glm47_test.go (+99 -0)
📝 model/parsers/parsers.go (+2 -0)
📝 model/parsers/testhelpers_test.go (+8 -0)
model/renderers/glm46.go (+110 -0)
model/renderers/glm46_test.go (+223 -0)
model/renderers/glm47.go (+170 -0)
model/renderers/glm47_test.go (+191 -0)
📝 model/renderers/renderer.go (+2 -0)
📝 model/renderers/testhelpers_test.go (+21 -1)

📄 Description

Renderer and parser should potentially be renamed to glm47 to be consistent.

Note: this implementation has a ton of overlap with DeepSeek V3 (no YaRN). The two could be unified/share code in a follow up.


🔄 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/13779 **Author:** [@jmorganca](https://github.com/jmorganca) **Created:** 1/19/2026 **Status:** ✅ Merged **Merged:** 1/19/2026 **Merged by:** [@jmorganca](https://github.com/jmorganca) **Base:** `main` ← **Head:** `jmorganca/glm-47-moe-lite` --- ### 📝 Commits (6) - [`efa6b96`](https://github.com/ollama/ollama/commit/efa6b96136c7996cfba037c8e9329c2b7ececb26) model: add glm-4.7-flash - [`a49ae45`](https://github.com/ollama/ollama/commit/a49ae45a43093ec37f90a8cfff43bf96b4f6dc69) enable flash attention - [`b51d781`](https://github.com/ollama/ollama/commit/b51d7817a91d2fb67b921c08fbc1369210dae0a2) fix tests - [`77d3598`](https://github.com/ollama/ollama/commit/77d359848a5f4dc2bfb0189e77470b1d5ac2b0f3) fix build - [`b0f33ef`](https://github.com/ollama/ollama/commit/b0f33ef5035f7c99d6cbef922c43ef44dcc48211) remove comment - [`936f40f`](https://github.com/ollama/ollama/commit/936f40f52b38abd0a6d7c4ed686837db3cad2fc5) Remove verbose comments from GLM-4.7 implementation ### 📊 Changes **17 files changed** (+2577 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `convert/convert.go` (+2 -0) ➕ `convert/convert_glm4moelite.go` (+150 -0) 📝 `fs/ggml/ggml.go` (+2 -0) ➕ `model/models/glm4moelite/model.go` (+304 -0) 📝 `model/models/models.go` (+1 -0) ➕ `model/parsers/glm46.go` (+410 -0) ➕ `model/parsers/glm46_test.go` (+862 -0) ➕ `model/parsers/glm47.go` (+20 -0) ➕ `model/parsers/glm47_test.go` (+99 -0) 📝 `model/parsers/parsers.go` (+2 -0) 📝 `model/parsers/testhelpers_test.go` (+8 -0) ➕ `model/renderers/glm46.go` (+110 -0) ➕ `model/renderers/glm46_test.go` (+223 -0) ➕ `model/renderers/glm47.go` (+170 -0) ➕ `model/renderers/glm47_test.go` (+191 -0) 📝 `model/renderers/renderer.go` (+2 -0) 📝 `model/renderers/testhelpers_test.go` (+21 -1) </details> ### 📄 Description Renderer and parser should potentially be renamed to `glm47` to be consistent. Note: this implementation has a ton of overlap with DeepSeek V3 (no YaRN). The two could be unified/share code in a follow up. --- <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-29 16:09:14 -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#61082