[PR #10773] llm: Use first layer as memory buffer in estimation #13358

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

Original Pull Request: https://github.com/ollama/ollama/pull/10773

State: closed
Merged: Yes


This is a partial revert of 0478d44 "Fixed over vram allcation dure to small initial layer sizes."

Previously we used the size of the first layer as an extra reserved amount of space to buffer our memory estimates. The above commit changed this to use the largest layer. However, this had performance impacts on more models than the original commit was trying to fix.

There is just a heuristic without an ideal solution so this goes back to the historic behavior.

Fixes: #10765, #10756, #10752, #10726

**Original Pull Request:** https://github.com/ollama/ollama/pull/10773 **State:** closed **Merged:** Yes --- This is a partial revert of 0478d44 "Fixed over vram allcation dure to small initial layer sizes." Previously we used the size of the first layer as an extra reserved amount of space to buffer our memory estimates. The above commit changed this to use the largest layer. However, this had performance impacts on more models than the original commit was trying to fix. There is just a heuristic without an ideal solution so this goes back to the historic behavior. Fixes: #10765, #10756, #10752, #10726
GiteaMirror added the pull-request label 2026-04-13 00:24:48 -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#13358