Skip to main content

Overview

Nemotron 3.5 Rerank scores how relevant a document is to a text query. Documents can contain text, an image, or both. Use it to reorder candidate documents before passing them to a retrieval-augmented generation pipeline.

Installation

Install SGLang on an NVIDIA CUDA system using the installation guide. The BF16 checkpoint has been tested on A100, H100, and B200 GPUs. Install the Python client dependency:

Start the server

Set the context length to the model card’s 32,768-token limit:
SGLang enables embedding mode and loads the checkpoint’s query/document template automatically. You do not need --is-embedding, --chat-template, or --trust-remote-code. Prefix caching and chunked prefill are disabled automatically because this model uses bidirectional attention. The examples below send requests to the server’s default address, http://127.0.0.1:30000.

Rerank text documents

The NeMo document, at index 0, should rank above the biology document. Results are sorted by descending score; index is the document’s position in your original list. Scores are raw logits, not probabilities, and can be negative.

Rerank images and combined documents

Represent an image document as a list of content parts. Include a text part alongside the image to score a combined document:
The image, combined document, and matching text should rank above the unrelated biology document. Their exact order can vary. By default, each result also includes its original document, preserving text and image content parts. Set return_documents to False to omit them. You can replace an image URL with a base64 data URL such as data:image/png;base64,.... Set top_n in the request to return only the highest-ranked documents.

Supported inputs and limits

  • Queries must contain text only.
  • Each document can contain at most one image. Multiple image documents can be ranked in the same request.
  • Videos and unsupported image inputs return HTTP 400.
  • The context limit includes the query, document, template, and image tokens.
  • ROCm serving is rejected at startup because its default AITER prefill does not provide the required bidirectional attention.
  • Pipeline parallelism is not supported by this serving path.
See reranking models for the shared reranking API and other supported models.