hf models ls filters by parameter count
Introduced 2026-03-12 · score 0.98
HOW TO USE IT
When you need Hub models within a parameter-count range, pass that range to `hf models ls --num-parameters`. Use the documented Hub UI range syntax, for example `min:6B,max:128B`.
hf models ls --num-parameters min:6B,max:128Bmodels = hf_api.list_models(num_parameters="min:6B,max:128B")WHY THIS HELPS
Find models in the Hub within a parameter-count range for a repository dependency or evaluation.
REQUIREMENTS AND LIMITATIONS
- Version: v1.7.0
- --num-parameters TEXT: Filter models by parameter count; accepts the Hub UI range syntax, such as `min:6B,max:128B`.
- num_parameters: Filter models by parameter count using the Hub UI range syntax.
- The filter uses the Hub UI/API range syntax.
FIRST-PARTY EVIDENCE
- https://github.com/huggingface/huggingface_hub/releases/tag/v1.7.0
- https://github.com/huggingface/huggingface_hub/pull/3897
- https://huggingface.co/docs/huggingface_hub/v1.7.0/en/package_reference/cli
- https://huggingface.co/docs/huggingface_hub/v1.7.0/en/guides/search
Check the installed version and the source before using it. Entry JSON