Upload folder using huggingface_hub
Browse files- README.md +141 -0
- dataset.parquet +3 -0
- french_collection.parquet +3 -0
- french_queries.train.parquet +3 -0
README.md
ADDED
@@ -0,0 +1,141 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
language:
|
3 |
+
- en
|
4 |
+
- fr
|
5 |
+
multilinguality:
|
6 |
+
- multilingual
|
7 |
+
size_categories:
|
8 |
+
- 100K<n<1M
|
9 |
+
task_categories:
|
10 |
+
- feature-extraction
|
11 |
+
- sentence-similarity
|
12 |
+
pretty_name: ms-marco-fr-bge
|
13 |
+
tags:
|
14 |
+
- sentence-transformers
|
15 |
+
- colbert
|
16 |
+
- lightonai
|
17 |
+
dataset_info:
|
18 |
+
- config_name: queries
|
19 |
+
features:
|
20 |
+
- name: query_id
|
21 |
+
dtype: string
|
22 |
+
- name: text
|
23 |
+
dtype: string
|
24 |
+
splits:
|
25 |
+
- name: train
|
26 |
+
num_examples: 808731
|
27 |
+
- config_name: documents
|
28 |
+
features:
|
29 |
+
- name: document_id
|
30 |
+
dtype: string
|
31 |
+
- name: text
|
32 |
+
dtype: string
|
33 |
+
splits:
|
34 |
+
- name: train
|
35 |
+
num_examples: 8829492
|
36 |
+
- config_name: train
|
37 |
+
features:
|
38 |
+
- name: query_id
|
39 |
+
dtype: string
|
40 |
+
- name: document_ids
|
41 |
+
sequence:
|
42 |
+
value:
|
43 |
+
dtype: string
|
44 |
+
- name: scores
|
45 |
+
sequence:
|
46 |
+
value:
|
47 |
+
dtype: float16
|
48 |
+
splits:
|
49 |
+
- name: train
|
50 |
+
num_examples: 808000
|
51 |
+
configs:
|
52 |
+
- config_name: queries
|
53 |
+
data_files:
|
54 |
+
- split: train
|
55 |
+
path: french_queries.train.parquet
|
56 |
+
- config_name: documents
|
57 |
+
data_files:
|
58 |
+
- split: train
|
59 |
+
path: french_collection.parquet
|
60 |
+
- config_name: train
|
61 |
+
data_files:
|
62 |
+
- split: train
|
63 |
+
path: dataset.parquet
|
64 |
+
---
|
65 |
+
|
66 |
+
# ms-marco-fr-bge
|
67 |
+
|
68 |
+
This dataset contains the [french version](https://huggingface.co/datasets/unicamp-dl/mmarco) of [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.
|
69 |
+
|
70 |
+
#### `knowledge distillation`
|
71 |
+
|
72 |
+
To fine-tune a model using knowledge distillation loss we will need three distinct file:
|
73 |
+
|
74 |
+
* Datasets
|
75 |
+
```python
|
76 |
+
from datasets import load_dataset
|
77 |
+
|
78 |
+
train = load_dataset(
|
79 |
+
"lightonai/ms-marco-fr-bge",
|
80 |
+
"train",
|
81 |
+
split="train",
|
82 |
+
)
|
83 |
+
|
84 |
+
queries = load_dataset(
|
85 |
+
"lightonai/ms-marco-fr-bge",
|
86 |
+
"queries",
|
87 |
+
split="train",
|
88 |
+
)
|
89 |
+
|
90 |
+
documents = load_dataset(
|
91 |
+
"lightonai/ms-marco-fr-bge",
|
92 |
+
"documents",
|
93 |
+
split="train",
|
94 |
+
)
|
95 |
+
```
|
96 |
+
|
97 |
+
Where:
|
98 |
+
- `train` contains three distinct columns: `['query_id', 'document_ids', 'scores']`
|
99 |
+
|
100 |
+
```python
|
101 |
+
{
|
102 |
+
"query_id": 54528,
|
103 |
+
"document_ids": [
|
104 |
+
6862419,
|
105 |
+
335116,
|
106 |
+
339186,
|
107 |
+
7509316,
|
108 |
+
7361291,
|
109 |
+
7416534,
|
110 |
+
5789936,
|
111 |
+
5645247,
|
112 |
+
],
|
113 |
+
"scores": [
|
114 |
+
0.4546215673141326,
|
115 |
+
0.6575686537173476,
|
116 |
+
0.26825184192900203,
|
117 |
+
0.5256195579370395,
|
118 |
+
0.879939718687207,
|
119 |
+
0.7894968184862693,
|
120 |
+
0.6450100468854655,
|
121 |
+
0.5823844608171467,
|
122 |
+
],
|
123 |
+
}
|
124 |
+
```
|
125 |
+
|
126 |
+
Assert that the length of document_ids is the same as scores.
|
127 |
+
|
128 |
+
- `queries` contains two distinct columns: `['query_id', 'text']`
|
129 |
+
|
130 |
+
```python
|
131 |
+
{"query_id": 749480, "text": "what is function of magnesium in human body"}
|
132 |
+
```
|
133 |
+
|
134 |
+
- `documents` contains two distinct columns: `['document_ids', 'text']`
|
135 |
+
|
136 |
+
```python
|
137 |
+
{
|
138 |
+
"document_id": 136062,
|
139 |
+
"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.",
|
140 |
+
}
|
141 |
+
```
|
dataset.parquet
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:a3dae8ffc93ada5bd09a141e0949fe3f1707d22eff48bea15bd88396657ab9d8
|
3 |
+
size 334279419
|
french_collection.parquet
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:7db816f8c27651502a174f9733cefe4b612107c1a741bb58bb24c064c60901fe
|
3 |
+
size 1879411601
|
french_queries.train.parquet
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:e8422eb59ba438262b389986264e13c56c519a6eb8c5f5c1322b31d9c8709830
|
3 |
+
size 29311183
|