Open wiiiktor opened 1 month ago
Thanks for reporting!
The --convert_checkpoint false
flag is not for the .safetensor
file conversion but for the HF -> LitGPT
conversion.
Some models on the HF Hub have .bin
files and some have .safetensor
files. So, for simplicity, .safetensor
files are always converted to .bin
files as a first step (this is part of the download logic, not the checkpoint conversion logic, so it happens whether --convert_checkpoint
is true
or false
.
To prevent the .safetensor
files from being deleted, you could comment out the following line:
Anyways, thanks for reporting this though. It would be nice to improve the HF -> LitGPT
conversion logic some time to read from .safetensor
files directly (I do that in some of my other code bases too and should be too hard).
Just after converting from safetensor to bin, I terminate this operation and safetensor files stay in my folder ;) Anyway, thanks for explanation. Safetensor files are oftentimes handy, as in practice I use various tools/libraries and some of them use safetensors instead of bins.
Bug description
The command litgpt download ..model_name... --convert_checkpoint false is performing conversion and deletes the safetensor files (my workaround is to terminate work after safetensors are downloaded, just before they are deleted):
What operating system are you using?
Unknown
LitGPT Version