Datasets:
Upload folder using huggingface_hub
Browse files- README.md +140 -0
- dataset.parquet +3 -0
- english_collection.parquet +3 -0
- english_queries.train.parquet +3 -0
README.md
ADDED
@@ -0,0 +1,140 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
language:
|
3 |
+
- en
|
4 |
+
multilinguality:
|
5 |
+
- monolingual
|
6 |
+
size_categories:
|
7 |
+
- 100K<n<1M
|
8 |
+
task_categories:
|
9 |
+
- feature-extraction
|
10 |
+
- sentence-similarity
|
11 |
+
pretty_name: ms-marco-english
|
12 |
+
tags:
|
13 |
+
- sentence-transformers
|
14 |
+
- colbert
|
15 |
+
- lightonai
|
16 |
+
dataset_info:
|
17 |
+
- config_name: queries
|
18 |
+
features:
|
19 |
+
- name: query_id
|
20 |
+
dtype: string
|
21 |
+
- name: text
|
22 |
+
dtype: string
|
23 |
+
splits:
|
24 |
+
- name: train
|
25 |
+
num_examples: 808731
|
26 |
+
- config_name: documents
|
27 |
+
features:
|
28 |
+
- name: document_id
|
29 |
+
dtype: string
|
30 |
+
- name: text
|
31 |
+
dtype: string
|
32 |
+
splits:
|
33 |
+
- name: train
|
34 |
+
num_examples: 8841823
|
35 |
+
- config_name: train
|
36 |
+
features:
|
37 |
+
- name: query_id
|
38 |
+
dtype: string
|
39 |
+
- name: document_ids
|
40 |
+
sequence:
|
41 |
+
value:
|
42 |
+
dtype: string
|
43 |
+
- name: scores
|
44 |
+
sequence:
|
45 |
+
value:
|
46 |
+
dtype: float32
|
47 |
+
splits:
|
48 |
+
- name: train
|
49 |
+
num_examples: 808728
|
50 |
+
configs:
|
51 |
+
- config_name: queries
|
52 |
+
data_files:
|
53 |
+
- split: train
|
54 |
+
path: english_queries.train.parquet
|
55 |
+
- config_name: documents
|
56 |
+
data_files:
|
57 |
+
- split: train
|
58 |
+
path: english_collection.parquet
|
59 |
+
- config_name: train
|
60 |
+
data_files:
|
61 |
+
- split: train
|
62 |
+
path: dataset.parquet
|
63 |
+
---
|
64 |
+
|
65 |
+
# ms-marco-en-bge
|
66 |
+
|
67 |
+
This dataset contains the [MS MARCO](https://microsoft.github.io/msmarco/) dataset with documents similar to the query mined using [BGE-M3](https://huggingface.co/BAAI/bge-m3) and then scored by [bge-reranker-v2-m3](BAAI/bge-reranker-v2-m3). It can be used to train a retrieval model using knowledge distillation.
|
68 |
+
|
69 |
+
#### `knowledge distillation`
|
70 |
+
|
71 |
+
To fine-tune a model using knowledge distillation loss we will need three distinct file:
|
72 |
+
|
73 |
+
* Datasets
|
74 |
+
```python
|
75 |
+
from datasets import load_dataset
|
76 |
+
|
77 |
+
train = load_dataset(
|
78 |
+
"lightonai/ms-marco-en-bge",
|
79 |
+
"train",
|
80 |
+
split="train",
|
81 |
+
)
|
82 |
+
|
83 |
+
queries = load_dataset(
|
84 |
+
"lightonai/ms-marco-en-bge",
|
85 |
+
"queries",
|
86 |
+
split="train",
|
87 |
+
)
|
88 |
+
|
89 |
+
documents = load_dataset(
|
90 |
+
"lightonai/ms-marco-en-bge",
|
91 |
+
"documents",
|
92 |
+
split="train",
|
93 |
+
)
|
94 |
+
```
|
95 |
+
|
96 |
+
Where:
|
97 |
+
- `train` contains three distinct columns: `['query_id', 'document_ids', 'scores']`
|
98 |
+
|
99 |
+
```python
|
100 |
+
{
|
101 |
+
"query_id": 54528,
|
102 |
+
"document_ids": [
|
103 |
+
6862419,
|
104 |
+
335116,
|
105 |
+
339186,
|
106 |
+
7509316,
|
107 |
+
7361291,
|
108 |
+
7416534,
|
109 |
+
5789936,
|
110 |
+
5645247,
|
111 |
+
],
|
112 |
+
"scores": [
|
113 |
+
0.4546215673141326,
|
114 |
+
0.6575686537173476,
|
115 |
+
0.26825184192900203,
|
116 |
+
0.5256195579370395,
|
117 |
+
0.879939718687207,
|
118 |
+
0.7894968184862693,
|
119 |
+
0.6450100468854655,
|
120 |
+
0.5823844608171467,
|
121 |
+
],
|
122 |
+
}
|
123 |
+
```
|
124 |
+
|
125 |
+
Assert that the length of document_ids is the same as scores.
|
126 |
+
|
127 |
+
- `queries` contains two distinct columns: `['query_id', 'text']`
|
128 |
+
|
129 |
+
```python
|
130 |
+
{"query_id": 749480, "text": "what is function of magnesium in human body"}
|
131 |
+
```
|
132 |
+
|
133 |
+
- `documents` contains two distinct columns: `['document_ids', 'text']`
|
134 |
+
|
135 |
+
```python
|
136 |
+
{
|
137 |
+
"document_id": 136062,
|
138 |
+
"text": "2. Also called tan .a fundamental trigonometric function that, in a right triangle, is expressed as the ratio of the side opposite an acute angle to the side adjacent to that angle. 3. in immediate physical contact; touching; abutting. 4. a. touching at a single point, as a tangent in relation to a curve or surface.lso called tan .a fundamental trigonometric function that, in a right triangle, is expressed as the ratio of the side opposite an acute angle to the side adjacent to that angle. 3. in immediate physical contact; touching; abutting. 4. a. touching at a single point, as a tangent in relation to a curve or surface.",
|
139 |
+
}
|
140 |
+
```
|
dataset.parquet
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:3d363f28d54a498a38e586983c1e4e06380b81196f6591379c46c4723f40e081
|
3 |
+
size 340140593
|
english_collection.parquet
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:d48ea2740ac952d441429e64725aa1f2e6beada3e4c07135cb794e14a9b1bedc
|
3 |
+
size 1643716390
|
english_queries.train.parquet
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:a386489eb9c6c88e75b57e1d6062fbb08ad9fc277700cdf7aa4e79fa1042581d
|
3 |
+
size 25623832
|