[PR #5105] [MERGED] Adjust mmap logic for cuda windows for faster model load #11682

Closed
opened 2026-04-12 23:35:43 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/5105
Author: @dhiltgen
Created: 6/17/2024
Status: Merged
Merged: 6/18/2024
Merged by: @dhiltgen

Base: mainHead: cuda_mmap


📝 Commits (1)

  • 1717967 Adjust mmap logic for cuda windows for faster model load

📊 Changes

3 files changed (+96 additions, -15 deletions)

View changed files

📝 api/types.go (+57 -13)
📝 api/types_test.go (+36 -0)
📝 llm/server.go (+3 -2)

📄 Description

On Windows, recent llama.cpp changes make mmap slower in most cases, so default to off. This also implements a tri-state for use_mmap so we can detect the difference between a user provided value of true/false, or unspecified.


🔄 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/5105 **Author:** [@dhiltgen](https://github.com/dhiltgen) **Created:** 6/17/2024 **Status:** ✅ Merged **Merged:** 6/18/2024 **Merged by:** [@dhiltgen](https://github.com/dhiltgen) **Base:** `main` ← **Head:** `cuda_mmap` --- ### 📝 Commits (1) - [`1717967`](https://github.com/ollama/ollama/commit/171796791f2bb09fc731fdfca4b6fa8926fd6f74) Adjust mmap logic for cuda windows for faster model load ### 📊 Changes **3 files changed** (+96 additions, -15 deletions) <details> <summary>View changed files</summary> 📝 `api/types.go` (+57 -13) 📝 `api/types_test.go` (+36 -0) 📝 `llm/server.go` (+3 -2) </details> ### 📄 Description On Windows, recent llama.cpp changes make mmap slower in most cases, so default to off. This also implements a tri-state for use_mmap so we can detect the difference between a user provided value of true/false, or unspecified. --- <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-12 23:35:43 -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#11682