--- pretty_name: trec-covid_lateon_hpool_regularized license: cc-by-sa-4.0 tags: - multi-vector - late-interaction - colbert - embeddings - retrieval - text --- # trec-covid_lateon_hpool_regularized Multi-vector (late-interaction) embeddings of **BEIR trec-covid** (`beir/trec-covid`), encoded with **[lightonai/LateOn-hpool-regularized](https://huggingface.co/lightonai/LateOn-hpool-regularized)** at revision `3f9c577e4959ffd717a2565ba8db62f3d5f9d34c`. **Source data:** [ir_datasets](https://ir-datasets.com/beir.html#beir/trec-covid) `beir/trec-covid` (ir_datasets 0.6.3), which downloads [trec-covid.zip](https://public.ukp.informatik.tu-darmstadt.de/thakur/BEIR/datasets/trec-covid.zip) (md5 `ce62140cb23feb9becf6270d0d1fe6d1`). BEIR also publishes this corpus on the Hub as [`BeIR/trec-covid`](https://huggingface.co/datasets/BeIR/trec-covid), 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. Every document is one variable-length set of 128-d vectors; every query is one variable-length set of 128-d vectors. Documents and queries are stored at different precisions (fp16 and fp32 respectively), see [Encoding](#encoding). ## Files | file | dtype | shape | contents | |---|---|---|---| | `documents.npy` | float16 (`', '?', '@', '[', '\\', ']', '^', '_', '`', '{', '|', '}', '~'] | | document input | `title + "\n\n" + text` when the corpus has a title, else `text`; stripped | | query input | query text, stripped of surrounding whitespace, formatted by the model's own query prompt/template | | query vectors | every vector the model emits for the query is kept, including any query-expansion tokens its template adds; `query_lens` counts them all | | document padding | none: `documents.npy` holds real vectors only, `sum(doclens) == n_tokens` | | query padding | rows at or beyond `query_lens[i]` in `queries.npy[i]` are exactly zero | | token_ids | tokenizer id of each kept document token (after the skiplist above), aligned 1:1 with `documents.npy` | ## Ground truth: `gt_top1000.tsv` and `gt_top100.tsv` Exact brute-force MaxSim top-1000 per query over the full corpus, from the vectors in this repo. `gt_top100.tsv` holds the first 100 ranks per query of the same lists (the original layout of these exports). No header; tab-separated `qidx docidx rank score`: - `qidx`: 0-based row into `queries_ids.npy` / `queries.npy` - `docidx`: 0-based position into `doc_ids.npy` / `doclens.npy` - `rank`: 1-based, descending score - `score`: `sum over the query's query_lens[qidx] vectors of max over the document's vectors of the dot product`, computed in fp32 with the fp16 document vectors upcast to fp32. Expansion vectors are included in the sum. Printed to 6 decimals. ## Retrieval quality Sanity check of the vectors, not a leaderboard number: `gt_top1000.tsv` (exact MaxSim over the full corpus) scored against `qrels.test.tsv` with ir_measures. | nDCG@10 | MRR@10 | Success@5 | Recall@100 | Recall@1000 | MAP@1000 | |---|---|---|---|---|---| | 0.8282 | 0.9470 | 0.9800 | 0.1650 | 0.5644 | 0.3413 | ## Loading ```python import numpy as np documents = np.load("documents.npy", mmap_mode="r") # [n_tokens, 128] float16 doclens = np.load("doclens.npy") # [n_docs] int32 offsets = np.concatenate([[0], np.cumsum(doclens)]) doc_ids = np.load("doc_ids.npy") # [n_docs] str def document(i): return documents[offsets[i]:offsets[i + 1]] # [doclens[i], 128] queries = np.load("queries.npy") # [n_queries, 32, 128] float32 query_lens = np.load("query_lens.npy") # [n_queries] int32 query_ids = np.load("queries_ids.npy") # [n_queries] str def query(j): return queries[j, :query_lens[j]] # [query_lens[j], 128] def maxsim(q, d): return (q @ d.astype(np.float32).T).max(axis=1).sum() ``` ## Validation Checks run by the exporter on the files exactly as written here: - ✅ file set — missing=[] extra=[] - ✅ documents.npy dtype/shape —