[PR #10679] [MERGED] model: fix vocabulary #39197

Closed
opened 2026-04-22 23:50:43 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/10679
Author: @mxyng
Created: 5/13/2025
Status: Merged
Merged: 5/13/2025
Merged by: @mxyng

Base: mainHead: mxyng/fix-vocab


📝 Commits (1)

📊 Changes

7 files changed (+28 additions, -26 deletions)

View changed files

📝 model/models/gemma2/model.go (+2 -0)
📝 model/models/gemma3/model_text.go (+0 -13)
📝 model/models/llama/model.go (+3 -0)
📝 model/models/llama4/model.go (+3 -0)
📝 model/models/mistral3/model.go (+17 -0)
📝 model/models/mistral3/model_text.go (+0 -13)
📝 model/models/mllama/model.go (+3 -0)

📄 Description

not setting EOT may cause models to prematurely end generation if the model outputs a token 0. mitigate this by setting EOT to the EOS token ID when the model does not expect it to be set. #10577 should fix this more generally


🔄 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/10679 **Author:** [@mxyng](https://github.com/mxyng) **Created:** 5/13/2025 **Status:** ✅ Merged **Merged:** 5/13/2025 **Merged by:** [@mxyng](https://github.com/mxyng) **Base:** `main` ← **Head:** `mxyng/fix-vocab` --- ### 📝 Commits (1) - [`f339630`](https://github.com/ollama/ollama/commit/f33963004ca8d2d3a748fcd0a39f85a43e200904) fix vocabulary ### 📊 Changes **7 files changed** (+28 additions, -26 deletions) <details> <summary>View changed files</summary> 📝 `model/models/gemma2/model.go` (+2 -0) 📝 `model/models/gemma3/model_text.go` (+0 -13) 📝 `model/models/llama/model.go` (+3 -0) 📝 `model/models/llama4/model.go` (+3 -0) 📝 `model/models/mistral3/model.go` (+17 -0) 📝 `model/models/mistral3/model_text.go` (+0 -13) 📝 `model/models/mllama/model.go` (+3 -0) </details> ### 📄 Description not setting EOT may cause models to prematurely end generation if the model outputs a token 0. mitigate this by setting EOT to the EOS token ID when the model does not expect it to be set. #10577 should fix this more generally --- <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-22 23:50:43 -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#39197