mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-10 03:28:53 +00:00
Update supported_embedding.md
This commit is contained in:
parent
a1c2097aeb
commit
39bb3d560c
1 changed files with 18 additions and 3 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 |
|
||||
|
|
@ -320,14 +336,13 @@ All models listed [here](https://build.nvidia.com/explore/retrieval) are support
|
|||
| NV-Embed-QA | `embedding(model="nvidia_nim/NV-Embed-QA", input)` |
|
||||
| nvidia/nv-embed-v1 | `embedding(model="nvidia_nim/nvidia/nv-embed-v1", input)` |
|
||||
| nvidia/nv-embedqa-mistral-7b-v2 | `embedding(model="nvidia_nim/nvidia/nv-embedqa-mistral-7b-v2", input)` |
|
||||
| nvidia/nv-embedqa-e5-v5 | `embedding(model="nvidia_nim/nvidia/nv-embedqa-e5-v5", input, input_type="query")` |
|
||||
| nvidia/nv-embedqa-e5-v5 | `embedding(model="nvidia_nim/nvidia/nv-embedqa-e5-v5", input)` |
|
||||
| nvidia/embed-qa-4 | `embedding(model="nvidia_nim/nvidia/embed-qa-4", input)` |
|
||||
| nvidia/llama-3.2-nv-embedqa-1b-v1 | `embedding(model="nvidia_nim/nvidia/llama-3.2-nv-embedqa-1b-v1", input)` |
|
||||
| nvidia/llama-3.2-nv-embedqa-1b-v2 | `embedding(model="nvidia_nim/nvidia/llama-3.2-nv-embedqa-1b-v2", input)` |
|
||||
| snowflake/arctic-embed-l | `embedding(model="nvidia_nim/snowflake/arctic-embed-l", input)` |
|
||||
| baai/bge-m3 | `embedding(model="nvidia_nim/baai/bge-m3", input)` |
|
||||
|
||||
Input type is necesary for model - "nvidia/nv-embedqa-e5-v5"
|
||||
|
||||
## 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