Contrastive Learning for Retrieval: InfoNCE & DPR Guide › Key Parameters
Michael BrenndoerferJanuary 23, 20261 min read
Language AI HandbookAll chapters Part 44 of 67Retrieval-Augmented Generation
Contrastive Learning for Retrieval: InfoNCE & DPR Guide › Key ParametersOne section · Sections in this chapter8 / 12 ↓
Sections in this chapter12
Reading tools Definitions & inline links
Choose your expertise level to adjust how many terms are explained. Beginners see more tooltips, experts see fewer to maintain reading flow. Hover over underlined terms for instant definitions.
Article links
Make inline references clickable
The key parameters for Dense Passage Retrieval training are:
- temperature: Scales the similarity scores before softmax. DPR uses 1.0 (no scaling).
- batch_size: Number of queries per batch. Critical for in-batch negatives; larger batches (e.g., 128) improve performance.
- learning_rate: Step size for the optimizer. Common values are around .
- weight_decay: Regularization parameter to prevent overfitting.
- max_length: Maximum token sequence length. Queries and passages often have different limits (e.g., 32 and 128).