Instructions to use nvidia/Nemotron-3.5-Rerank-8B-NVFP4 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use nvidia/Nemotron-3.5-Rerank-8B-NVFP4 with Transformers:
# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForSequenceClassification processor = AutoProcessor.from_pretrained("nvidia/Nemotron-3.5-Rerank-8B-NVFP4") model = AutoModelForSequenceClassification.from_pretrained("nvidia/Nemotron-3.5-Rerank-8B-NVFP4", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Model Overview
Description:
Nemotron-3.5-Rerank-8B-NVFP4 is the quantized version of the Nemotron-3.5-Rerank-8B-BF16 model, developed by NVIDIA for multilingual and multimodal question-answering retrieval. It is a world-class reranker optimized to produce a logit representing the relevance of a document to a text query. Documents may contain text, page images, or both, including charts, tables, and infographics. The model can be integrated into classical or agentic vision RAG pipelines. For text retrieval, the model was evaluated across 34 languages: English, Arabic, Assamese, Bengali, Bulgarian, Chinese, Danish, Dutch, Finnish, French, German, Hindi, Hinglish, Indonesian, Italian, Japanese, Korean, Malay, Marathi, Nepali, Norwegian, Persian, Portuguese, Romanian, Russian, Spanish, Swahili, Swedish, Tamil, Telugu, Thai, Ukrainian, Urdu, and Vietnamese. For image retrieval, it was evaluated across 18 languages: Arabic, Bengali, Chinese, English, Persian, Finnish, French, German, Hindi, Indonesian, Japanese, Korean, Russian, Spanish, Swahili, Telugu, Thai, and Yoruba. The model may support additional languages beyond these evaluation sets.
This model is ready for commercial or non-commercial use.
License/Terms of Use:
Governing Download Terms: Use of the model is governed by the OpenMDW License Agreement, version 1.1 (OpenMDW-1.1).
Additional Information: The Ministral-3-8B-Instruct-2512-BF16 base model is governed by the Apache License, Version 2.0.
Deployment Geography:
Global
Use Case:
The reranking model serves as a key component of a multimodal retrieval system, such as a vision RAG pipeline, where it helps improve overall retrieval accuracy. A multimodal retrieval system typically uses a multimodal embedding model (dense retrieval) to return a set of potentially relevant documents given an input query. The reranking model then evaluates these candidate documents in greater detail and reorders them based on their relevance to the query, producing a final ranking. By refining the initial retrieval results, the reranking stage can improve the precision of the retrieved documents and ultimately lead to more accurate downstream responses.
Release Date:
Hugging Face on 11/30/2026 via https://huggingface.co/nvidia/Nemotron-3.5-Rerank-8B-NVFP4
Model Architecture:
Architecture Type: Transformer
Network Architecture: The released model contains a Pixtral-based vision encoder, a bidirectional Ministral3 language-model tower, and a linear scoring head.
Number of Model Parameters: 8.38B
The Nemotron-3.5-Rerank-8B-NVFP4 is the quantized version of the Nemotron-3.5-Rerank-8B-BF16. For distribution, the NVFP4 checkpoint was converted to the compressed-tensors format. NVFP4 quantization is applied to the weights and activations of linear layers only in both the language model and the vision encoder, targeting the NVFP4 data type for efficient inference.
Input:
Input Type(s): Text, Image
Input Format(s): Text: String; Image: Red, Green, Blue (RGB)
Input Parameters: Text: One-Dimensional (1D), Image: Two-Dimensional (2D)
Other Properties Related to Input: Each input is one text query paired with one document. The document may be an image, text, or a combination of image and text. The default image longest_edge is 1,120 pixels and can be increased to 1,540. The maximum context length is 32,768 tokens.
Output:
Output Type(s): Floats
Output Format: List of Floats
Output Parameters: One-Dimensional (1D)
Other Properties Related to Output: Each output value corresponds to a raw logit. The higher the value, the more relevant a document is to a given query.
Our AI models are designed and/or optimized to run on NVIDIA GPU-accelerated systems. By leveraging NVIDIA's hardware (e.g. GPU cores) and software frameworks (e.g., CUDA libraries), the model achieves faster training and inference times compared to CPU-only solutions.
vLLM Usage
This NVFP4 checkpoint is intended for vLLM. This checkpoint requires hardware with NVFP4 support, such as NVIDIA Blackwell GPUs. The examples below show offline Python use and online serving. Use nvidia/Nemotron-3.5-Rerank-8B-BF16 if you need Transformers or Sentence Transformers.
Dependencies
Create a separate Python environment for vLLM. Set MODEL_PATH to the Hugging Face model ID or a local checkpoint directory:
uv venv --python 3.12 .venv-vllm
source .venv-vllm/bin/activate
uv pip install "vllm==0.34.0" "transformers==5.19.0" pillow httpx
export MODEL_PATH="nvidia/Nemotron-3.5-Rerank-8B-NVFP4"
This checkpoint requires Transformers 5.17.0 or later for its Pixtral rotary embedding configuration. These examples use vLLM 0.34.0, which requires transformers>=5.16.1,<5.23.0. Image preprocessing uses the checkpoint's configured longest-edge limit of 1,120 pixels. The 32,768-token context includes both text and image tokens.
The offline and HTTP examples were tested using the Python setup above on an NVIDIA RTX PRO 6000 Blackwell Server Edition GPU (96 GB).
For container-based installation, refer to the vLLM Docker setup guide or the NVIDIA vLLM container on NGC. Check the selected image tag's release notes for its vLLM and Transformers versions and GPU support.
vLLM reads the checkpoint's compressed-tensors NVFP4 quantization configuration automatically; no --quantization override is needed. dtype="bfloat16" (or --dtype bfloat16) sets the dtype for unquantized operations. It does not convert the packed NVFP4 weights to BF16.
Offline Python
Each input scores one query against one document. Pass the query text with the query role and the document text and/or image placeholder with the document role to the model's chat template. The template renders the prompt and inserts the image placeholder. Pass the image pixels separately through multi_modal_data:
import os
from transformers.image_utils import load_image
from vllm import LLM
MODEL_PATH = os.environ["MODEL_PATH"]
DOCUMENT_NAMES = ["nemo_image_text", "nemo_text", "nemo_image", "biology_text"]
IMAGE_URL = "https://docs.nvidia.com/nemo-framework/user-guide/24.07/_images/nemo-llm-mm-stack.png"
MAX_MODEL_LEN = 32768
def make_input(tokenizer, query, document):
text = document["text"]
image = document["image"]
content = []
if text is not None:
content.append({"type": "text", "text": text})
if image is not None:
content.append({"type": "image"})
messages = [
{
"role": "query",
"content": [{"type": "text", "text": query}],
},
{
"role": "document",
"content": content,
},
]
# The template emits the image placeholder and escapes literal
# control-token strings in user text.
prompt = tokenizer.apply_chat_template(
messages,
tokenize=False,
add_generation_prompt=False,
)
request = {"prompt": prompt}
if image is not None:
request["multi_modal_data"] = {"image": image}
return request
def main() -> None:
model = LLM(
model=MODEL_PATH,
compilation_config={"compile_mm_encoder": True},
runner="pooling",
dtype="bfloat16",
limit_mm_per_prompt={"image": 1},
max_model_len=MAX_MODEL_LEN,
pooler_config={
"seq_pooling_type": "MEAN",
"use_activation": False,
},
)
tokenizer = model.get_tokenizer()
query = "What is NVIDIA NeMo Framework?"
image = load_image(IMAGE_URL).convert("RGB")
nemo_text = "NeMo Framework offers comprehensive functionalities for developing both LLMs and Multimodal Models."
biology_text = "A biological foundation model designed to analyze and generate DNA, RNA, and protein sequences."
documents = [
{"text": nemo_text, "image": image},
{"text": nemo_text, "image": None},
{"text": None, "image": image},
{"text": biology_text, "image": None},
]
inputs = [make_input(tokenizer, query, document) for document in documents]
outputs = model.encode(
inputs,
pooling_task="classify",
tokenization_kwargs={"add_special_tokens": False},
)
scores = [(name, output.outputs.data.item()) for name, output in zip(DOCUMENT_NAMES, outputs)]
scores.sort(key=lambda item: item[1], reverse=True)
for rank, (name, score) in enumerate(scores, start=1):
print(f"Rank {rank}: document={name}, score={score:.4f}")
if __name__ == "__main__":
main()
The template renders the checkpoint's query/document format without BOS/EOS tokens. add_special_tokens=False preserves that format, matching the HTTP client below.
Example output from the tested native NVFP4 configuration (higher scores indicate greater predicted relevance):
Rank 1: document=nemo_image_text, score=-1.7912
Rank 2: document=nemo_image, score=-1.8557
Rank 3: document=nemo_text, score=-2.1474
Rank 4: document=biology_text, score=-2.8633
NVFP4 scores can differ from BF16 scores and can vary with hardware, batching, and runtime. Validate ranking quality on representative data before replacing the BF16 checkpoint.
Online Serving
Use the same environment and MODEL_PATH from the dependencies section. Start a local HTTP server with the checkpoint's chat template and structured content blocks:
python - <<'PYTHON'
import os
from pathlib import Path
from transformers import AutoTokenizer
tokenizer = AutoTokenizer.from_pretrained(os.environ["MODEL_PATH"])
Path("reranker_chat_template.jinja").write_text(tokenizer.get_chat_template())
PYTHON
export VLLM_CACHE_ROOT="${VLLM_CACHE_ROOT:-$HOME/.cache/vllm}"
mkdir -p "$VLLM_CACHE_ROOT"
vllm serve "$MODEL_PATH" \
--served-model-name "nvidia/Nemotron-3.5-Rerank-8B-NVFP4" \
--runner pooling \
--dtype bfloat16 \
--max-model-len 32768 \
--compilation-config '{"compile_mm_encoder":true}' \
--limit-mm-per-prompt '{"image":1}' \
--pooler-config '{"seq_pooling_type":"MEAN","use_activation":false}' \
--chat-template reranker_chat_template.jinja \
--chat-template-content-format openai \
--host 127.0.0.1 \
--port 8000
For HTTP serving in a container, use --host 0.0.0.0 inside the container and publish port 8000 to host loopback, for example with Docker's -p 127.0.0.1:8000:8000.
To increase the image longest-edge limit to 1,540 pixels, add --mm-processor-kwargs '{"size":{"longest_edge":1540}}' when starting the server. The example outputs use the default 1,120-pixel limit.
Keep VLLM_CACHE_ROOT on persistent storage to reuse compatible vLLM compilation artifacts across restarts. FlashInfer stores its compiled kernels and autotuning cache separately in ~/.cache/flashinfer by default. Persist that directory as well, including in container deployments. If you set FLASHINFER_WORKSPACE_BASE, the FlashInfer cache is under $FLASHINFER_WORKSPACE_BASE/.cache/flashinfer.
The first startup and first image request can take several minutes while FlashInfer builds kernels and tunes FP4 GEMMs and vLLM compiles the image encoder. Wait for the server to report that startup is complete before running the client.
After the server is ready, open another terminal in the same directory and activate the vLLM environment:
source .venv-vllm/bin/activate
Run the following Python client to send one query/document pair per request to /classify. The async client sends up to four requests concurrently and ranks the collected scores. The example covers text-only, image-only, and combined image-text documents. Each document can contain at most one image. The server preprocesses images using the checkpoint’s configured longest-edge limit of 1,120 pixels.
import asyncio
import httpx
MODEL_ID = "nvidia/Nemotron-3.5-Rerank-8B-NVFP4"
ENDPOINT = "http://127.0.0.1:8000/classify"
MAX_CONCURRENCY = 4
query = "What is NVIDIA NeMo Framework?"
image_url = "https://docs.nvidia.com/nemo-framework/user-guide/24.07/_images/nemo-llm-mm-stack.png"
nemo_text = "NeMo Framework offers comprehensive functionalities for developing both LLMs and Multimodal Models."
biology_text = "A biological foundation model designed to analyze and generate DNA, RNA, and protein sequences."
image_block = {"type": "image_url", "image_url": {"url": image_url}}
documents = [
("nemo_image_text", [{"type": "text", "text": nemo_text}, image_block]),
("nemo_text", [{"type": "text", "text": nemo_text}]),
("nemo_image", [image_block]),
("biology_text", [{"type": "text", "text": biology_text}]),
]
async def main() -> None:
semaphore = asyncio.Semaphore(MAX_CONCURRENCY)
async with httpx.AsyncClient(timeout=120.0) as client:
async def score_document(name, content):
payload = {
"model": MODEL_ID,
"messages": [
{"role": "query", "content": [{"type": "text", "text": query}]},
{"role": "document", "content": content},
],
"add_special_tokens": False,
"use_activation": False,
}
async with semaphore:
response = await client.post(ENDPOINT, json=payload)
response.raise_for_status()
result = response.json()
return name, result["data"][0]["probs"][0]
scores = await asyncio.gather(*(score_document(name, content) for name, content in documents))
for name, score in sorted(scores, key=lambda item: item[1], reverse=True):
print(f"{name}: {score:.4f}")
if __name__ == "__main__":
asyncio.run(main())
Example output from the tested native NVFP4 HTTP server (higher scores indicate greater predicted relevance):
nemo_image_text: -1.8049
nemo_image: -1.8506
nemo_text: -2.1474
biology_text: -2.8709
Scores can vary with hardware, batching, and runtime.
With use_activation=False, probs[0] contains the raw relevance logit, not a probability. Higher scores indicate greater predicted relevance. add_special_tokens=False avoids adding tokens beyond those rendered by the checkpoint's template.
Use /classify with the structured query and document messages shown above for multimodal inputs. In vLLM 0.34.0, the /score and /rerank request-rendering paths can mishandle this checkpoint's image placeholders. Image URLs must be accessible to the server; base64-encoded image data URLs can also be supplied in image_url.url.
Software Integration:
Runtime Engine(s):
- vLLM
Supported Hardware Microarchitecture Compatibility:
- NVIDIA Blackwell
Supported Operating System(s): Linux
The integration of foundation and fine-tuned models into AI systems requires additional testing using use-case-specific data to ensure safe and effective deployment. Following the V-model methodology, iterative testing and validation at both unit and system levels are essential to mitigate risks, meet technical and functional requirements, and ensure compliance with safety and ethical standards before deployment.
Model Version(s):
Nemotron-3.5-Rerank-8B-NVFP4
Training, Testing, and Evaluation Datasets:
Training Dataset:
Data Modality:
- Text
- Image
Image Training Data Size: 30k samples
Text Training Data Size: 30k samples
Data Collection Method by dataset: Hybrid: Automated, Synthetic
Labeling Method by dataset: Hybrid: Automated, Synthetic
Properties: This checkpoint is an NVFP4 post-training-quantized derivative of nvidia/Nemotron-3.5-Rerank-8B-BF16. NVFP4 quantization and Quantization-Aware Distillation (QAD) used a 30k-pair dataset of (query, passage) pairs, selected to cover typical cases and tail cases (including long contexts up to 32k tokens) and containing both images and text. Of these pairs, initial post-training quantization calibration used 384 pairs: 128 image pairs and 256 text pairs, 25% of them long. Initial QAD of the vision encoder used only the image pairs. Later joint text and image+text QAD used the full 30k-pair dataset, with about 2% held out for validation.
Nemotron-3.5-Rerank-8B-BF16's training was conducted using publicly available, commercially permissible datasets and synthetically generated datasets. For more detail about the text and image datasets used for training please refer to the Nemotron-3.5-Rerank-8B-BF16's model card.
Testing Dataset:
Data Collection Method by dataset: Not Applicable
Labeling Method by dataset: Not Applicable
Properties: Not Applicable. Model quality was assessed using the evaluation benchmark datasets described in the Evaluation Dataset subsection.
Evaluation Dataset:
Benchmark:
Benchmark Score: NDCG@10
The Nemotron-3.5-Rerank-8B-BF16 and Nemotron-3.5-Rerank-8B-NVFP4 models were evaluated with the models' default image longest_edge set to 1,120 pixels. Both models reranked the top 50 candidates retrieved by the Nemotron-3.5-Embed-8B-BF16 model.
| Model | ViDoRe V3 | ||
|---|---|---|---|
| image | text | image + text | |
| Nemotron-3.5-Embed-8B-BF16 | 60.14 | 60.51 | 61.11 |
| Nemotron-3.5-Rerank-8B-BF16 | 67.47 | 67.35 | 67.97 |
| Nemotron-3.5-Rerank-8B-NVFP4 | 67.12 | 67.17 | 67.78 |
Data Collection Method by dataset: Hybrid: Automated, Synthetic
Labeling Method by dataset: Automated, Manually-Labeled, Synthetic
Properties: ViDoRe V3 is a visual document retrieval benchmark covering 8 public and 2 private datasets across professional domains.
Inference:
Acceleration Engine: vLLM
Hardware Requirements (GPU Architecture, Model): NVIDIA GPUs based on the Blackwell architecture, such as GB200 and RTX PRO 6000 Blackwell Server Edition.
Ethical Considerations:
NVIDIA believes Trustworthy AI is a shared responsibility and we have established policies and practices to enable development for a wide array of AI applications. Developers should work with their internal model team to ensure this model meets requirements for the relevant industry and use case and addresses unforeseen product misuse.
Please make sure you have proper rights and permissions for all input image and video content; if image or video includes people, personal health information, or intellectual property, the image or video generated will not blur or maintain proportions of image subjects included.
For more detailed information on ethical considerations for this model, please see the Model Card++ Explainability, Bias, Safety & Security, and Privacy Subcards.
Please report model quality, risk, security vulnerabilities or NVIDIA AI Concerns here.
Bias
| Field | Response |
|---|---|
| Participation considerations from adversely impacted groups protected classes in model design and testing: | None |
| Measures taken to mitigate against unwanted bias: | None |
| Bias Metric (If Measured): | Not Applicable |
Explainability
| Field | Response |
|---|---|
| Intended Task/Domain: | Passage or document ranking for question and answer retrieval. |
| Model Type: | Transformer cross-encoder. |
| Intended Users: | Generative AI developers working with conversational AI models. This is suitable for users building question-answering applications over large multimodal corpora and aiming to improve retrieval performance by reranking a set of candidate documents for a given question. The corpus may include visually rich document images (e.g., pages with text, figures, tables, charts, or infographics) and/or text extracted from documents. |
| Output: | List of Floats (Score/Logit indicating if a passage/document is relevant to a question). |
| Describe how the model works: | The model outputs a relevance score (logit) reflecting how strongly it predicts that the passage or document contains the information required to answer the question. |
| List the groups (or group characteristics) for which this was tested to produce comparable outcomes: | Not Applicable |
| Technical Limitations & Mitigation: | The model’s max sequence length is 32768 tokens. If the combined text-and-image sequence exceeds that limit, truncate the text or reduce the image resolution until it fits. |
| Verified to have met prescribed NVIDIA quality standards: | Yes |
| Performance Metrics: | Accuracy, Latency, Throughput |
| Potential Known Risks: | This model does not always guarantee to provide a meaningful ranking of document(s) for a given query. |
| Licensing: | Use of the model is governed by the OpenMDW License Agreement, version 1.1 (OpenMDW-1.1). Additional Information: The Ministral-3-8B-Instruct-2512-BF16 base model is governed by the Apache License, Version 2.0. |
Privacy
The datasets used to train this model were reviewed before release. Please review NVIDIA’s Privacy Policy (https://www.nvidia.com/en-us/about-nvidia/privacy-policy/) for more information.
Safety
| Field | Response |
|---|---|
| Model Application Field(s): | Document reranking for retrieval. User queries are text. Documents can be text or page images (including pages with charts, tables, and infographics). |
| Describe the life critical impact (if present). | Not Applicable |
| Use Case Restrictions: | Use of the model is governed by the OpenMDW License Agreement, version 1.1 (OpenMDW-1.1). Additional Information: The Ministral-3-8B-Instruct-2512-BF16 base model is governed by the Apache License, Version 2.0. |
| Model and dataset restrictions: | The Principle of least privilege (PoLP) is applied limiting access for dataset generation and model development. Restrictions enforce dataset access during training, and dataset license constraints adhered to. |
- Downloads last month
- 241
Model tree for nvidia/Nemotron-3.5-Rerank-8B-NVFP4
Base model
mistralai/Ministral-3-8B-Base-2512
# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForSequenceClassification processor = AutoProcessor.from_pretrained("nvidia/Nemotron-3.5-Rerank-8B-NVFP4") model = AutoModelForSequenceClassification.from_pretrained("nvidia/Nemotron-3.5-Rerank-8B-NVFP4", device_map="auto")