[PR #11973] [MERGED] model: fix boundary in bpe #13673

Closed
opened 2026-04-13 00:32:29 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/11973
Author: @drifkin
Created: 8/20/2025
Status: Merged
Merged: 8/20/2025
Merged by: @drifkin

Base: mainHead: drifkin/bpe


📝 Commits (2)

  • fc5fb09 model: fix boundary in bpe
  • 463a6ca model: add bpe roundtripping tests

📊 Changes

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

View changed files

📝 model/bytepairencoding.go (+1 -1)
📝 model/bytepairencoding_test.go (+30 -0)

📄 Description

0x007e is a tilde and was getting adjusted (+0x00a2) to 0x0120 in the
encode, but then in the decode it was getting adjusted down (-0x0100) to
0x0020. The boundary for the +0x00a2 case has been adjusted to fix this

Fixes: #11966


🔄 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/11973 **Author:** [@drifkin](https://github.com/drifkin) **Created:** 8/20/2025 **Status:** ✅ Merged **Merged:** 8/20/2025 **Merged by:** [@drifkin](https://github.com/drifkin) **Base:** `main` ← **Head:** `drifkin/bpe` --- ### 📝 Commits (2) - [`fc5fb09`](https://github.com/ollama/ollama/commit/fc5fb09f514758ae9f59b11632c3d8f32e951d49) model: fix boundary in bpe - [`463a6ca`](https://github.com/ollama/ollama/commit/463a6caad82cd3de259b1135927722c71e9d80de) model: add bpe roundtripping tests ### 📊 Changes **2 files changed** (+31 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `model/bytepairencoding.go` (+1 -1) 📝 `model/bytepairencoding_test.go` (+30 -0) </details> ### 📄 Description 0x007e is a tilde and was getting adjusted (+0x00a2) to 0x0120 in the encode, but then in the decode it was getting adjusted down (-0x0100) to 0x0020. The boundary for the +0x00a2 case has been adjusted to fix this Fixes: #11966 --- <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:32:29 -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#13673