[Inference Providers] How to register as a provider#1663
[Inference Providers] How to register as a provider#1663hanouticelina merged 26 commits intomainfrom
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.
this section is based on the refacto implemented here huggingface/huggingface.js#1315 (not merged yet)
Co-authored-by: Julien Chaumond <julien@huggingface.co>
Co-authored-by: Julien Chaumond <julien@huggingface.co>
julien-c
left a comment
There was a problem hiding this comment.
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.
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.
we added a Tip in the Model Mapping API section for that:
but I'm okay to add a specific section for that, wdyt?
There was a problem hiding this comment.
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 <julien@huggingface.co>
Co-authored-by: Simon Brandeis <33657802+SBrandeis@users.noreply.github.com>
|
PR docs page: https://moon-ci-docs.huggingface.co/docs/inference-providers/pr_1663/en/register-as-a-provider |
Co-authored-by: Lucain <lucain@huggingface.co>
Co-authored-by: Lucain <lucain@huggingface.co>
Co-authored-by: Lucain <lucain@huggingface.co>
|
|
||
| <Tip> | ||
|
|
||
| Note that `chatCompletion` is an exception as it is not a pipeline_tag, per se. Instead, it |
Co-authored-by: Victor Muštar <victor.mustar@gmail.com>
Co-authored-by: Victor Muštar <victor.mustar@gmail.com>
…e/hub-docs into how-to-register-as-a-provider
|
merging! |
Closes #1664.
Copied from this document (internal).
TODO: