Model doesn't ger offloaded from VRAM after deletion #166

Closed
opened 2026-02-15 16:28:27 -05:00 by yindo · 1 comment
Owner

Originally created by @tianci216 on GitHub (Nov 24, 2024).

I have a custom script that creates (with ollama.create()) a model when using, and deletes the model after the job is done (with ollama.delete()). However, I realize the model is kept in VRAM after deletion, but the model has already been removed from the model list, therefore stopping the model from running with ollama CLI is impossible, the only way to offload the model is to restart ollama.

Is there a function in Ollama python library that could offload the model? Thanks!

Originally created by @tianci216 on GitHub (Nov 24, 2024). I have a custom script that creates (with ollama.create()) a model when using, and deletes the model after the job is done (with ollama.delete()). However, I realize the model is kept in VRAM after deletion, but the model has already been removed from the model list, therefore stopping the model from running with ollama CLI is impossible, the only way to offload the model is to restart ollama. Is there a function in Ollama python library that could offload the model? Thanks!
yindo closed this issue 2026-02-15 16:28:27 -05:00
Author
Owner

@ParthSareen commented on GitHub (Nov 25, 2024):

Hey - can you make sure you're on the latest version of Ollama? And then if you're still running into this issue - this seems like a bug in https://github.com/ollama/ollama - so would appreciate it if you can open the issue there! Feel free to tag me in that :)

@ParthSareen commented on GitHub (Nov 25, 2024): Hey - can you make sure you're on the latest version of Ollama? And then if you're still running into this issue - this seems like a bug in https://github.com/ollama/ollama - so would appreciate it if you can open the issue there! Feel free to tag me in that :)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: ollama/ollama-python#166