Qwen3-Reranker-0.6B-IHL

👋 Join our LiGHT community.

[mmore] [4B version]
License: Apache 2.0 | Authors: LiGHT

Qwen3-Reranker-0.6B-IHL is a small reranker for retrieval over international humanitarian law (IHL) documents: treaties, ICRC commentaries, the customary IHL rules, ICRC positions and travaux préparatoires. It is Qwen3-Reranker-0.6B fine-tuned on question–passage pairs from these documents. It is meant to sit after a first-stage retriever in a retrieval-augmented question-answering pipeline such as mmore, when a 4B reranker is too slow or too large. The best results come from Qwen3-Reranker-4B-IHL.

  • Large gain over its base model: Hit@5 0.360 against 0.227 on 11,059 IHL benchmark questions (95% CIs 0.342–0.378 and 0.211–0.242)
  • About as good as the untuned Qwen3-Reranker-4B on IHL (Hit@5 0.360 against 0.337), at a fraction of the cost: 0.35 s against 0.86 s to score 50 passages per question on one H100
  • Drop-in for Qwen3-Reranker: same input format; use it with the instruction it was trained with (below)

Benchmark

IHL benchmark. 11,059 questions generated by an LLM from passages of seven IHL collections, each with the exact answer span from its source passage. Retrieval runs over the whole pool of 250,731 passages; a question is a hit when the passage containing the answer span is in the top 5. The reranker reorders Qwen3-Embedding-4B's top 50 ("top 50"), or the union of that top 50 and SPLADE's top 50 ("union"). Scores are macro-averaged over collections. Test: the 1,601 questions whose answer is only in documents held out of the fine-tuning data.

Real questions. 64 questions written by ICRC legal staff, never used to build the training data. Every passage any system put in its top 20 was labelled by gpt-oss-120b as answers (2), partly (1) or no (0); the score is nDCG@5.

Evaluation Qwen3-Reranker-0.6B Qwen3-Reranker-0.6B-IHL Δ Qwen3-Reranker-4B
Benchmark, all, top 50 (Hit@5) 0.227 0.360 +0.133 0.337
Benchmark, test, top 50 (Hit@5) 0.271 0.413 +0.142 0.400
Benchmark, all, union (Hit@5) 0.226 0.375 +0.149 0.360
Benchmark, test, union (Hit@5) 0.253 0.433 +0.180 0.416
Real questions (nDCG@5) 0.654 0.729 +0.075 0.743

All models use the instruction below. Inside mmore (Qwen3-Embedding-4B + SPLADE, reciprocal rank fusion, 50 candidates, k = 5), its real-question nDCG@5 is 0.733, against 0.744 for the untuned 4B. The real-question set is small (intervals about ±0.07) and judged by an LLM; the benchmark is the main evidence.

Usage

The model scores a (question, passage) pair as the probability of "yes" after Qwen3-Reranker's prompt. Use this instruction, the one it was trained with:

Given a question on international humanitarian law, judge whether the passage helps answer it

With mmore (Qwen3-Reranker support in the retriever):

retriever:
  reranker_model_name: EPFLiGHT/Qwen3-Reranker-0.6B-IHL
  reranker_type: qwen3
  reranker_instruction: Given a question on international humanitarian law, judge whether the passage helps answer it
  reranker_max_length: 1024
  rerank_candidates: 50
  k: 5

With transformers:

import torch
from transformers import AutoModelForCausalLM, AutoTokenizer

model_id = "EPFLiGHT/Qwen3-Reranker-0.6B-IHL"
tokenizer = AutoTokenizer.from_pretrained(model_id, padding_side="left")
model = AutoModelForCausalLM.from_pretrained(model_id, torch_dtype=torch.bfloat16, device_map="auto").eval()

instruction = "Given a question on international humanitarian law, judge whether the passage helps answer it"
prefix = ("<|im_start|>system\nJudge whether the Document meets the requirements based on the Query and the "
          "Instruct provided. Note that the answer can only be \"yes\" or \"no\".<|im_end|>\n<|im_start|>user\n")
suffix = "<|im_end|>\n<|im_start|>assistant\n<think>\n\n</think>\n\n"
yes, no = tokenizer.convert_tokens_to_ids("yes"), tokenizer.convert_tokens_to_ids("no")


def score(question, passages, max_length=1024):
    pre = tokenizer.encode(prefix, add_special_tokens=False)
    suf = tokenizer.encode(suffix, add_special_tokens=False)
    room = max_length - len(pre) - len(suf)
    ids = [pre + tokenizer.encode(f"<Instruct>: {instruction}\n<Query>: {question}\n<Document>: {p}",
                                  add_special_tokens=False)[:room] + suf for p in passages]
    batch = tokenizer.pad({"input_ids": ids}, padding=True, return_tensors="pt").to(model.device)
    with torch.no_grad():
        logits = model(**batch).logits[:, -1, :]
    return torch.log_softmax(logits[:, [no, yes]].float(), dim=1)[:, 1].exp().tolist()


print(score("Can a civilian holding a weapon during hostilities be attacked?",
            ["Civilians are protected against attack unless and for such time as they take a direct part in hostilities.",
             "The Convention applies to all cases of declared war."]))

Training

  • Base model: Qwen3-Reranker-0.6B
  • Data: 116,240 question–passage pairs for 28,513 questions. The questions were generated by gpt-oss-120b from 15,080 sections of IHL documents and kept when an LLM critic rated them plausible for an ICRC user (3/5 or more). The passages of each question's source document were labelled by gpt-oss-120b as answers, partly or no; targets 1, 0.5 and 0. Documents of the benchmark's test split were kept out. The data is not released.
  • Objective: binary cross-entropy on the model's yes-minus-no logit, same prompt and 1,024-token limit as at inference
  • Recipe: full fine-tuning, 1 epoch (1,816 steps), learning rate 1e-5 with 5% warmup, batch 64 pairs, AdamW, fp32 weights with bf16 autocast
  • Checkpoint: chosen by reranked Hit@5 on 500 benchmark questions outside the test split (step 1,200)

Compute

One NVIDIA H100 on EPFL's RCP cluster, about 1 hour.

Limitations & intended use

The model ranks passages; it does not answer questions, and a high score does not mean a passage is legally correct or current. It was trained and evaluated on English questions over IHL documents and is not tested on other domains. Its training labels come from an LLM judge, and part of the evaluation uses the same judge, so it may share that judge's preferences; the benchmark, scored by exact answer spans, does not depend on it. It is intended as a component of research and assistance tools: the answers built on what it retrieves should be checked against the sources.

Downloads last month
-
Safetensors
Model size
0.8B params
Tensor type
BF16
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for EPFLiGHT/Qwen3-Reranker-0.6B-IHL

Finetuned
(40)
this model