ms-marco-en-bge / README.md
NohTow's picture
Upload folder using huggingface_hub
11e6ffa verified
---
language:
- en
multilinguality:
- monolingual
size_categories:
- 100K<n<1M
task_categories:
- feature-extraction
- sentence-similarity
pretty_name: ms-marco-english
tags:
- sentence-transformers
- colbert
- lightonai
dataset_info:
- config_name: queries
features:
- name: query_id
dtype: string
- name: text
dtype: string
splits:
- name: train
num_examples: 808731
- config_name: documents
features:
- name: document_id
dtype: string
- name: text
dtype: string
splits:
- name: train
num_examples: 8841823
- config_name: train
features:
- name: query_id
dtype: string
- name: document_ids
sequence:
value:
dtype: string
- name: scores
sequence:
value:
dtype: float32
splits:
- name: train
num_examples: 808728
configs:
- config_name: queries
data_files:
- split: train
path: english_queries.train.parquet
- config_name: documents
data_files:
- split: train
path: english_collection.parquet
- config_name: train
data_files:
- split: train
path: dataset.parquet
---
# ms-marco-en-bge
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.
#### `knowledge distillation`
To fine-tune a model using knowledge distillation loss we will need three distinct file:
* Datasets
```python
from datasets import load_dataset
train = load_dataset(
"lightonai/ms-marco-en-bge",
"train",
split="train",
)
queries = load_dataset(
"lightonai/ms-marco-en-bge",
"queries",
split="train",
)
documents = load_dataset(
"lightonai/ms-marco-en-bge",
"documents",
split="train",
)
```
Where:
- `train` contains three distinct columns: `['query_id', 'document_ids', 'scores']`
```python
{
"query_id": 54528,
"document_ids": [
6862419,
335116,
339186,
7509316,
7361291,
7416534,
5789936,
5645247,
],
"scores": [
0.4546215673141326,
0.6575686537173476,
0.26825184192900203,
0.5256195579370395,
0.879939718687207,
0.7894968184862693,
0.6450100468854655,
0.5823844608171467,
],
}
```
Assert that the length of document_ids is the same as scores.
- `queries` contains two distinct columns: `['query_id', 'text']`
```python
{"query_id": 749480, "text": "what is function of magnesium in human body"}
```
- `documents` contains two distinct columns: `['document_ids', 'text']`
```python
{
"document_id": 136062,
"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.",
}
```