alexrs commited on
Commit
e78737f
·
verified ·
1 Parent(s): dc4c5a8

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +101 -101
README.md CHANGED
@@ -1,101 +1,101 @@
1
- ---
2
- configs:
3
- - config_name: "passages"
4
- data_files:
5
- - split: train
6
- path: passages_parquet/*
7
- - config_name: "queries"
8
- data_files:
9
- - split: test
10
- path: queries_parquet/*
11
- ---
12
-
13
-
14
- # TREC-RAG 2024 Corpus (MSMARCO 2.1) - Encoded with Cohere Embed English v3
15
-
16
-
17
- This dataset contains the embeddings for the [TREC-RAG Corpus 2024](https://trec-rag.github.io/annoucements/2024-corpus-finalization/) embedded with the [Cohere Embed V3 English](https://cohere.com/blog/introducing-embed-v3) model.
18
-
19
- It contains embeddings for 113,520,750 passages, embeddings for 1677 queries from TREC-Deep Learning 2021-2023, as well as top-1000 hits for all queries using a brute-force (flat) index.
20
-
21
- ## Search over the Index
22
-
23
- We have a pre-build index that only requires 300 MB available at [TREC-RAG-2024-index](https://huggingface.co/datasets/Cohere/trec-rag-2024-index). Just pass in your Cohere API key, and you are able to search across 113M passages.
24
-
25
- The linked index used PQ-compression with memory-mapped IVF, reducing your memory need to only 300MB, while achieving 97% search quality compared to a float32 flat index (that requires 250+GB memory and is extremely slow).
26
-
27
-
28
- ## Passages
29
-
30
- ### Passages - Parquet
31
- 113,520,750 passages are embedded. The parquet files can be found in the folder `passages_parquet`. Each row is a passage from the corpus. The column `emb` contains the respective embedding.
32
-
33
- You can stream the dataset for example like this:
34
- ```python
35
- from datasets import load_dataset
36
-
37
- dataset = load_dataset("Cohere/msmarco-v2.1-embed-english-v3", "passages", split="train", streaming=True)
38
-
39
- for row in dataset:
40
- print(row)
41
- break
42
- ```
43
-
44
- ### Passages - JSONL and Numpy
45
- The folder `passages_jsonl` contain the `.json.gz` files for the passages as distributed by the task organizers.
46
-
47
- The folder `passages_npy` contains a numpy matrix with all the embeddings for the respective `.json.gz` file.
48
-
49
- When your server has enough memory, you can load all doc embeddings like this:
50
- ```python
51
- import numpy as np
52
- import glob
53
-
54
- emb_paths = sorted(glob.glob("passages_npy/*.npy"))
55
-
56
- for e_path in emb_paths:
57
- doc_emb = np.load(e_path)
58
- ```
59
-
60
- ## Queries
61
-
62
- For 1677 queries from TREC-Deep Learning 2021, 2022 and 2023 we compute the embedding and the respective top-1k hits from a brute-force (flat) index.
63
- These queries can e.g. be used to test different ANN setting, e.g. in Recall@10 scenarios.
64
-
65
- We also added annotations from NIST for the 215 queries that received an annotation. These queries have a non-empty qrel column.
66
-
67
- The format is the following:
68
- - "_id": The query ID
69
- - "text": Query text
70
- - "trec-year": TREC-Deep Learning year
71
- - "emb": Cohere Embed V3 embedding
72
- - "top1k_offsets": Passage ID (int) when the numpy matrices are loaded sequentially and vertically stacked
73
- - "top1k_passage_ids": Passage ID (string) as they appear in the dataset
74
- - "top1k_cossim": Cosine similarities
75
- - "qrels": Relevance annotations for the 215 annotated queries by NIST. The **document relevance** scores are provided. You can get the doc_id for a passage via `row['_id'].split("#")[0]`
76
-
77
- ### Queries - JSONL
78
- The folder `queries_jsonl/` contains the queries in a `.jsonl.gz` format.
79
-
80
- Note: qrels are provided here as a dictionary lookup, while in the parquet format as a list in the format `[doc_id, score]` due to the limited support for dictionaries in parquet.
81
-
82
- ### Queries - Parquet
83
-
84
- If you want to use the parquet file or the HF datasets library, the folder `queries_parquet/` contains the respective parquet file.
85
-
86
- You can load the queries with the following command in HF datasets
87
-
88
- ```python
89
- from datasets import load_dataset
90
-
91
- dataset = load_dataset("Cohere/msmarco-v2.1-embed-english-v3", "queries", split="test")
92
-
93
- for row in dataset:
94
- print(row)
95
- break
96
- ```
97
-
98
-
99
- # License
100
-
101
- The embeddings are provided as Apache 2.0. The text data, qrels etc. are provided following the license of MSMARCO v2.1
 
1
+ ---
2
+ configs:
3
+ - config_name: "passages"
4
+ data_files:
5
+ - split: train
6
+ path: passages_parquet/*
7
+ - config_name: "queries"
8
+ data_files:
9
+ - split: test
10
+ path: queries_parquet/*
11
+ ---
12
+
13
+
14
+ # TREC-RAG 2024 Corpus (MSMARCO 2.1) - Encoded with Cohere Embed English v3
15
+
16
+
17
+ This dataset contains the embeddings for the [TREC-RAG Corpus 2024](https://trec-rag.github.io/annoucements/2024-corpus-finalization/) embedded with the [Cohere Embed V3 English](https://cohere.com/blog/introducing-embed-v3) model.
18
+
19
+ It contains embeddings for 113,520,750 passages, embeddings for 1677 queries from TREC-Deep Learning 2021-2023, as well as top-1000 hits for all queries using a brute-force (flat) index.
20
+
21
+ ## Search over the Index
22
+
23
+ We have a pre-build index that only requires 300 MB available at [TREC-RAG-2024-index](https://huggingface.co/datasets/Cohere/trec-rag-2024-index). Just pass in your Cohere API key, and you are able to search across 113M passages.
24
+
25
+ The linked index used PQ-compression with memory-mapped IVF, reducing your memory need to only 300MB, while achieving 97% search quality compared to a float32 flat index (that requires 250+GB memory and is extremely slow).
26
+
27
+
28
+ ## Passages
29
+
30
+ ### Passages - Parquet
31
+ 113,520,750 passages are embedded. The parquet files can be found in the folder `passages_parquet`. Each row is a passage from the corpus. The column `emb` contains the respective embedding.
32
+
33
+ You can stream the dataset for example like this:
34
+ ```python
35
+ from datasets import load_dataset
36
+
37
+ dataset = load_dataset("CohereLabs/msmarco-v2.1-embed-english-v3", "passages", split="train", streaming=True)
38
+
39
+ for row in dataset:
40
+ print(row)
41
+ break
42
+ ```
43
+
44
+ ### Passages - JSONL and Numpy
45
+ The folder `passages_jsonl` contain the `.json.gz` files for the passages as distributed by the task organizers.
46
+
47
+ The folder `passages_npy` contains a numpy matrix with all the embeddings for the respective `.json.gz` file.
48
+
49
+ When your server has enough memory, you can load all doc embeddings like this:
50
+ ```python
51
+ import numpy as np
52
+ import glob
53
+
54
+ emb_paths = sorted(glob.glob("passages_npy/*.npy"))
55
+
56
+ for e_path in emb_paths:
57
+ doc_emb = np.load(e_path)
58
+ ```
59
+
60
+ ## Queries
61
+
62
+ For 1677 queries from TREC-Deep Learning 2021, 2022 and 2023 we compute the embedding and the respective top-1k hits from a brute-force (flat) index.
63
+ These queries can e.g. be used to test different ANN setting, e.g. in Recall@10 scenarios.
64
+
65
+ We also added annotations from NIST for the 215 queries that received an annotation. These queries have a non-empty qrel column.
66
+
67
+ The format is the following:
68
+ - "_id": The query ID
69
+ - "text": Query text
70
+ - "trec-year": TREC-Deep Learning year
71
+ - "emb": Cohere Embed V3 embedding
72
+ - "top1k_offsets": Passage ID (int) when the numpy matrices are loaded sequentially and vertically stacked
73
+ - "top1k_passage_ids": Passage ID (string) as they appear in the dataset
74
+ - "top1k_cossim": Cosine similarities
75
+ - "qrels": Relevance annotations for the 215 annotated queries by NIST. The **document relevance** scores are provided. You can get the doc_id for a passage via `row['_id'].split("#")[0]`
76
+
77
+ ### Queries - JSONL
78
+ The folder `queries_jsonl/` contains the queries in a `.jsonl.gz` format.
79
+
80
+ Note: qrels are provided here as a dictionary lookup, while in the parquet format as a list in the format `[doc_id, score]` due to the limited support for dictionaries in parquet.
81
+
82
+ ### Queries - Parquet
83
+
84
+ If you want to use the parquet file or the HF datasets library, the folder `queries_parquet/` contains the respective parquet file.
85
+
86
+ You can load the queries with the following command in HF datasets
87
+
88
+ ```python
89
+ from datasets import load_dataset
90
+
91
+ dataset = load_dataset("CohereLabs/msmarco-v2.1-embed-english-v3", "queries", split="test")
92
+
93
+ for row in dataset:
94
+ print(row)
95
+ break
96
+ ```
97
+
98
+
99
+ # License
100
+
101
+ The embeddings are provided as Apache 2.0. The text data, qrels etc. are provided following the license of MSMARCO v2.1