Closed simonw closed 9 months ago
I tried to fix that like this:
But it clearly isn't working correctly.
This was addressed in llama-cpp-python 0.2.12.
From https://github.com/abetlen/llama-cpp-python/blob/main/CHANGELOG.md#0212 it says:
Suppress stdout and stderr when freeing model by @paschembri in #803
I can confirm it working for me, whereas in 0.2.7 it was still printing the output. If you look at the patch, it's providing a custom __del__()
to perform suppression on deallocation.
Fantastic! Yes I confirmed that this is no longer a problem with the latest llama-cpp-python
.
I still haven't found a good fix for this:
Output (which is mangled because I'm not using the correct prompt template yet):
Note the ggml_metal_free: deallocating at the end.