You can add filter option for list_models
and change/add condition for file size.
from huggingface_hub import list_models, list_repo_files, hf_hub_url, get_hf_file_metadata
models = list_models()
for model in models:
files = list_repo_files(model.id)
for file in files:
if file[-4:]==".bin":
file_size = get_hf_file_metadata(hf_hub_url(model.id,file)).size
if file_size // 1000000 > 1000: # if file bigger than 1gb
print(model)
print(f"{file_size // 1000000} mb")
print("https://huggingface.co/"+model.id)
You can filter by #download/likes etc…
ModelInfo(id='google-bert/bert-large-uncased', author=None, sha=None, created_at=datetime.datetime(2022, 3, 2, 23, 29, 4, tzinfo=datetime.timezone.utc), last_modified=None, private=False, gated=None, disabled=None, downloads=2524614, downloads_all_time=None, likes=108, library_name='transformers', tags=['transformers', 'pytorch', 'tf', 'jax', 'rust', 'safetensors', 'bert', 'fill-mask', 'en', 'dataset:bookcorpus', 'dataset:wikipedia', 'arxiv:1810.04805', 'license:apache-2.0', 'autotrain_compatible', 'endpoints_compatible', 'region:us'], pipeline_tag='fill-mask', mask_token=None, card_data=None, widget_data=None, model_index=None, config=None, transformers_info=None, siblings=None, spaces=None, safetensors=None)