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?
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 a
model.safetensors or a
model.safetensors.index.json file. The repo doesn’t have to be compatible with
transformers to display them.
Both repos don’t follow the
model.safetensors.index.json structure. That’s why safetensors metadata is not displayed on those repos. If you want to retrieve this information for individual files, you can use
parse_safetensors_file_metadata from the huggingface_hub Python library:
from huggingface_hub import parse_safetensors_file_metadata
See documentation here.