[PR #4941] [MERGED] llm: always add bos token to prompt #11622

Closed
opened 2026-04-12 23:33:52 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/4941
Author: @jmorganca
Created: 6/9/2024
Status: Merged
Merged: 6/9/2024
Merged by: @jmorganca

Base: mainHead: jmorganca/fix-broken-embedding


📝 Commits (2)

  • 1837e9d fix embedding by adding fixes from llama.cpp upstream
  • b884e4a remove assert

📊 Changes

1 file changed (+2 additions, -2 deletions)

View changed files

📝 llm/ext_server/server.cpp (+2 -2)

📄 Description

Carries https://github.com/ollama/ollama/pull/4399

Fixes issues with embeddings not working because bos tokens were omitted from the prompt

Thank you @deadbeef84 for finding and fixing this.

Fixes https://github.com/ollama/ollama/issues/4207
Fixes https://github.com/ollama/ollama/issues/3777


🔄 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/4941 **Author:** [@jmorganca](https://github.com/jmorganca) **Created:** 6/9/2024 **Status:** ✅ Merged **Merged:** 6/9/2024 **Merged by:** [@jmorganca](https://github.com/jmorganca) **Base:** `main` ← **Head:** `jmorganca/fix-broken-embedding` --- ### 📝 Commits (2) - [`1837e9d`](https://github.com/ollama/ollama/commit/1837e9d11c11b2bee69fc509b5548fd492dea12c) fix embedding by adding fixes from llama.cpp upstream - [`b884e4a`](https://github.com/ollama/ollama/commit/b884e4ab45c2aeb834c337afc93850b7689ca51b) remove assert ### 📊 Changes **1 file changed** (+2 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `llm/ext_server/server.cpp` (+2 -2) </details> ### 📄 Description Carries https://github.com/ollama/ollama/pull/4399 Fixes issues with embeddings not working because `bos` tokens were omitted from the prompt Thank you @deadbeef84 for finding and fixing this. Fixes https://github.com/ollama/ollama/issues/4207 Fixes https://github.com/ollama/ollama/issues/3777 --- <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-12 23:33:52 -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#11622