Skip to content

Add rerank#1565

Merged
jperez999 merged 19 commits intoNVIDIA:mainfrom
jperez999:add-rerank
Mar 11, 2026
Merged

Add rerank#1565
jperez999 merged 19 commits intoNVIDIA:mainfrom
jperez999:add-rerank

Conversation

@jperez999
Copy link
Collaborator

Description

Adds reranker to be used in batch example. Also fixed recall to work with the retriever object to get queries.

Checklist

  • I am familiar with the Contributing Guidelines.
  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.
  • If adjusting docker-compose.yaml environment variables have you ensured those are mimicked in the Helm values.yaml file.

@jperez999 jperez999 self-assigned this Mar 11, 2026
@jperez999 jperez999 requested a review from a team as a code owner March 11, 2026 14:12
@jperez999 jperez999 requested a review from ChrisJar March 11, 2026 14:12
local_hf_cache_dir: Optional[Path] = None
local_hf_batch_size: int = 64
# Reranking -----------------------------------------------------------
reranker: Optional[str] = "nvidia/llama-nemotron-rerank-1b-v2"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The default here is the model name, which means any code that creates a Retriever() without explicitly setting reranker will download and load the 1B model. The docstring on line 58 says "Set to None to skip reranking (default)"

should this default to None instead so reranking is opt-in?

The batch_pipeline.py handles this correctly with the --reranker bool flag

this is just about the dataclass default for direct Retriever() callers.

@jperez999 jperez999 merged commit 885978a into NVIDIA:main Mar 11, 2026
8 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants