Skip to content

Add hf CLI model-discovery equivalent to generated Inference Providers task pages#2636

Merged
Wauplin merged 2 commits into
huggingface:mainfrom
davanstrien:ip-task-pages-cli-discovery
Jul 20, 2026
Merged

Add hf CLI model-discovery equivalent to generated Inference Providers task pages#2636
Wauplin merged 2 commits into
huggingface:mainfrom
davanstrien:ip-task-pages-cli-discovery

Conversation

@davanstrien

@davanstrien davanstrien commented Jul 9, 2026

Copy link
Copy Markdown
Member

What

Following up on huggingface/huggingface_hub#4511 and this morning's Slack discussion — cc @Wauplin, opening as a draft for discussion since you gave it a 👍 ("it would make things easier for agents").

One-line change to TIP_LIST_MODELS_LINK_TEMPLATE in scripts/inference-providers/scripts/generate.ts + regeneration of the 20 task pages. Each page's "Explore all available models…" line under Recommended models now also shows the terminal equivalent:

hf models ls --warm --pipeline-tag automatic-speech-recognition --sort trending_score

--pipeline-tag (from #4512, thanks!) makes this an exact CLI mirror of the existing website filter link (models?inference=warm&pipeline_tag=<task>&sort=trending).

Draft until

--pipeline-tag ships in a huggingface_hub release — same gate as #2632. Will flip both to ready then.

Verification

  • Command tested against git-main hf for several tasks (returns the same warm model set as the website filter).
  • pnpm generate + pnpm format:check pass. Regeneration picked up routine data drift (token-classification output-spec table, zai-org GLM-5.2-FP8 mapping) and prettier fixed two pre-existing style nits in generate.ts — happy to drop any of that if you'd rather the bot take it.

Open questions

  • Wording/placement fine? Kept it as one continued sentence + code block rather than a separate TIP callout.
  • Keep --sort trending_score in the example, or shorter with just --warm --pipeline-tag <task>?

🤖 Generated with Claude Code


Note

Low Risk
Documentation and generator-template only; no runtime or API behavior changes beyond updated example model IDs in generated snippets.

Overview
Extends the generated Recommended models section on Inference Providers task docs so the existing Hub filter link is paired with a terminal equivalent: hf models ls --warm --pipeline-tag <task> --sort trending_score, linked to the hf CLI docs.

The change is driven by updating TIP_LIST_MODELS_LINK_TEMPLATE in scripts/inference-providers/scripts/generate.ts, then re-running the generator so all task markdown (and related provider pages) refresh.

Regeneration also reflects current warm-model/snippet data (e.g. HF Inference examples for image classification and text-to-image, zai-org VLM snippets using GLM-4.6V, and trimmed recommended-model bullets on several tasks). Minor formatting fixes in generate.ts are included.

Reviewed by Cursor Bugbot for commit 76c620b. Bugbot is set up for automated code reviews on this repo. Configure here.

<InferenceSnippet
pipeline=text-generation
providersMapping={ {"zai-org":{"modelId":"zai-org/GLM-5.2","providerModelId":"glm-5.2"} } }
providersMapping={ {"zai-org":{"modelId":"zai-org/GLM-5.2-FP8","providerModelId":"glm-5.2"} } }

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why u change this Claude

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not from the template edit — regeneration rewrites these pages from the live partners API, and zai-org's catalogue changed upstream: https://huggingface.co/api/partners/zai-org/models now lists zai-org/GLM-5.2-FP8 (isModelAuthor: true, listed first) alongside zai-org/GLM-5.2 for the same glm-5.2 endpoint, so the generator now picks the FP8 repo as the display model. Running pnpm generate on clean main reproduces this with zero local changes — the scheduled bot's next run would land the same. Kept it in (disclosed in the description), but happy to drop it and let the bot take it.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, not a problem

<InferenceSnippet
pipeline=text-generation
providersMapping={ {"cerebras":{"modelId":"openai/gpt-oss-120b","providerModelId":"gpt-oss-120b"},"cohere":{"modelId":"CohereLabs/tiny-aya-global","providerModelId":"tiny-aya-global"},"deepinfra":{"modelId":"zai-org/GLM-5.2","providerModelId":"zai-org/GLM-5.2"},"featherless-ai":{"modelId":"zai-org/GLM-5.2","providerModelId":"zai-org/GLM-5.2"},"fireworks-ai":{"modelId":"deepseek-ai/DeepSeek-V4-Pro","providerModelId":"accounts/fireworks/models/deepseek-v4-pro"},"groq":{"modelId":"openai/gpt-oss-120b","providerModelId":"openai/gpt-oss-120b"},"novita":{"modelId":"zai-org/GLM-5.2","providerModelId":"zai-org/glm-5.2"},"nscale":{"modelId":"meta-llama/Llama-3.1-8B-Instruct","providerModelId":"meta-llama/Llama-3.1-8B-Instruct"},"ovhcloud":{"modelId":"openai/gpt-oss-120b","providerModelId":"gpt-oss-120b"},"publicai":{"modelId":"swiss-ai/Apertus-8B-Instruct-2509","providerModelId":"swiss-ai/apertus-8b-instruct"},"scaleway":{"modelId":"meta-llama/Llama-3.1-8B-Instruct","providerModelId":"llama-3.1-8b-instruct"},"together":{"modelId":"deepseek-ai/DeepSeek-V4-Pro","providerModelId":"deepseek-ai/DeepSeek-V4-Pro"},"zai-org":{"modelId":"zai-org/GLM-5.2","providerModelId":"glm-5.2"}} }
providersMapping={ {"cerebras":{"modelId":"openai/gpt-oss-120b","providerModelId":"gpt-oss-120b"},"cohere":{"modelId":"CohereLabs/tiny-aya-global","providerModelId":"tiny-aya-global"},"deepinfra":{"modelId":"zai-org/GLM-5.2","providerModelId":"zai-org/GLM-5.2"},"featherless-ai":{"modelId":"zai-org/GLM-5.2","providerModelId":"zai-org/GLM-5.2"},"fireworks-ai":{"modelId":"deepseek-ai/DeepSeek-V4-Pro","providerModelId":"accounts/fireworks/models/deepseek-v4-pro"},"groq":{"modelId":"openai/gpt-oss-120b","providerModelId":"openai/gpt-oss-120b"},"novita":{"modelId":"zai-org/GLM-5.2","providerModelId":"zai-org/glm-5.2"},"nscale":{"modelId":"meta-llama/Llama-3.1-8B-Instruct","providerModelId":"meta-llama/Llama-3.1-8B-Instruct"},"ovhcloud":{"modelId":"openai/gpt-oss-120b","providerModelId":"gpt-oss-120b"},"publicai":{"modelId":"swiss-ai/Apertus-8B-Instruct-2509","providerModelId":"swiss-ai/apertus-8b-instruct"},"scaleway":{"modelId":"meta-llama/Llama-3.1-8B-Instruct","providerModelId":"llama-3.1-8b-instruct"},"together":{"modelId":"deepseek-ai/DeepSeek-V4-Pro","providerModelId":"deepseek-ai/DeepSeek-V4-Pro"},"zai-org":{"modelId":"zai-org/GLM-5.2-FP8","providerModelId":"glm-5.2"}} }

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why this change Claude?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same single upstream change as the zai-org provider page: this snippet's providersMapping is regenerated from the live partners API, where zai-org now advertises zai-org/GLM-5.2-FP8 for its glm-5.2 endpoint. Comes with any regeneration, not from the template edit — same story for the token-classification output-spec table rows.

@HuggingFaceDocBuilderDev

Copy link
Copy Markdown

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@davanstrien

Copy link
Copy Markdown
Member Author

also cc @hanouticelina for viz. Also fine if you prefer not to add this/do it differently.

davanstrien and others added 2 commits July 14, 2026 11:55
One-line change to TIP_LIST_MODELS_LINK_TEMPLATE in generate.ts + regeneration:
each task page's 'Explore all available models' line now also shows
'hf models ls --warm --pipeline-tag <task> --sort trending_score'.

Regeneration picks up routine data drift (token-classification output spec,
zai-org GLM-5.2-FP8 mapping) and prettier fixes in generate.ts.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@davanstrien
davanstrien force-pushed the ip-task-pages-cli-discovery branch from 3766406 to 76c620b Compare July 14, 2026 11:14
@davanstrien
davanstrien marked this pull request as ready for review July 14, 2026 11:14

@Wauplin Wauplin left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perfect!

And yeah, no worries about the re-generation, it's a process happening automatically every night. I'm merging it now to avoid further merge conflicts.

@Wauplin
Wauplin merged commit 892dc27 into huggingface:main Jul 20, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants