-
Notifications
You must be signed in to change notification settings - Fork 374
[Inference Providers] How to register as a provider #1663
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
Conversation
|
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. |
|
I don't understand why the build of the PR doc is failing, I may need some help here cc @mishig25 if you have an idea EDIT: it seems fixed now 🤷♀️ |
|
|
||
| For example, you can find the expected schema for Text to Speech here: [https://github.com/huggingface/huggingface.js/packages/src/tasks/text-to-speech/spec/input.json#L4](https://github.com/huggingface/huggingface.js/blob/0a690a14d52041a872dc103846225603599f4a33/packages/tasks/src/tasks/text-to-speech/spec/input.json#L4), and similarly for other supported tasks. If your API for a given task is different from HF's, it is not an issue: you can tweak the code in `huggingface.js` to be able to call your models, i.e., provide some kind of "translation" of parameter names and output names. However, API specs should not be model-specific, only task-specific. Run the JS code and add some [tests](https://github.com/huggingface/huggingface.js/blob/main/packages/inference/test/HfInference.spec.ts) to make sure it works well. We can help with this step! | ||
|
|
||
| ## 2. JS Client Integration |
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.
this section is based on the refacto implemented here huggingface/huggingface.js#1315 (not merged yet)
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.
Made a first pass!
Co-authored-by: Julien Chaumond <[email protected]>
Co-authored-by: Julien Chaumond <[email protected]>
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.
looks great, i'm wondering if we should or not split into one page per section? wdyt
| ### Register the provider | ||
|
|
||
| Go to [packages/inference/src/lib/getProviderHelper.ts](https://github.com/huggingface/huggingface.js//blob/main/packages/inference/src/lib/getProviderHelper.ts) and add your provider to `PROVIDERS`. Please try to respect alphabetical order. |
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.
An additional step here is to get in touch with us to add the provider to moon-landing and map to the organization
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.
we added a Tip in the Model Mapping API section for that:
| To proceed with this step, we have to enable your account server-side. Make sure you have an organization on the Hub for your enterprise. |
but I'm okay to add a specific section for that, wdyt?
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.
I've added in the introduction a "Reach out to us to add your provider server-side and provide your SVG icon" step just after the JS integration a179888
Co-authored-by: Julien Chaumond <[email protected]>
Co-authored-by: Simon Brandeis <[email protected]>
|
PR docs page: https://moon-ci-docs.huggingface.co/docs/inference-providers/pr_1663/en/register-as-a-provider |
Co-authored-by: Lucain <[email protected]>
Co-authored-by: Lucain <[email protected]>
Co-authored-by: Lucain <[email protected]>
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.
Nice!
|
|
||
| <Tip> | ||
|
|
||
| Note that `chatCompletion` is an exception as it is not a pipeline_tag, per se. Instead, it |
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.
nice 👍
Co-authored-by: Victor Muštar <[email protected]>
Co-authored-by: Victor Muštar <[email protected]>
…e/hub-docs into how-to-register-as-a-provider
|
merging! |
Closes #1664.
Copied from this document (internal).
TODO: