Add a 'stop' method to abort model loading #134

Open
opened 2026-02-15 16:28:13 -05:00 by yindo · 0 comments
Owner

Originally created by @willbelr on GitHub (Aug 21, 2024).

When the script is killed while a model is loading, Ollama server will detect that the client connection was closed and abort loading and associated request. A method to achieve this gracefully would be very useful, especially when loading very large model. I tried calling Client._client.close() but without success.

Originally created by @willbelr on GitHub (Aug 21, 2024). When the script is killed while a model is loading, Ollama server will detect that the client connection was closed and abort loading and associated request. A method to achieve this gracefully would be very useful, especially when loading very large model. I tried calling Client._client.close() but without success.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: ollama/ollama-python#134