Safetensors params/precision on model page
Hello!I’m a doctoral candidate working on OSS governance. I have been trying to gather some information from HF, from repo meta tags, readme and HTMLs. Model sizes are of particular interest to me, but they only seem to be very accessible (model page) for some safetensors supported projects. Moreover, several repos do not display their model sizes on their pages, despite having .safetensors models.I was wondering what might be the reason behind this. Are model sizes only available for projects compatible with both Transformers and Safetensors? Missing config?
2024-01-12T10:17:47Z
Hi@mahaswec, could you provide links to the repos for which the safetensors metadata is not displayed?Safetensors metadata is supposed to be displayed on any repo that has amodel.safetensorsor amodel.safetensors.index.jsonfile. The repo doesn’t have to be compatible withtransformersto display them.
2024-02-16T02:58:34Z
I saw quite a few, this for examplehttps://huggingface.co/Imran1/starling_base_sftor thisdigiplay/OldFish_v1.1_personal_HDmix · Hugging Face
2024-02-16T07:52:45Z
Wauplin:Safetensors metadata is supposed to be displayed on any repo that has amodel.safetensorsor amodel.safetensors.index.jsonfile. The repo doesn’t have to be compatible withtransformersto display them.Both repos don’t follow themodel.safetensorsormodel.safetensors.index.jsonstructure. That’s why safetensors metadata is not displayed on those repos. If you want to retrieve this information for individual files, you can useparse_safetensors_file_metadatafrom the huggingface_hub Python library:from huggingface_hub import parse_safetensors_file_metadata

parse_safetensors_file_metadata(repo_id="Imran1/starling_base_sft", filename="adapter_model.safetensors")See documentationhere.