From 406725e05fd65755e7481d16acc4ea88176c7447 Mon Sep 17 00:00:00 2001 From: Nicolas Patry Date: Mon, 14 Oct 2024 15:19:02 +0200 Subject: [PATCH] Updating the doc (we keep the list actually). --- docs/openapi.json | 2 +- docs/source/supported_models.md | 16 +++++++++++++++- update_doc.py | 2 ++ 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/docs/openapi.json b/docs/openapi.json index fd64a3ab..b7e4aa9e 100644 --- a/docs/openapi.json +++ b/docs/openapi.json @@ -2094,4 +2094,4 @@ "description": "Hugging Face Text Generation Inference API" } ] -} +} \ No newline at end of file diff --git a/docs/source/supported_models.md b/docs/source/supported_models.md index 34849b22..cf925d05 100644 --- a/docs/source/supported_models.md +++ b/docs/source/supported_models.md @@ -34,4 +34,18 @@ Text Generation Inference enables serving optimized models. The following sectio - [Idefics](https://huggingface.co/HuggingFaceM4/idefics-9b) (Multimodal) -If the above list lacks the model you would like to serve, depending on the model's pipeline type, you can try to initialize and serve the model anyways to see how well it performs, but performance isn't guaranteed for non-optimized models. Read more about [Non-core Model Serving](../basic_tutorials/non_core_models). \ No newline at end of file + +If the above list lacks the model you would like to serve, depending on the model's pipeline type, you can try to initialize and serve the model anyways to see how well it performs, but performance isn't guaranteed for non-optimized models: + +```python +# for causal LMs/text-generation models +AutoModelForCausalLM.from_pretrained(, device_map="auto")` +# or, for text-to-text generation models +AutoModelForSeq2SeqLM.from_pretrained(, device_map="auto") +``` + +If you wish to serve a supported model that already exists on a local folder, just point to the local folder. + +```bash +text-generation-launcher --model-id +``` diff --git a/update_doc.py b/update_doc.py index e37746f9..203aaced 100644 --- a/update_doc.py +++ b/update_doc.py @@ -9,6 +9,8 @@ TEMPLATE = """ Text Generation Inference enables serving optimized models. The following sections list which models (VLMs & LLMs) are supported. +SUPPORTED_MODELS + If the above list lacks the model you would like to serve, depending on the model's pipeline type, you can try to initialize and serve the model anyways to see how well it performs, but performance isn't guaranteed for non-optimized models: