[PR #12758] [MERGED] llm: Change memory allocation backoff from exponential to incremental #39814

Closed
opened 2026-04-23 00:48:47 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/12758
Author: @jessegross
Created: 10/23/2025
Status: Merged
Merged: 10/23/2025
Merged by: @jessegross

Base: mainHead: jessegross/backoff


📝 Commits (1)

  • 4f78e2e llm: Change memory allocation backoff from exponential to incremental

📊 Changes

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

View changed files

📝 llm/server.go (+2 -5)

📄 Description

If we create a memory layout that should fit based on report free VRAM but allocation still fails, we start applying a backoff. This reduces free VRAM by an exponential percentage (1%, 2%, 4%...). However, the points chosen tend to be too dense at the beginning and too sparse at the end. Therefore, this switches to an incremental backoff (10%, 20%, 30%...).


🔄 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/12758 **Author:** [@jessegross](https://github.com/jessegross) **Created:** 10/23/2025 **Status:** ✅ Merged **Merged:** 10/23/2025 **Merged by:** [@jessegross](https://github.com/jessegross) **Base:** `main` ← **Head:** `jessegross/backoff` --- ### 📝 Commits (1) - [`4f78e2e`](https://github.com/ollama/ollama/commit/4f78e2e26e475c480a2017109f2f0721bd25b870) llm: Change memory allocation backoff from exponential to incremental ### 📊 Changes **1 file changed** (+2 additions, -5 deletions) <details> <summary>View changed files</summary> 📝 `llm/server.go` (+2 -5) </details> ### 📄 Description If we create a memory layout that should fit based on report free VRAM but allocation still fails, we start applying a backoff. This reduces free VRAM by an exponential percentage (1%, 2%, 4%...). However, the points chosen tend to be too dense at the beginning and too sparse at the end. Therefore, this switches to an incremental backoff (10%, 20%, 30%...). --- <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-23 00:48:47 -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#39814