From 803c8a71547a957c38c5f9183fbf0807d6c75cb3 Mon Sep 17 00:00:00 2001 From: Daniel van Strien Date: Thu, 9 Jul 2026 08:36:03 +0100 Subject: [PATCH 1/5] Document hf models ls --inference-provider and --warm on the Hub API page Co-Authored-By: Claude Fable 5 --- docs/inference-providers/hub-api.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/docs/inference-providers/hub-api.md b/docs/inference-providers/hub-api.md index a6279b5c7..58123a74b 100644 --- a/docs/inference-providers/hub-api.md +++ b/docs/inference-providers/hub-api.md @@ -52,6 +52,18 @@ Finally, you can select all models served by at least one inference provider: "BagOu22/Lora_HKLPAZ" ``` +The same filters are available from the terminal with the [`hf` CLI](https://huggingface.co/docs/huggingface_hub/package_reference/cli#hf-models-list): + +```sh +# List models served by Fireworks AI, most downloaded first +~ hf models ls --inference-provider fireworks-ai --sort downloads + +# List "llama" models served by at least one provider +~ hf models ls --warm --search llama +``` + +Repeat `--inference-provider` to match models served by any of several providers. Add `--expand inferenceProviderMapping` to see which provider serves each model and the provider-specific model id. + ## Get model status To find an inference provider for a specific model, request the `inference` attribute in the model info endpoint: From f96b6108a62b4763bb71ca44fcc634f8261e4735 Mon Sep 17 00:00:00 2001 From: Daniel van Strien Date: Thu, 9 Jul 2026 08:41:53 +0100 Subject: [PATCH 2/5] Match repo conventions (bash fence, no prompt prefix) + fresher examples Co-Authored-By: Claude Fable 5 --- docs/inference-providers/hub-api.md | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/docs/inference-providers/hub-api.md b/docs/inference-providers/hub-api.md index 58123a74b..ef1afcbc6 100644 --- a/docs/inference-providers/hub-api.md +++ b/docs/inference-providers/hub-api.md @@ -54,12 +54,15 @@ Finally, you can select all models served by at least one inference provider: The same filters are available from the terminal with the [`hf` CLI](https://huggingface.co/docs/huggingface_hub/package_reference/cli#hf-models-list): -```sh -# List models served by Fireworks AI, most downloaded first -~ hf models ls --inference-provider fireworks-ai --sort downloads +```bash +# List models served by at least one inference provider +hf models ls --warm -# List "llama" models served by at least one provider -~ hf models ls --warm --search llama +# Is GLM-5.2 served by at least one provider? +hf models ls --warm --search GLM-5.2 + +# List models served by Fireworks AI, most downloaded first +hf models ls --inference-provider fireworks-ai --sort downloads ``` Repeat `--inference-provider` to match models served by any of several providers. Add `--expand inferenceProviderMapping` to see which provider serves each model and the provider-specific model id. From 2cbedd278edc2091f92c8ce793d23c474306ed74 Mon Sep 17 00:00:00 2001 From: Daniel van Strien Date: Thu, 9 Jul 2026 08:58:34 +0100 Subject: [PATCH 3/5] Surface CLI model discovery on index + first-api-call guide; mention --json Co-Authored-By: Claude Fable 5 --- docs/inference-providers/guides/first-api-call.md | 9 +++++++++ docs/inference-providers/hub-api.md | 4 ++-- docs/inference-providers/index.md | 2 ++ 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/docs/inference-providers/guides/first-api-call.md b/docs/inference-providers/guides/first-api-call.md index 46fc42900..a279d05ea 100644 --- a/docs/inference-providers/guides/first-api-call.md +++ b/docs/inference-providers/guides/first-api-call.md @@ -22,6 +22,15 @@ Visit the [Hugging Face Hub](https://huggingface.co/models?pipeline_tag=text-to- For this example, we'll use [FLUX.1-schnell](https://huggingface.co/black-forest-labs/FLUX.1-schnell), a powerful text-to-image model. Next, navigate to the model page and scroll down to find the inference widget on the right side. +> [!TIP] +> You can also do this step from the terminal — or have a coding agent do it for you. The `hf` CLI (installed with `huggingface_hub`) supports the same filters: +> +> ```bash +> hf models ls --filter text-to-image --warm --sort trending_score +> ``` +> +> Swap `--warm` for `--inference-provider fal-ai` to narrow to a specific provider, or add `--json` for machine-readable output. See the [Hub API page](https://huggingface.co/docs/inference-providers/hub-api) for the full set of filters. + ## Step 2: Try the Interactive Widget Before writing any code, try the widget directly on the [model page](https://huggingface.co/black-forest-labs/FLUX.1-dev?inference_provider=fal-ai): diff --git a/docs/inference-providers/hub-api.md b/docs/inference-providers/hub-api.md index ef1afcbc6..2b5cb64c5 100644 --- a/docs/inference-providers/hub-api.md +++ b/docs/inference-providers/hub-api.md @@ -58,14 +58,14 @@ The same filters are available from the terminal with the [`hf` CLI](https://hug # List models served by at least one inference provider hf models ls --warm -# Is GLM-5.2 served by at least one provider? +# Check whether GLM-5.2 is served by at least one provider hf models ls --warm --search GLM-5.2 # List models served by Fireworks AI, most downloaded first hf models ls --inference-provider fireworks-ai --sort downloads ``` -Repeat `--inference-provider` to match models served by any of several providers. Add `--expand inferenceProviderMapping` to see which provider serves each model and the provider-specific model id. +Repeat `--inference-provider` to match models served by any of several providers. Add `--expand inferenceProviderMapping` to see which provider serves each model and the provider-specific model id, or `--json` for machine-readable output. ## Get model status diff --git a/docs/inference-providers/index.md b/docs/inference-providers/index.md index ca3c483d0..7127c1444 100644 --- a/docs/inference-providers/index.md +++ b/docs/inference-providers/index.md @@ -98,6 +98,8 @@ Before diving into integration, explore models interactively with our [Inference Inference Playground thumbnail +Prefer the terminal? Run `hf models ls --warm` with the [`hf` CLI](https://huggingface.co/docs/huggingface_hub/package_reference/cli#hf-models-list) to list every model served by at least one provider, and add `--json` for scripts and agents. See the [Hub API](./hub-api) page for the full set of filters. + ### Authentication You'll need a Hugging Face token to authenticate your requests. Create one by visiting your [token settings](https://huggingface.co/settings/tokens/new?ownUserPermissions=inference.serverless.write&tokenType=fineGrained) and generating a `fine-grained` token with `Make calls to Inference Providers` permissions. From 54b890a049b3f51743efd0291f5432d176dc952d Mon Sep 17 00:00:00 2001 From: Daniel van Strien Date: Thu, 9 Jul 2026 13:33:02 +0100 Subject: [PATCH 4/5] Use --pipeline-tag (hh#4512) for exact parity with the website filter links Swap the first-api-call TIP's --filter for --pipeline-tag (same filter as the models?pipeline_tag= links, not a tags superset) and add a fal-ai task example to the hub-api CLI block mirroring the curl example above it. Co-Authored-By: Claude Fable 5 --- docs/inference-providers/guides/first-api-call.md | 2 +- docs/inference-providers/hub-api.md | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/inference-providers/guides/first-api-call.md b/docs/inference-providers/guides/first-api-call.md index a279d05ea..4370a91be 100644 --- a/docs/inference-providers/guides/first-api-call.md +++ b/docs/inference-providers/guides/first-api-call.md @@ -26,7 +26,7 @@ For this example, we'll use [FLUX.1-schnell](https://huggingface.co/black-forest > You can also do this step from the terminal — or have a coding agent do it for you. The `hf` CLI (installed with `huggingface_hub`) supports the same filters: > > ```bash -> hf models ls --filter text-to-image --warm --sort trending_score +> hf models ls --pipeline-tag text-to-image --warm --sort trending_score > ``` > > Swap `--warm` for `--inference-provider fal-ai` to narrow to a specific provider, or add `--json` for machine-readable output. See the [Hub API page](https://huggingface.co/docs/inference-providers/hub-api) for the full set of filters. diff --git a/docs/inference-providers/hub-api.md b/docs/inference-providers/hub-api.md index 2b5cb64c5..dc5d2bdbe 100644 --- a/docs/inference-providers/hub-api.md +++ b/docs/inference-providers/hub-api.md @@ -61,6 +61,9 @@ hf models ls --warm # Check whether GLM-5.2 is served by at least one provider hf models ls --warm --search GLM-5.2 +# List text-to-image models served by Fal AI +hf models ls --inference-provider fal-ai --pipeline-tag text-to-image + # List models served by Fireworks AI, most downloaded first hf models ls --inference-provider fireworks-ai --sort downloads ``` From 71df584373d040e624aae336ac92fbac5864d82e Mon Sep 17 00:00:00 2001 From: Daniel van Strien Date: Thu, 9 Jul 2026 13:51:54 +0100 Subject: [PATCH 5/5] Neutral comment wording for the search example Co-Authored-By: Claude Fable 5 --- docs/inference-providers/hub-api.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/inference-providers/hub-api.md b/docs/inference-providers/hub-api.md index dc5d2bdbe..8b9521880 100644 --- a/docs/inference-providers/hub-api.md +++ b/docs/inference-providers/hub-api.md @@ -58,7 +58,7 @@ The same filters are available from the terminal with the [`hf` CLI](https://hug # List models served by at least one inference provider hf models ls --warm -# Check whether GLM-5.2 is served by at least one provider +# Search served models for GLM-5.2 hf models ls --warm --search GLM-5.2 # List text-to-image models served by Fal AI