mirror of
https://github.com/ollama/ollama.git
synced 2026-03-11 20:23:55 -05:00
Particularly in error cases, it can be difficult to ensure that all pinned memory is unpinned, MLX buffers are released and cache state is consistent. This encapsulates those pieces and sets up proper deferrals so that this happens automatically on exit.