mirror of
https://github.com/ollama/ollama-python.git
synced 2026-07-21 09:05:23 -04:00
Model doesn't ger offloaded from VRAM after deletion #166
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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!
@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 :)