You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/source/en/guides/inference.md
+30-30Lines changed: 30 additions & 30 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -248,36 +248,36 @@ You might wonder why using [`InferenceClient`] instead of OpenAI's client? There
248
248
249
249
[`InferenceClient`]'s goal is to provide the easiest interface to run inference on Hugging Face models, on any provider. It has a simple API that supports the most common tasks. Here is a table showing which providers support which tasks:
250
250
251
-
| Domain | Task | HF Inference |Replicate |fal-ai | Fireworks AI | Sambanova | Together |
Copy file name to clipboardExpand all lines: src/huggingface_hub/inference/_client.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -132,7 +132,7 @@ class InferenceClient:
132
132
path will be appended to the base URL (see the [TGI Messages API](https://huggingface.co/docs/text-generation-inference/en/messages_api)
133
133
documentation for details). When passing a URL as `model`, the client will not append any suffix path to it.
134
134
provider (`str`, *optional*):
135
-
Name of the provider to use for inference. Can be "fal-ai"`, `"fireworks-ai"`, `"replicate"`, "sambanova"`, `"together"`, or `"hf-inference"`.
135
+
Name of the provider to use for inference. Can be "fal-ai"`, `"fireworks-ai"`, `"hf-inference"`, `"hyperbolic"`, `"replicate"`, "sambanova"` or `"together"`.
136
136
defaults to hf-inference (Hugging Face Serverless Inference API).
137
137
If model is a URL or `base_url` is passed, then `provider` is not used.
Copy file name to clipboardExpand all lines: src/huggingface_hub/inference/_generated/_async_client.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -120,7 +120,7 @@ class AsyncInferenceClient:
120
120
path will be appended to the base URL (see the [TGI Messages API](https://huggingface.co/docs/text-generation-inference/en/messages_api)
121
121
documentation for details). When passing a URL as `model`, the client will not append any suffix path to it.
122
122
provider (`str`, *optional*):
123
-
Name of the provider to use for inference. Can be "fal-ai"`, `"fireworks-ai"`, `"replicate"`, "sambanova"`, `"together"`, or `"hf-inference"`.
123
+
Name of the provider to use for inference. Can be "fal-ai"`, `"fireworks-ai"`, `"hf-inference"`, `"hyperbolic"`, `"replicate"`, "sambanova"` or `"together"`.
124
124
defaults to hf-inference (Hugging Face Serverless Inference API).
125
125
If model is a URL or `base_url` is passed, then `provider` is not used.
Copy file name to clipboardExpand all lines: src/huggingface_hub/inference/_providers/new_provider.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,6 +10,8 @@ Implement the methods that require custom handling. Check out the base implement
10
10
11
11
If the provider supports multiple tasks that require different implementations, create dedicated subclasses for each task, following the pattern shown in `fal_ai.py`.
12
12
13
+
For `text-generation` and `conversational` tasks, one can just inherit from `BaseTextGenerationTask` and `BaseConversationalTask` respectively (defined in `_common.py`) and override the methods if needed. Examples can be found in `fireworks_ai.py` and `together.py`.
0 commit comments