[GH-ISSUE #2343] Feature Request - Support for ollama Keep alive #1355

Closed
opened 2026-04-12 11:11:30 -05:00 by GiteaMirror · 1 comment
Owner

Originally created by @twalderman on GitHub (Feb 4, 2024).
Original GitHub issue: https://github.com/ollama/ollama/issues/2343

there is a new api parameter for keeping the model loaded. it would be great to have it as a passable parameter in the modelfile.

Originally created by @twalderman on GitHub (Feb 4, 2024). Original GitHub issue: https://github.com/ollama/ollama/issues/2343 there is a new api parameter for keeping the model loaded. it would be great to have it as a passable parameter in the modelfile.
Author
Owner

@jmorganca commented on GitHub (Feb 20, 2024):

Hi there, thanks for the issue! keep_alive has been added as of 0.1.23 as an API parameter. You can read more about it here: https://github.com/ollama/ollama/blob/main/docs/api.md

In essence, keep_alive of 0 means the model won't stay loaded, keep_alive of -1 means it will stay loaded indefinitely, and keep_alive of another value (e.g. 5m or 10s or 20) will keep the model loaded for that period of time after generation

<!-- gh-comment-id:1953449784 --> @jmorganca commented on GitHub (Feb 20, 2024): Hi there, thanks for the issue! `keep_alive` has been added as of 0.1.23 as an API parameter. You can read more about it here: https://github.com/ollama/ollama/blob/main/docs/api.md In essence, `keep_alive` of 0 means the model won't stay loaded, `keep_alive` of `-1` means it will stay loaded indefinitely, and `keep_alive` of another value (e.g. `5m` or `10s` or `20`) will keep the model loaded for that period of time after generation
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#1355