[PR #7637] [MERGED] runner.go: Enforce NUM_PARALLEL directly in the runner #12476

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

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/7637
Author: @jessegross
Created: 11/12/2024
Status: Merged
Merged: 11/14/2024
Merged by: @jessegross

Base: mainHead: jessegross/sem


📝 Commits (1)

  • ca04f2a runner.go: Enforce NUM_PARALLEL directly in the runner

📊 Changes

1 file changed (+47 additions, -20 deletions)

View changed files

📝 llama/runner/runner.go (+47 -20)

📄 Description

NUM_PARALEL is currently enforced by the Ollama server process - it will only issue requests to the runner if the maximum number of concurrent requests has not been exceeded. Although this should be sufficient, it is good for the runner to protect its own data structures. Currently, if too many requests get through to the runner, they will just get stuck and never return.

This may help with reports of Ollama hanging, though it is unclear how it would actually occur.

Bug #7573


🔄 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/7637 **Author:** [@jessegross](https://github.com/jessegross) **Created:** 11/12/2024 **Status:** ✅ Merged **Merged:** 11/14/2024 **Merged by:** [@jessegross](https://github.com/jessegross) **Base:** `main` ← **Head:** `jessegross/sem` --- ### 📝 Commits (1) - [`ca04f2a`](https://github.com/ollama/ollama/commit/ca04f2a0edebbac583baf0d8fff68e72eb68678e) runner.go: Enforce NUM_PARALLEL directly in the runner ### 📊 Changes **1 file changed** (+47 additions, -20 deletions) <details> <summary>View changed files</summary> 📝 `llama/runner/runner.go` (+47 -20) </details> ### 📄 Description NUM_PARALEL is currently enforced by the Ollama server process - it will only issue requests to the runner if the maximum number of concurrent requests has not been exceeded. Although this should be sufficient, it is good for the runner to protect its own data structures. Currently, if too many requests get through to the runner, they will just get stuck and never return. This may help with reports of Ollama hanging, though it is unclear how it would actually occur. Bug #7573 --- <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:00:00 -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#12476