[GH-ISSUE #5198] use_mmap: Error: invalid int value [false] #3266

Closed
opened 2026-04-12 13:48:47 -05:00 by GiteaMirror · 5 comments
Owner

Originally created by @ghost on GitHub (Jun 21, 2024).
Original GitHub issue: https://github.com/ollama/ollama/issues/5198

Originally assigned to: @dhiltgen on GitHub.

What is the issue?

When adding the use_mmap parameter to a modelfile, it used to be like this: PARAMETER use_mmap false. Since 0.1.45, this does not work, it wants an integer value. So I put PARAMETER use_mmap 0. This allows me to create the modelfile.

However, when attempting to run the model, it comes back with this error: Error: option "use_mmap" must be of type boolean

Seems like a cast was forgotten somewhere maybe?

OS

Linux

GPU

AMD

CPU

AMD

Ollama version

0.1.45

Originally created by @ghost on GitHub (Jun 21, 2024). Original GitHub issue: https://github.com/ollama/ollama/issues/5198 Originally assigned to: @dhiltgen on GitHub. ### What is the issue? When adding the `use_mmap` parameter to a modelfile, it used to be like this: `PARAMETER use_mmap false`. Since 0.1.45, this does not work, it wants an integer value. So I put `PARAMETER use_mmap 0`. This allows me to create the modelfile. However, when attempting to run the model, it comes back with this error: `Error: option "use_mmap" must be of type boolean` Seems like a cast was forgotten somewhere maybe? ### OS Linux ### GPU AMD ### CPU AMD ### Ollama version 0.1.45
GiteaMirror added the bug label 2026-04-12 13:48:47 -05:00
Author
Owner

@ghost commented on GitHub (Jun 21, 2024):

By downgrading to 0.1.44, I was able to create the model, and run it using 0.1.45. So this behavior changed between 0.1.44 and 0.1.45.

<!-- gh-comment-id:2182170669 --> @ghost commented on GitHub (Jun 21, 2024): By downgrading to 0.1.44, I was able to create the model, and run it using 0.1.45. So this behavior changed between 0.1.44 and 0.1.45.
Author
Owner

@dhiltgen commented on GitHub (Jun 21, 2024):

Sorry about that. I recently change this to be a tri-state variable (unset, true or false) and missed the parsing logic for the modelfile. We'll get this fixed in the next release.

<!-- gh-comment-id:2182963712 --> @dhiltgen commented on GitHub (Jun 21, 2024): Sorry about that. I recently change this to be a tri-state variable (unset, true or false) and missed the parsing logic for the modelfile. We'll get this fixed in the next release.
Author
Owner

@ProjectMoon commented on GitHub (Jun 23, 2024):

I am not sure this is actually fix. I also had to downgrade to 0.1.44 again to create a model with use_mmap false, even with 0.1.46. I could create the model on latest version, but it would not run, with a similar issue about missing the boolean.

<!-- gh-comment-id:2184410487 --> @ProjectMoon commented on GitHub (Jun 23, 2024): I am not sure this is actually fix. I also had to downgrade to 0.1.44 again to create a model with use_mmap false, even with 0.1.46. I could create the model on latest version, but it would not run, with a similar issue about missing the boolean.
Author
Owner

@ProjectMoon commented on GitHub (Jun 23, 2024):

For a bit more clarity on this: on the latest version, I can create the model with use_mmap false. But when I try to run it, it says that parameter use_mmap must be of type boolean.

<!-- gh-comment-id:2185117849 --> @ProjectMoon commented on GitHub (Jun 23, 2024): For a bit more clarity on this: on the latest version, I can create the model with `use_mmap false`. But when I try to run it, it says that parameter use_mmap must be of type boolean.
Author
Owner

@ProjectMoon commented on GitHub (Jun 26, 2024):

Should this be reopened since there is another PR required for it? I don't think I can reopen it myself.

<!-- gh-comment-id:2190902648 --> @ProjectMoon commented on GitHub (Jun 26, 2024): Should this be reopened since there is another PR required for it? I don't think I can reopen it myself.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#3266