Closed brokofankone closed 3 months ago
What windows are you running, and how do you normally start & exit koboldcpp?
I confirmed this happening here.
Setup: Windows 11 Pro Ryzen 5 1600 AF (6/12) GTX 1070 Ti (8GB)
Windows 10 Pro (up-to-date) Closing kobold terminal with X I launch it with the self-contained cuda exe
I run KCPP from the Windows Terminal directly.
koboldcpp "model.gguf" --multiuser --gpulayers 99 --contextsize 12288 --port 6969 --blasbatchsize 256 --usecublas --remotetunnel --highpriority --quiet
I interrupt the script with a CTRL + C.
You could say that's not necessarily a graceful exit.
I'm your 16th biggest fan btw, Concedo! Just trust me on that one.
So do we need to change from one file pyinstaller to one folder and use .zip to prevent
No, I will come up with a way to clean up the orphaned files.
Hello, this has now been fixed in the latest version. Cleanup of old koboldcpp pyinstallers temp dirs should happen on launch.
Thank you! 🫡
Thank you Concedo-senpai.
Ill also comment a bit on why it happens to begin with, the pyinstaller does indeed extract tempoary files it needs to temp and it has an instance that monitors for this and cleans it up. This works well and reliable for me on Windows 10 on the regular terminal, but in the modern Windows Terminal microsoft kills the process more aggressively so then the cleanup routine is never executed.
So the fact the files are left over isn't a Koboldcpp bug, but the fact Koboldcpp is being killed so forcefully by the terminal. I think we can close this issue now that the workaround is in place.
Thank you for the extra explanation, makes sense! I'm closing it considering the fix is deployed and working.
There is some type of issue with the way kobold cpp launches. It creates culbast dlls and other requirements in new folders over and over again, in the temp C folders, which is also not detected by disk cleanup windows utility.
After a week of using it I can easily rack up 100-300GB of temp files.
You can see the kobold traces, it creates folders named in such a format:![-zgfKrxckNUSVgW2MGJCp](https://github.com/LostRuins/koboldcpp/assets/53878047/75079e16-5ee4-455c-bdc8-46d4a5a1cf86)
Creation of new temp folder on fresh model load:![SZisgXjh8ZmcqJ3SeLSXL](https://github.com/LostRuins/koboldcpp/assets/53878047/01be804c-d0e1-473f-89d8-af3e985ad856)
This problem was investigated a bit in this HF thread, as I originally assumed it's a quantization script that does it, but we confirmed it is kobold doing it:
https://huggingface.co/FantasiaFoundry/GGUF-Quantization-Script/discussions/8#6612ad190b91dd969677bba1