-
Notifications
You must be signed in to change notification settings - Fork 291
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
(WIP) Dynamic inference provider mapping #1173
Conversation
|
||
type FalAiId = string; | ||
|
||
export const FAL_AI_SUPPORTED_MODEL_IDS: ProviderMapping<FalAiId> = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same comment as in https://github.com/huggingface/huggingface_hub/pull/2836/files#r1942755169, i would for now keep the mappings (but make them empty)
and still support them in code
That way we have slightly less breaking changes too, potentially
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@julien-c I reverted to keep both the hard-coded logic and the new dynamic mapping. Mapping from the Hub takes precedence over the hardcoded one.
Depends on https://github.com/huggingface-internal/moon-landing/pull/12453 (internal) |
`Model ${params.model} is in staging mode for provider ${params.provider}. Meant for test purposes only.` | ||
); | ||
} | ||
// TODO: how is it handled server-side if model has multiple tasks (e.g. `text-generation` + `conversational`)? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// TODO: how is it handled server-side if model has multiple tasks (e.g. `text-generation` + `conversational`)? |
i think this is ok @Wauplin
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO this should be ready to review + to merge
let's try to merge quickly because otherwise PRs will be opened to add stuff to the mappings
BG @SBrandeis ![]() |
"it should work" 😄
Still a draft while https://github.com/huggingface-internal/moon-landing/pull/12398 (internal) is been merged/deployed.
Goal is to use the dynamic mapping, and default back to hardcoded model ids if necessary (for backward compatibility).
I haven't tested anything for now and I left some todos to address:
status: "live" | "staging"
? => raise a warningmodelInfo
call (only do it once at runtime)text-generation
andconversational
"hf-inference"
if no taskHints? (for now, I kept as before)EDIT: made an update to preserve previous behavior with hardcoded mapping. Dynamic mapping from the hub
takes precedence.