[PR #11077] [MERGED] model: treat 'user defined' tokens as special tokens #60128

Closed
opened 2026-04-29 15:03:10 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/11077
Author: @jmorganca
Created: 6/15/2025
Status: Merged
Merged: 6/16/2025
Merged by: @jmorganca

Base: mainHead: jmorganca/vocab-user-defined


📝 Commits (1)

  • c101054 model: treat 'user defined' tokens as special tokens

📊 Changes

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

View changed files

📝 model/vocabulary.go (+1 -1)
model/vocabulary_test.go (+16 -0)

📄 Description

Fixes issues where some tool calling and fill-in-the-middle (FIM) tokens would not be counted as special tokens, causing them to be tokenized incorrectly (in pieces instead of whole tokens)


🔄 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/11077 **Author:** [@jmorganca](https://github.com/jmorganca) **Created:** 6/15/2025 **Status:** ✅ Merged **Merged:** 6/16/2025 **Merged by:** [@jmorganca](https://github.com/jmorganca) **Base:** `main` ← **Head:** `jmorganca/vocab-user-defined` --- ### 📝 Commits (1) - [`c101054`](https://github.com/ollama/ollama/commit/c101054e26e5e5846acbe36e59f0f01a0fcb817a) model: treat 'user defined' tokens as special tokens ### 📊 Changes **2 files changed** (+17 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `model/vocabulary.go` (+1 -1) ➕ `model/vocabulary_test.go` (+16 -0) </details> ### 📄 Description Fixes issues where some tool calling and fill-in-the-middle (FIM) tokens would not be counted as special tokens, causing them to be tokenized incorrectly (in pieces instead of whole tokens) --- <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 15:03:10 -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#60128