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?

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.

I saw quite a few, this for example https://huggingface.co/Imran1/starling_base_sft or this digiplay/OldFish_v1.1_personal_HDmix · Hugging Face

Both repos don’t follow the model.safetensors or 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

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

See documentation here.