test0 stringlengths 5 8 | 0 int64 0 0 | doc0 stringlengths 4 9 | 1 int64 1 1 |
|---|---|---|---|
test0 | 0 | doc1 | 1 |
test1 | 0 | doc6 | 1 |
test2 | 0 | doc10 | 1 |
test3 | 0 | doc17 | 1 |
test3 | 0 | doc18 | 1 |
test4 | 0 | doc42 | 1 |
test5 | 0 | doc50 | 1 |
test6 | 0 | doc59 | 1 |
test6 | 0 | doc63 | 1 |
test7 | 0 | doc67 | 1 |
test8 | 0 | doc86 | 1 |
test9 | 0 | doc91 | 1 |
test10 | 0 | doc118 | 1 |
test11 | 0 | doc136 | 1 |
test12 | 0 | doc153 | 1 |
test13 | 0 | doc172 | 1 |
test14 | 0 | doc293 | 1 |
test15 | 0 | doc302 | 1 |
test16 | 0 | doc305 | 1 |
test17 | 0 | doc449 | 1 |
test17 | 0 | doc450 | 1 |
test18 | 0 | doc514 | 1 |
test19 | 0 | doc565 | 1 |
test19 | 0 | doc579 | 1 |
test20 | 0 | doc618 | 1 |
test21 | 0 | doc635 | 1 |
test22 | 0 | doc649 | 1 |
test23 | 0 | doc653 | 1 |
test24 | 0 | doc658 | 1 |
test25 | 0 | doc698 | 1 |
test25 | 0 | doc703 | 1 |
test26 | 0 | doc724 | 1 |
test27 | 0 | doc763 | 1 |
test28 | 0 | doc787 | 1 |
test28 | 0 | doc789 | 1 |
test29 | 0 | doc807 | 1 |
test30 | 0 | doc820 | 1 |
test30 | 0 | doc824 | 1 |
test31 | 0 | doc897 | 1 |
test32 | 0 | doc908 | 1 |
test32 | 0 | doc916 | 1 |
test33 | 0 | doc921 | 1 |
test34 | 0 | doc967 | 1 |
test35 | 0 | doc972 | 1 |
test36 | 0 | doc1010 | 1 |
test37 | 0 | doc1016 | 1 |
test38 | 0 | doc1026 | 1 |
test39 | 0 | doc1042 | 1 |
test40 | 0 | doc1070 | 1 |
test40 | 0 | doc1071 | 1 |
test41 | 0 | doc1100 | 1 |
test42 | 0 | doc1118 | 1 |
test43 | 0 | doc1154 | 1 |
test44 | 0 | doc1164 | 1 |
test45 | 0 | doc1187 | 1 |
test46 | 0 | doc1193 | 1 |
test47 | 0 | doc1215 | 1 |
test48 | 0 | doc1229 | 1 |
test48 | 0 | doc1239 | 1 |
test49 | 0 | doc1260 | 1 |
test50 | 0 | doc1404 | 1 |
test50 | 0 | doc1405 | 1 |
test50 | 0 | doc1407 | 1 |
test51 | 0 | doc1420 | 1 |
test52 | 0 | doc1432 | 1 |
test53 | 0 | doc1448 | 1 |
test54 | 0 | doc1468 | 1 |
test54 | 0 | doc1474 | 1 |
test55 | 0 | doc1486 | 1 |
test56 | 0 | doc1490 | 1 |
test56 | 0 | doc1541 | 1 |
test57 | 0 | doc1580 | 1 |
test58 | 0 | doc1599 | 1 |
test59 | 0 | doc1617 | 1 |
test60 | 0 | doc1631 | 1 |
test61 | 0 | doc1679 | 1 |
test61 | 0 | doc1684 | 1 |
test62 | 0 | doc1729 | 1 |
test63 | 0 | doc1744 | 1 |
test64 | 0 | doc1754 | 1 |
test65 | 0 | doc1771 | 1 |
test65 | 0 | doc1774 | 1 |
test65 | 0 | doc1782 | 1 |
test66 | 0 | doc1824 | 1 |
test67 | 0 | doc1927 | 1 |
test68 | 0 | doc2000 | 1 |
test69 | 0 | doc2030 | 1 |
test70 | 0 | doc2107 | 1 |
test71 | 0 | doc2127 | 1 |
test72 | 0 | doc2134 | 1 |
test73 | 0 | doc2151 | 1 |
test74 | 0 | doc2254 | 1 |
test75 | 0 | doc2262 | 1 |
test76 | 0 | doc2274 | 1 |
test77 | 0 | doc2319 | 1 |
test78 | 0 | doc2339 | 1 |
test79 | 0 | doc2368 | 1 |
test80 | 0 | doc2404 | 1 |
test81 | 0 | doc2479 | 1 |
test82 | 0 | doc2493 | 1 |
nq_qwen3_embedding_8b
Single-vector dense embeddings of BEIR nq (beir/nq), encoded with Qwen/Qwen3-Embedding-8B at revision 1d8ad4ca9b3dd8059ad90a75d4983776a23d44af. The model is trained with Matryoshka Representation Learning, so any leading prefix of a vector is itself an embedding: take v[:p] and L2-renormalize it. Exact ground truth is included at full dimension and at each prefix in {256, 384, 512, 768, 1024, 1536, 1792, 2048, 3072}.
Queries use Qwen3-Embedding's generic web-search instruction (see Encoding).
Source data: ir_datasets beir/nq (ir_datasets 0.6.3), which downloads nq.zip (md5 d4d3d2e48787a744b6f6e691ff534307). BEIR also publishes this corpus on the Hub as BeIR/nq, whose card gives this dataset's license; the data here was loaded through ir_datasets, not from that repo. Document, query and qrel ids are the source's own ids, unchanged, in ir_datasets' order.
The files use the same layout as the multi-vector exports in this namespace: every document and every query is a "set" of exactly one 4096-d vector (doclens and query_lens are all 1), so multi-vector readers work unchanged and MaxSim is the dot product. Documents are stored in fp16 and queries in fp32.
Files
| file | dtype | shape | contents |
|---|---|---|---|
documents.npy |
float16 (<f2) |
[2,681,468, 4096] |
one vector per document, in doc_ids order (20.5 GiB) |
doclens.npy |
int32 | [2,681,468] |
vectors per document: all 1 |
doc_ids.npy |
<U10 |
[2,681,468] |
original document ids |
queries.npy |
float32 (<f4) |
[3,452, 1, 4096] |
one vector per query, generic web-search prompt (see Encoding) |
query_lens.npy |
int32 | [3,452] |
vectors per query: all 1 |
queries_ids.npy |
<U8 |
[3,452] |
original query ids |
qrels.test.tsv |
text | 4,201 rows | TREC qrels, qid \t 0 \t docid \t relevance, no header |
gt_top1000.tsv |
text | 3,452,000 rows | exact full-dimension top-1000 of queries.npy, see below |
gt_top100.tsv |
text | 345,200 rows | first 100 ranks of gt_top1000.tsv, same format |
prefix_gt/gt_top100_dim{p}.tsv |
text | 345,200 rows each | exact top-100 by prefix cosine (generic queries), p in {256, 384, 512, 768, 1024, 1536, 1792, 2048, 3072} |
All positional indices (the gt_top*.tsv files, and the row order of every .npy file) refer to the order of doc_ids.npy and queries_ids.npy. Reordering either file invalidates the ground truth.
Statistics
| documents | 2,681,468 |
| queries | 3,452 |
| queries with at least one qrel | 3,452 |
| qrels rows | 4,201 |
| embedding dimension | 4096 (Matryoshka: any prefix) |
Encoding
| model | Qwen/Qwen3-Embedding-8B |
| model revision | 1d8ad4ca9b3dd8059ad90a75d4983776a23d44af |
| library | sentence-transformers 6.2.0 (transformers 5.20.2, torch 2.14.1+cu130), attention flash_attention_2 |
| compute dtype | bfloat16 (model weights loaded at this dtype) |
| document storage dtype | fp16 (normalized in fp32, then cast) |
| query storage dtype | fp32 |
| pooling | last token (the hidden state at the end-of-text token), as the model card specifies |
| normalization | L2 over the full 4096 dimensions, in fp32, before the storage cast |
| document input | title and text joined by a space (mteb's BEIR convention), no prompt |
| document truncation | 512 tokens (special tokens included). 5,731 of 2,681,468 documents (0.21%) were longer and were cut to it; the longest was 4,603 tokens |
query input (queries.npy) |
Instruct: Given a web search query, retrieve relevant passages that answer the query\nQuery: + query text (Qwen3-Embedding's generic web-search instruction) |
| query truncation | 512 tokens, prompt included; longest query 44 tokens |
Ground truth
gt_top1000.tsv, gt_top100.tsv (full dimension)
Exact brute-force top-1000 per query over the full corpus, from the vectors in this repo. gt_top100.tsv holds the first 100 ranks of the same lists.
No header; tab-separated qidx docidx rank score:
qidx: 0-based row intoqueries_ids.npy/ the query file the ground truth belongs todocidx: 0-based position intodoc_ids.npy/doclens.npyrank: 1-based, descending scorescore: dot product of the query vector and the document vector (both unit-norm, so the cosine; this is also MaxSim with one vector each), computed in fp32 with the fp16 document vectors upcast. Printed to 6 decimals.
prefix_gt/gt_top100_dim{p}.tsv (Matryoshka prefixes, generic-prompt queries)
Same format, exact top-100 per query, scored by the cosine of the first p dimensions: score = <q[:p], d[:p]> / (|q[:p]| |d[:p]|), fp32 with the fp16 documents upcast, for p in {256, 384, 512, 768, 1024, 1536, 1792, 2048, 3072}.
Retrieval quality
Sanity check of the vectors, not a leaderboard number: the ground-truth files (exact search over the full corpus) scored against qrels.test.tsv with ir_measures.
| nDCG@10 | MRR@10 | Success@5 | Recall@100 | Recall@1000 | |
|---|---|---|---|---|---|
| generic prompt | 0.6465 | 0.5952 | 0.7972 | 0.9739 | 0.9969 |
Per Matryoshka prefix (generic prompt, from prefix_gt/, top-100):
| dim | nDCG@10 | MRR@10 | Success@5 | Recall@100 |
|---|---|---|---|---|
| 256 | 0.6043 | 0.5568 | 0.7497 | 0.9563 |
| 384 | 0.6185 | 0.5708 | 0.7654 | 0.9632 |
| 512 | 0.6263 | 0.5783 | 0.7743 | 0.9643 |
| 768 | 0.6303 | 0.5796 | 0.7807 | 0.9675 |
| 1024 | 0.6357 | 0.5861 | 0.7877 | 0.9691 |
| 1536 | 0.6408 | 0.5895 | 0.7851 | 0.9732 |
| 1792 | 0.6399 | 0.5885 | 0.7900 | 0.9742 |
| 2048 | 0.6430 | 0.5929 | 0.7929 | 0.9737 |
| 3072 | 0.6440 | 0.5933 | 0.7937 | 0.9739 |
Loading
import numpy as np
documents = np.load("documents.npy", mmap_mode="r") # [n_docs, 4096] float16
queries = np.load("queries.npy")[:, 0] # [n_queries, 4096] float32
doc_ids = np.load("doc_ids.npy") # [n_docs] str
query_ids = np.load("queries_ids.npy") # [n_queries] str
def prefix(x, p): # Matryoshka: first p dims, renormalized
x = np.asarray(x[..., :p], dtype=np.float32)
return x / np.linalg.norm(x, axis=-1, keepdims=True)
scores = prefix(queries, 256) @ prefix(documents[:100_000], 256).T
Validation
Checks run by the exporter on the files exactly as written here (the shared multi-vector validator, plus checks of the extra query file and ground-truth files):
- β file set (+ prefix_gt/) β missing=[] extra=[]
- β documents.npy dtype/shape β <f2 (2681468, 4096)
- β doclens.npy dtype/shape β <i4 (2681468,)
- β doc_ids.npy is a string array β <U10 (2681468,)
- β queries.npy dtype/shape β <f4 (3452, 1, 4096)
- β query_lens.npy dtype/shape β <i4 (3452,)
- β queries_ids.npy is a string array β <U8 (3452,)
- β sum(doclens) == n_tokens β 2681468 vs 2681468
- β no empty documents β min doclen 1
- β len(doc_ids) == len(doclens) == corpus size β 2681468, 2681468, 2681468
- β doc_ids unique
- β query arrays aligned β 3452, 3452, 3452
- β doc and query dim agree β 4096 / 4096
- β document vectors unit-norm (100k sample) β norm range [0.9998, 1.0002]
- β query vectors unit-norm β norm range [1.000000, 1.000000]
- β all vectors finite
- β gt_top100.tsv has k rows per query β 345200 rows, k=100
- β gt_top100.tsv rows grouped by qidx with ranks 1..k and descending scores
- β gt_top100.tsv indices in range
- β gt_top1000.tsv has k rows per query β 3452000 rows, k=1000
- β gt_top1000.tsv rows grouped by qidx with ranks 1..k and descending scores
- β gt_top1000.tsv indices in range
- β gt_top100.tsv is the first 100 ranks of gt_top1000.tsv
- β one vector per document and per query
- β prefix_gt/gt_top100_dim1024.tsv: 100 rows per query, ranks 1..k, descending scores <= 1, indices in range β 345200 rows
- β prefix_gt/gt_top100_dim1536.tsv: 100 rows per query, ranks 1..k, descending scores <= 1, indices in range β 345200 rows
- β prefix_gt/gt_top100_dim1792.tsv: 100 rows per query, ranks 1..k, descending scores <= 1, indices in range β 345200 rows
- β prefix_gt/gt_top100_dim2048.tsv: 100 rows per query, ranks 1..k, descending scores <= 1, indices in range β 345200 rows
- β prefix_gt/gt_top100_dim256.tsv: 100 rows per query, ranks 1..k, descending scores <= 1, indices in range β 345200 rows
- β prefix_gt/gt_top100_dim3072.tsv: 100 rows per query, ranks 1..k, descending scores <= 1, indices in range β 345200 rows
- β prefix_gt/gt_top100_dim384.tsv: 100 rows per query, ranks 1..k, descending scores <= 1, indices in range β 345200 rows
- β prefix_gt/gt_top100_dim512.tsv: 100 rows per query, ranks 1..k, descending scores <= 1, indices in range β 345200 rows
- β prefix_gt/gt_top100_dim768.tsv: 100 rows per query, ranks 1..k, descending scores <= 1, indices in range β 345200 rows
Provenance
| exported | 2026-11-09 |
| encode hardware | NVIDIA A100-PCIE-40GB (8 document shard(s)) |
| ground-truth hardware | Tesla V100-SXM2-32GB-LS |
| code | encoder scripts/nq/encode.py, exporter scripts/nq/export.py in the LEAF scaling experiments |
- Downloads last month
- 91