[PR #8714] [MERGED] Avoid sharing a buffer when multiple inputs are sent to generate embeddings via api/embed. #12756

Closed
opened 2026-04-13 00:08:55 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/8714
Author: @dpereira
Created: 1/30/2025
Status: Merged
Merged: 2/6/2025
Merged by: @jessegross

Base: mainHead: fix/embedding-buffer-reset-rc


📝 Commits (1)

  • 13b79f0 runner: avoid buffer overwrite when generating multiple embeddings

📊 Changes

1 file changed (+10 additions, -6 deletions)

View changed files

📝 llama/llama.go (+10 -6)

📄 Description

This sharing happens due to a race condition between the processing of each of the inputs.

Addtional details were added in the linked issue.

Fixes #8713


🔄 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/8714 **Author:** [@dpereira](https://github.com/dpereira) **Created:** 1/30/2025 **Status:** ✅ Merged **Merged:** 2/6/2025 **Merged by:** [@jessegross](https://github.com/jessegross) **Base:** `main` ← **Head:** `fix/embedding-buffer-reset-rc` --- ### 📝 Commits (1) - [`13b79f0`](https://github.com/ollama/ollama/commit/13b79f0ce70f3128f257dc3d08e4bb50cc2fecf7) runner: avoid buffer overwrite when generating multiple embeddings ### 📊 Changes **1 file changed** (+10 additions, -6 deletions) <details> <summary>View changed files</summary> 📝 `llama/llama.go` (+10 -6) </details> ### 📄 Description This sharing happens due to a race condition between the processing of each of the inputs. Addtional details were added in the linked issue. Fixes #8713 --- <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:08:55 -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#12756