Skip to content

Fix inference search #3022

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Fix inference search #3022

wants to merge 1 commit into from

Conversation

Wauplin
Copy link
Contributor

@Wauplin Wauplin commented Apr 22, 2025

EDIT: converting to draft for now. Turns out

do not return in the same format.


Fix #2963.

With this PR:

  • inference parameter accept "warm" or None when listing models
  • possible to filter models by inference_provider (one, multiple or "all")
  • return value is now a list, not a dict anymore (server-side breaking change)
from huggingface_hub import list_models

for model in list_models(inference_provider=["cerebras"], expand=["inferenceProviderMapping"], limit=1):
    print(model.id)
    print(model.inference_provider_mapping)
    break

=>

meta-llama/Llama-4-Scout-17B-16E-Instruct
[
    InferenceProviderMapping(provider='novita', provider_id='meta-llama/llama-4-scout-17b-16e-instruct', status='live', task='conversational'),
    InferenceProviderMapping(provider='fireworks-ai', provider_id='accounts/fireworks/models/llama4-scout-instruct-basic', status='live', task='conversational'),
    InferenceProviderMapping(provider='together', provider_id='meta-llama/Llama-4-Scout-17B-16E-Instruct', status='live', task='conversational'),
    InferenceProviderMapping(provider='sambanova', provider_id='Llama-4-Scout-17B-16E-Instruct', status='live', task='conversational'),
    InferenceProviderMapping(provider='cerebras', provider_id='llama-4-scout-17b-16e-instruct', status='live', task='conversational')
]

@hanouticelina will be useful to merge into #3011

@HuggingFaceDocBuilderDev

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.

@Wauplin Wauplin marked this pull request as draft April 22, 2025 14:51
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.

Update inference parameter and add inference_provider parameter in list_models
2 participants