Views
No views yet
| Model | #Total Params | Context Length | Download | BRIGHT |
|---|---|---|---|---|
| DIVER-Retriever-4B | 4B | 40K | [🤗 HuggingFace]https://huggingface.co/AQ-MedAI/Diver-Retriever-4B [🤖 ModelScope]https://www.modelscope.cn/models/AQ-MedAI/Diver-Retriever-4B | 28.9 |
| DIVER-Retriever-1.7B | 1.7B | 40K | [🤗 HuggingFace]https://huggingface.co/AQ-MedAI/Diver-Retriever-1.7B [🤖 ModelScope]https://www.modelscope.cn/models/AQ-MedAI/Diver-Retriever-1.7B | 27.3 |
| DIVER-Retriever-0.6B | 0.6B | 32K | [🤗 HuggingFace]https://huggingface.co/AQ-MedAI/Diver-Retriever-0.6B [🤖 ModelScope]https://www.modelscope.cn/models/AQ-MedAI/Diver-Retriever-0.6B | 25.2 |
| Method | Avg. | Bio. | Earth. | Econ. | Psy. | Rob. | Stack. | Sus. | Leet. | Pony | AoPS | TheoQ. | TheoT. |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Evaluate Retriever with Original Query | |||||||||||||
| BM25 | 14.5 | 18.9 | 27.2 | 14.9 | 12.5 | 13.6 | 18.4 | 15.0 | 24.4 | 7.9 | 6.2 | 10.4 | 4.9 |
| SBERT | 14.9 | 15.1 | 20.4 | 16.6 | 22.7 | 8.2 | 11.0 | 15.3 | 26.4 | 7.0 | 5.3 | 20.0 | 10.8 |
| gte-Qwen1.5-7B | 22.5 | 30.6 | 36.4 | 17.8 | 24.6 | 13.2 | 22.2 | 14.8 | 25.5 | 9.9 | 14.4 | 27.8 | 32.9 |
| Qwen3-4B | 5.6 | 3.5 | 8.0 | 2.3 | 2.0 | 1.6 | 1.0 | 4.4 | 2.1 | 0.1 | 4.9 | 18.0 | 19.2 |
| OpenAI | 17.9 | 23.3 | 26.7 | 19.5 | 27.6 | 12.8 | 14.3 | 20.5 | 23.6 | 2.4 | 8.5 | 23.5 | 11.7 |
| 20.0 | 22.7 | 34.8 | 19.6 | 27.8 | 15.7 | 20.1 | 17.1 | 29.6 | 3.6 | 9.3 | 23.8 | 15.9 | |
| ReasonIR-8B | 24.4 | 26.2 | 31.4 | 23.3 | 30.0 | 18.0 | 23.9 | 20.5 | 35.0 | 10.5 | 14.7 | 31.9 | 27.2 |
| RaDeR-7B | 25.5 | 34.6 | 38.9 | 22.1 | 33.0 | 14.8 | 22.5 | 23.7 | 37.3 | 5.0 | 10.2 | 28.4 | 35.1 |
| Seed1.5-Embedding | 27.2 | 34.8 | 46.9 | 23.4 | 31.6 | 19.1 | 25.4 | 21.0 | 43.2 | 4.9 | 12.2 | 33.3 | 30.5 |
| DIVER-Retriever | 28.9 | 41.8 | 43.7 | 21.7 | 35.3 | 21.0 | 21.2 | 25.1 | 37.6 | 13.2 | 10.7 | 38.4 | 37.3 |
| Evaluate Retriever with GPT-4 REASON-query | |||||||||||||
| BM25 | 27.0 | 53.6 | 54.1 | 24.3 | 38.7 | 18.9 | 27.7 | 26.3 | 19.3 | 17.6 | 3.9 | 19.2 | 20.8 |
| SBERT | 17.8 | 18.5 | 26.3 | 17.5 | 27.2 | 8.8 | 11.8 | 17.5 | 24.3 | 10.3 | 5.0 | 22.3 | 23.5 |
| gte-Qwen1.5-7B | 24.8 | 35.5 | 43.1 | 24.3 | 34.3 | 15.4 | 22.9 | 23.9 | 25.4 | 5.2 | 4.6 | 28.7 | 34.6 |
| Qwen3-4B | 5.5 | 1.3 | 17.3 | 2.5 | 6.2 | 1.0 | 4.8 | 4.5 | 3.0 | 5.9 | 0.0 | 7.2 | 12.5 |
| OpenAI | 23.3 | 35.2 | 40.1 | 25.1 | 38.0 | 13.6 | 18.2 | 24.2 | 24.5 | 6.5 | 7.7 | 22.9 | 23.8 |
| 26.2 | 36.4 | 45.6 | 25.6 | 38.2 | 18.7 | 29.5 | 17.9 | 31.1 | 3.7 | 10.0 | 27.8 | 30.4 | |
| ReasonIR-8B | 29.9 | 43.6 | 42.9 | 32.7 | 38.8 | 20.9 | 25.8 | 27.5 | 31.5 | 19.6 | 7.4 | 33.1 | 35.7 |
| RaDeR-7B | 29.2 | 36.1 | 42.9 | 25.2 | 37.9 | 16.6 | 27.4 | 25.0 | 34.8 | 11.9 | 12.0 | 37.7 | 43.4 |
| DIVER-Retriever | 32.1 | 51.9 | 53.5 | 29.5 | 41.2 | 21.4 | 27.5 | 26.1 | 33.5 | 11.7 | 9.5 | 39.3 | 39.7 |
| Evaluate retriever with DIVER-QExpand query | |||||||||||||
| ReasonIR-8B | 32.6 | 49.4 | 44.7 | 32.4 | 44.0 | 26.6 | 31.8 | 29.0 | 32.3 | 12.8 | 9.1 | 40.7 | 38.4 |
| +BM25 (Hybrid) | 35.7 | 56.8 | 53.5 | 33.0 | 48.5 | 29.4 | 34.2 | 32.0 | 35.2 | 16.8 | 12.9 | 39.3 | 36.8 |
| DIVER-Retriever | 33.9 | 54.5 | 52.7 | 28.8 | 44.9 | 25.1 | 27.4 | 29.5 | 34.5 | 10.0 | 14.5 | 40.7 | 44.7 |
| +BM25 (Hybrid) | 37.2 | 60.0 | 55.9 | 31.8 | 47.9 | 27.1 | 33.9 | 31.9 | 35.1 | 23.1 | 16.8 | 36.9 | 46.6 |
1# Requires transformers>=4.51.0
2# Requires sentence-transformers>=2.7.0
3
4
5from sentence_transformers import SentenceTransformer
6
7# Load the model
8model = SentenceTransformer("AQ-MedAI/Diver-Retriever-4B")
9
10
11# The queries and documents to embed
12queries = [
13 "What is the capital of China?",
14 "Explain gravity",
15]
16documents = [
17 "The capital of China is Beijing.",
18 "Gravity is a force that attracts two bodies towards each other. It gives weight to physical objects and is responsible for the movement of planets around the sun.",
19]
20
21# Encode the queries and documents. Note that queries benefit from using a prompt
22# Here we use the prompt called "query" stored under `model.prompts`, but you can
23# also pass your own prompt via the `prompt` argument
24query_embeddings = model.encode(queries, prompt_name="query")
25document_embeddings = model.encode(documents)
26
27# Compute the (cosine) similarity between the query and document embeddings
28similarity = model.similarity(query_embeddings, document_embeddings)
29print(similarity)
301# Requires transformers>=4.51.0
2import torch
3import torch.nn.functional as F
4
5from torch import Tensor
6from transformers import AutoTokenizer, AutoModel
7
8
9def last_token_pool(last_hidden_states: Tensor,
10 attention_mask: Tensor) -> Tensor:
11 left_padding = (attention_mask[:, -1].sum() == attention_mask.shape[0])
12 if left_padding:
13 return last_hidden_states[:, -1]
14 else:
15 sequence_lengths = attention_mask.sum(dim=1) - 1
16 batch_size = last_hidden_states.shape[0]
17 return last_hidden_states[torch.arange(batch_size, device=last_hidden_states.device), sequence_lengths]
18
19
20def get_detailed_instruct(task_description: str, query: str) -> str:
21 return f'Instruct: {task_description}\nQuery:{query}'
22
23# Each query must come with a one-sentence instruction that describes the task
24task = 'Given a web search query, retrieve relevant passages that answer the query'
25
26queries = [
27 get_detailed_instruct(task, 'What is the capital of China?'),
28 get_detailed_instruct(task, 'Explain gravity')
29]
30# No need to add instructions for retrieval documents
31documents = [
32 "The capital of China is Beijing.",
33 "Gravity is a force that attracts two bodies towards each other. It gives weight to physical objects and is responsible for the movement of planets around the sun."
34]
35input_texts = queries + documents
36
37tokenizer = AutoTokenizer.from_pretrained('AQ-MedAI/Diver-Retriever-4B', padding_side='left')
38model = AutoModel.from_pretrained('AQ-MedAI/Diver-Retriever-4B')
39
40
41max_length = 8192
42
43# Tokenize the input texts
44batch_dict = tokenizer(
45 input_texts,
46 padding=True,
47 truncation=True,
48 max_length=max_length,
49 return_tensors="pt",
50)
51batch_dict.to(model.device)
52outputs = model(**batch_dict)
53embeddings = last_token_pool(outputs.last_hidden_state, batch_dict['attention_mask'])
54
55# normalize embeddings
56embeddings = F.normalize(embeddings, p=2, dim=1)
57scores = (embeddings[:2] @ embeddings[2:].T)
58print(scores.tolist())
59# [[0.9319270849227905, 0.5878604054450989], [0.639923095703125, 0.7950234413146973]]
601pip install ms-swift -U
2# Install from source
3pip install git+https://github.com/modelscope/ms-swift.git
4
5pip install transformers -U
6
7# Optional packages
8pip install deepspeed # multi-GPU training
9pip install liger-kernel # save GPU memory resources
10pip install flash-attn --no-build-isolation1nproc_per_node=8
2NPROC_PER_NODE=$nproc_per_node \
3swift sft \
4 --model DIVER/DIVER-Retriever-4B \
5 --task_type embedding \
6 --model_type qwen3_emb \
7 --train_type full \
8 --dataset your_dataset \
9 --split_dataset_ratio 0.05 \
10 --eval_strategy steps \
11 --output_dir output \
12 --eval_steps 20 \
13 --num_train_epochs 5 \
14 --save_steps 20 \
15 --per_device_train_batch_size 4 \
16 --per_device_eval_batch_size 4 \
17 --gradient_accumulation_steps 4 \
18 --learning_rate 6e-6 \
19 --loss_type infonce \
20 --label_names labels \
21 --dataloader_drop_last true \
22 --deepspeed zero3@misc{long2025divermultistageapproachreasoningintensive,
title={DIVER: A Multi-Stage Approach for Reasoning-intensive Information Retrieval},
author={Meixiu Long and Duolin Sun and Dan Yang and Junjie Wang and Yue Shen and Jian Wang and Peng Wei and Jinjie Gu and Jiahai Wang},
year={2025},
eprint={2508.07995},
archivePrefix={arXiv},
primaryClass={cs.IR},
url={https://arxiv.org/abs/2508.07995},
}