[PR #9373] [MERGED] model: add bos token if configured #18202

Closed
opened 2026-04-16 06:28:08 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/9373
Author: @mxyng
Created: 2/26/2025
Status: Merged
Merged: 2/27/2025
Merged by: @mxyng

Base: mainHead: mxyng/add-bos-token


📝 Commits (1)

  • 4daef49 model: add bos token if configured

📊 Changes

5 files changed (+32 additions, -2 deletions)

View changed files

📝 fs/ggml/ggml.go (+5 -1)
📝 ml/backend.go (+1 -0)
📝 model/models/llama/model.go (+2 -0)
📝 model/models/mllama/model.go (+2 -0)
📝 model/process_text.go (+22 -1)

📄 Description

add the bos token if model expects it to be prepended and eos token if model expects it to be appended


🔄 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/9373 **Author:** [@mxyng](https://github.com/mxyng) **Created:** 2/26/2025 **Status:** ✅ Merged **Merged:** 2/27/2025 **Merged by:** [@mxyng](https://github.com/mxyng) **Base:** `main` ← **Head:** `mxyng/add-bos-token` --- ### 📝 Commits (1) - [`4daef49`](https://github.com/ollama/ollama/commit/4daef493e7a968fea188457c96cad0887687873f) model: add bos token if configured ### 📊 Changes **5 files changed** (+32 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `fs/ggml/ggml.go` (+5 -1) 📝 `ml/backend.go` (+1 -0) 📝 `model/models/llama/model.go` (+2 -0) 📝 `model/models/mllama/model.go` (+2 -0) 📝 `model/process_text.go` (+22 -1) </details> ### 📄 Description add the bos token if model expects it to be prepended and eos token if model expects it to be appended --- <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-16 06:28:08 -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#18202