[Image blocked: Reranking: the second stage that puts the best text and image candidates on top]
📝 Blog post
LightOn-rerank-PW-4B
Unified Text + Visual Document Reranker by LightOn
PW-0.8B |
LW-0.8B |
PW-2B |
LW-2B |
PW-4B |
LW-4B
About the LightOn-rerank family
Production retrieval pipelines usually need two rerankers: one for text passages and one for visual documents (PDF pages, slides, scans). LightOn-rerank models are unified cross-encoder rerankers: a single model scores both text passages and document page images against a query, on top of any first-stage retriever (BM25, dense embeddings, or ColPali-family late-interaction models).
The models are built on Qwen3.5 backbone (hybrid linear + full attention) and jointly fine-tuned on text and visual reranking data with mixed-modality batches (LoRA, merged into the released weights). Training data is English-only; French performance transfers zero-shot from the multilingual backbone.
The family comes in two scoring flavours × three sizes (0.8B / 2B / 4B):
- PW (pointwise): each candidate is scored independently. The model judges whether the document answers the query, and the score is
logit("Yes") − logit("No"). One forward pass per candidate and no generation.
- LW (listwise): generative listwise ranking, where 4 candidates are placed in a single prompt and the model generates a permutation (
[2] > [4] > [1] > [3]). Larger candidate pools are ranked with a sliding window (window 4, stride 2, bottom-to-top). Cross-document attention makes LW markedly stronger on hard visual reranking, and unlike pointwise scoring it keeps improving with backbone size.
LightOn-rerank-PW-4B is the 4B pointwise member of the family. On visual reranking it ties the 2B pointwise model (59.80 vs 59.87 nDCG@10 on ViDoRe V3): direct evidence that independent Yes/No scoring is a capacity bottleneck that extra parameters cannot fix. On text BEIR, however, it posts the strongest scores in the family (50.19 decontaminated mean). For 4B-budget vision-heavy deployments, LightOn-rerank-LW-4B is +4.9 nDCG@10 at the same size.
Results
ViDoRe V3 (visual document reranking, 8 domains × EN/FR queries), overall nDCG@10, ColQwen2.5-v0.2 first stage, retrieve 100 / rerank 100. All models, including baselines, were re-evaluated under this same two-stage protocol, so numbers are mutually comparable but not comparable to vendor-reported end-to-end results.
ViDoRe V3 detail (nDCG@10, ColQwen2.5 first stage, rerank-100)
Overall nDCG@10: 59.80 (EN 62.37 / FR 57.23).
BEIR results (text reranking)
13 datasets, nDCG@10, BM25 first stage, retrieve 100 / rerank 100, same protocol as all other family members. ⚠️ marks datasets in the text training mix (NQ, MSMARCO); the decontaminated mean excludes them.
This is the best text result in the LightOn-rerank family (2B pointwise: 49.13, 4B listwise: 48.33 decontaminated mean). Pointwise plateaus with scale on vision but not on text. If your workload is text-dominant and you have the 4B budget, this is the family's strongest text reranker.
Model Details
- Model type: multimodal cross-encoder reranker (pointwise: each candidate is scored independently as
logit("Yes") − logit("No"))
- Base model: Qwen/Qwen3.5-4B (Qwen3.5 hybrid linear + full attention VLM)
- Parameters: ≈4.5B (bfloat16, 9.1 GB)
- Inputs: query (text) + candidate document(s): text passage or page image
- Fine-tuning: joint text+vision LoRA (r=32, α=32, rsLoRA, merged into the released weights), mixed-modality batches (2 text + 2 vision groups per micro-batch), vision loss weight 1.3, lr 1e-4, 1 epoch (465 steps)
- Data: same 213k groups as the listwise models — 107k text groups (NQ, TriviaQA, MS MARCO; each a
[pos, neg_0, neg_1, neg_2] 4-list with hard negatives mined via the NV-Retriever approach with GTE-ModernBERT) + 106k vision groups (ColPali train set with negatives mined by Nomic). For pointwise training each group is flattened into (query, document, Yes/No) triples.
- Languages: English (training), French (zero-shot transfer)
- Requirements:
transformers >= 5.4.0 (qwen3_5 architecture); sentence-transformers >= 5.4.0 for the CrossEncoder usage
Usage: pointwise reranking
Each candidate is scored independently as logit("Yes") − logit("No") at the first generated position; sort candidates by descending score. The model was trained with a fixed system prompt and user template: use them verbatim for best results.
Using Sentence Transformers
Install Sentence Transformers (>= 5.4.0):
The trained system prompt and user templates are baked into the bundled reranker chat template — including the non-thinking generation prompt, so no enable_thinking handling is needed — and query-document pairs are formatted correctly out of the box:
To rerank page images, pass a PIL.Image (or an image URL or file path string) as the document. Text and image candidates can be mixed in the same call:
Scores are raw logit("Yes") − logit("No") differences. You can map them to 0...1 probabilities with model.predict(pairs, activation_fn=torch.nn.Sigmoid()).
Using Transformers
To score a page image instead of a text passage, replace the user message with:
and pass images=[page_image, ...] to the processor call (keep the same system prompt).
Serving with vLLM
Full-page document images can exceed 8k tokens, so keep --max-model-len at 16384 or higher when reranking page images.
Notes & limitations
- Thinking must be disabled for scoring. Qwen3.5-4B's chat template enables
<think> by default; with it on, the first generated token is a thinking token and the Yes/No logprobs are distorted. Pass enable_thinking=False to apply_chat_template (or chat_template_kwargs={"enable_thinking": False} via the vLLM OpenAI client) as shown above. The Sentence Transformers path handles this automatically: the bundled reranker chat template hardcodes the non-thinking generation prompt.
- Pointwise scoring does not benefit from the 2B→4B scale-up on vision (59.80 vs 59.87 for the 2B), while generative listwise gains +2.0 points over the same step. For vision workloads prefer LightOn-rerank-LW-4B at this size, or LightOn-rerank-PW-2B for the same visual quality at lower cost.
- Training data is English-only. French works zero-shot (the backbone is multilingual) but is slightly behind English on average.
- BEIR contamination flag: NQ and MSMARCO are part of the text training data; headline text figures use decontaminated means that exclude them.
The LightOn-rerank family
Rule of thumb: LW models are stronger at every size (and the gap grows with size); PW models are cheaper to serve and score candidates independently. For the best quality pick LW-4B; for the best quality/cost trade-off pick LW-2B; for maximum throughput on text-heavy workloads pick a PW model.
Citation