mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-10 03:28:53 +00:00
Merge pull request #1 from AnilAren/AnilAren-patch-1
Update supported_embedding.md
This commit is contained in:
commit
ddc7d14cb6
1 changed files with 18 additions and 1 deletions
|
|
@ -310,9 +310,25 @@ import os
|
|||
os.environ['NVIDIA_NIM_API_KEY'] = ""
|
||||
response = embedding(
|
||||
model='nvidia_nim/<model_name>',
|
||||
input=["good morning from litellm"]
|
||||
input=["good morning from litellm"],
|
||||
input_type="query"
|
||||
)
|
||||
```
|
||||
## `input_type` Parameter for Embedding Models
|
||||
|
||||
Certain embedding models, such as `nvidia/embed-qa-4` and the E5 family, operate in **dual modes**—one for **indexing documents (passages)** and another for **querying**. To maintain high retrieval accuracy, it's essential to specify how the input text is being used by setting the `input_type` parameter correctly.
|
||||
|
||||
### Usage
|
||||
|
||||
Set the `input_type` parameter to one of the following values:
|
||||
|
||||
- `"passage"` – for embedding content during **indexing** (e.g., documents).
|
||||
- `"query"` – for embedding content during **retrieval** (e.g., user queries).
|
||||
|
||||
> **Warning:** Incorrect usage of `input_type` can lead to a significant drop in retrieval performance.
|
||||
|
||||
|
||||
|
||||
All models listed [here](https://build.nvidia.com/explore/retrieval) are supported:
|
||||
|
||||
| Model Name | Function Call |
|
||||
|
|
@ -327,6 +343,7 @@ All models listed [here](https://build.nvidia.com/explore/retrieval) are support
|
|||
| snowflake/arctic-embed-l | `embedding(model="nvidia_nim/snowflake/arctic-embed-l", input)` |
|
||||
| baai/bge-m3 | `embedding(model="nvidia_nim/baai/bge-m3", input)` |
|
||||
|
||||
|
||||
## HuggingFace Embedding Models
|
||||
LiteLLM supports all Feature-Extraction + Sentence Similarity Embedding models: https://huggingface.co/models?pipeline_tag=feature-extraction
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue