Appearance
Llama Nemotron Embedding 1B v2 ​
Overview ​
The Text-2-Vector API enables the generation of dense vector embeddings from input text, capturing its semantic meaning and contextual information. With an extended context window of up to 8,192 tokens, compared to 512 tokens in the previous 1B embedding model, it can process significantly longer text inputs while retaining important contextual details. These embeddings support a wide range of applications, including semantic search, document retrieval, machine learning, and Retrieval-Augmented Generation (RAG) pipelines.
Powered by NVIDIA's Llama Nemotron Embedding 1B v2, the model is optimized for multilingual and cross-lingual question-answering and information retrieval. It supports long-document processing with a maximum context length of 8,192 tokens and offers flexible embedding dimensions through Matryoshka Embeddings, with output dimensions of 384, 512, 768, 1,024, and 2,048.
The API follows the OpenAI-compatible Embeddings API interface, ensuring seamless integration with existing applications and workflows. It also provides an endpoint to retrieve the list of available models.
Key Features ​
- Provider: NVIDIA
- Model: 1B-parameter cross-encoder text reranker
- Architecture: Fine-tuned Llama 3.2 1B Transformer Encoder
- Maximum Context Window: 8,192 tokens
- Embedding Dimensions: 384, 512, 768, 1,024, and 2,048
- Input: Text (list of strings)
- Output: Dense vector embeddings (float arrays)
- Languages: 26 languages, including English, German, French, Hindi, Chinese, Japanese, Spanish, and others
- Use Cases: Semantic search, RAG, multilingual retrieval, cross-lingual question answering, and document indexing
- API Compatibility: OpenAI Embeddings API interface
- Model Card: nvidia/llama-nemotron-embed-1b-v2
MTEB German Benchmark ​
The model was evaluated against German-language tasks using the MTEB benchmark on the Swiss AI Platform staging endpoint. The evaluation compared three embedding models across nine tasks covering document retrieval, intent classification, semantic textual similarity, and clustering.
- Retrieval Tasks: BelebeleRetrieval, GerDaLIR, GermanDPR, GermanGovServiceRetrieval, GermanQuAD-Retrieval, and LegalQuAD.
- Classification Task: MassiveIntentClassification.
- Semantic Similarity Task: STS22.v2.
- Clustering Task: TenKGnadClusteringP2P.v2.
Llama Nemotron Embedding 1B v2 demonstrated strong performance across the evaluated German tasks, achieving 0.971 on GermanQuAD-Retrieval, 0.957 on BelebeleRetrieval, and 0.882 on GermanGovServiceRetrieval.
These results demonstrate its potential for German-language semantic search, document retrieval, and RAG applications.
Endpoints ​
1. Create Embedding ​
POST /v1/embeddings
Description ​
Generates dense vector embeddings for the given input text. The model converts text into numerical vector representations that capture semantic meaning and can be used for semantic search, document retrieval, and Retrieval-Augmented Generation (RAG) applications.
The model supports configurable embedding dimensions of 384, 512, 768, 1,024, and 2,048.
For retrieval applications, use the query: prefix for search queries and the passage: prefix for documents.
Request Body ​
json
{
"input": "The quick brown fox jumped over the lazy dog",
"model": "nvidia/llama-nemotron-embed-1b-v2",
"encoding_format": "float",
"input_type": "query",
"dimensions": 512
}| Field | Type | Required | Description |
|---|---|---|---|
input | string/array | Yes | Input text or tokens to embed. |
model | string | Yes | ID of the model to use. |
encoding_format | string | No | Format of the embeddings (float or base64). Default: float. |
input_type. | string | No | Input type of embeddings (query or passage). |
dimensions | integer | No | Number of dimensions for the output embeddings. |
Response ​
json
{
"object": "list",
"model": "nvidia/llama-nemotron-embed-1b-v2",
"data": [
{
"index": 0,
"object": "embedding",
"embedding": [0.123, 0.456, 0.789, ...]
}
],
"usage": {
"prompt_tokens": 10,
"total_tokens": 12,
"completion_tokens": 0,
"prompt_tokens_details": null,
"completion_tokens_details": null
}
}| Field | Type | Description |
|---|---|---|
object | string | Always "list". |
model | string | The model used to generate the embedding. |
data | array | List of embeddings generated. |
usage | object | Token usage details. |
2. List Models ​
GET /v1/models
Description ​
Lists all available models and their metadata.
Response ​
json
{
"object": "list",
"data": [
{
"id": "nvidia/llama-nemotron-embed-1b-v2",
"object": "model",
"created": 1672531200,
"owned_by": "SwissAI"
}
]
}| Field | Type | Description |
|---|---|---|
id | string | Model identifier. |
object | string | Always "model". |
created | integer | Unix timestamp of model creation. |
owned_by | string | Organization owning the model. |
Example Code Snippets ​
Note:
The production URL for this API is available in the corresponding plan for this model in the Digital Marketplace. To retrieve the URL:
- Navigate to the Digital Marketplace.
- Go to the Documentation section.
- Select the plan associated with the
Llama Nemotron Embedding 1B v2model.- Locate the production URL provided in the plan details.
- Set up the environment variable
API_URLto the production URL retrieved.
1. Using curl ​
Create Embedding ​
bash
curl -X POST $API_URL/v1/embeddings \
-H "Authorization: Bearer $YOUR_API_KEY" \
-H "Content-Type: application/json" \
-H ""
-d '{
"input": "The quick brown fox jumped over the lazy dog",
"model": "nvidia/llama-nemotron-embed-1b-v2",
"encoding_format": "float",
"dimensions": 512,
"input_type": "query"
}'List Models ​
bash
curl -X GET $API_URL/v1/models \
-H "Authorization: Bearer $YOUR_API_KEY"2. Using Python (OpenAI Client) ​
Create Embedding ​
python
import os
import openai
client = openai.OpenAI(
api_key=os.getenv("YOUR_API_KEY"),
base_url=os.getenv("API_URL") + "/v1",
)
response = client.embeddings.create(
input="The quick brown fox jumped over the lazy dog",
model="nvidia/llama-nemotron-embed-1b-v2",
encoding_format="float",
dimensions=512,
user="user-1234"
)
print(response)List Models ​
python
import os
import openai
client = openai.OpenAI(
api_key=os.getenv("YOUR_API_KEY"),
base_url=os.getenv("API_URL") + "/v1",
)
response = client.models.list()
print(response)Replace YOUR_API_KEY with your actual API key to authenticate the requests. You can follow the procedure in Inference Endpoints Overview

