[PR #14072] [MERGED] runner: discard compute results if sequence replaced mid-batch #14497

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

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/14072
Author: @jmorganca
Created: 2/4/2026
Status: Merged
Merged: 2/4/2026
Merged by: @jmorganca

Base: mainHead: runner-fix


📝 Commits (1)

  • 5e68abe runner: discard compute results if sequence replaced mid-batch

📊 Changes

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

View changed files

📝 runner/ollamarunner/runner.go (+5 -1)

📄 Description

If a sequence is replaced in s.seqs while a batch is computing, the old logits can be decoded into the new sequence. This change rechecks the sequence pointer after compute and skips decoding for replaced entries, preventing stale results from being applied.


🔄 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/14072 **Author:** [@jmorganca](https://github.com/jmorganca) **Created:** 2/4/2026 **Status:** ✅ Merged **Merged:** 2/4/2026 **Merged by:** [@jmorganca](https://github.com/jmorganca) **Base:** `main` ← **Head:** `runner-fix` --- ### 📝 Commits (1) - [`5e68abe`](https://github.com/ollama/ollama/commit/5e68abe16ab4a8545f536e30145ce89644ff1a10) runner: discard compute results if sequence replaced mid-batch ### 📊 Changes **1 file changed** (+5 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `runner/ollamarunner/runner.go` (+5 -1) </details> ### 📄 Description If a sequence is replaced in s.seqs while a batch is computing, the old logits can be decoded into the new sequence. This change rechecks the sequence pointer after compute and skips decoding for replaced entries, preventing stale results from being applied. --- <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:55:58 -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#14497