Add dataset card
Browse files
README.md
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
language:
|
| 3 |
+
- en
|
| 4 |
+
license: mit
|
| 5 |
+
tags:
|
| 6 |
+
- two-tower
|
| 7 |
+
- semantic-search
|
| 8 |
+
- document-retrieval
|
| 9 |
+
- information-retrieval
|
| 10 |
+
- dual-encoder
|
| 11 |
+
---
|
| 12 |
+
|
| 13 |
+
# mlx7-two-tower-data
|
| 14 |
+
|
| 15 |
+
This repository contains datasets used for training Two-Tower (Dual Encoder) models for document retrieval.
|
| 16 |
+
|
| 17 |
+
## Dataset Description
|
| 18 |
+
|
| 19 |
+
The datasets provided here are structured for training dual encoder models with various sampling strategies:
|
| 20 |
+
|
| 21 |
+
- **classic_triplets**: 48.2 MB
|
| 22 |
+
- **intra_query_neg**: 47.6 MB
|
| 23 |
+
- **multi_pos_multi_neg**: 126.5 MB
|
| 24 |
+
|
| 25 |
+
### Dataset Details
|
| 26 |
+
|
| 27 |
+
- **classic_triplets.parquet**: Standard triplet format with (query, positive_document, negative_document)
|
| 28 |
+
- **intra_query_neg.parquet**: Negative examples selected from within the same query batch
|
| 29 |
+
- **multi_pos_multi_neg.parquet**: Multiple positive and negative examples per query
|
| 30 |
+
|
| 31 |
+
## Usage
|
| 32 |
+
|
| 33 |
+
```python
|
| 34 |
+
import pandas as pd
|
| 35 |
+
|
| 36 |
+
# Load a dataset
|
| 37 |
+
df = pd.read_parquet("classic_triplets.parquet")
|
| 38 |
+
|
| 39 |
+
# View the schema
|
| 40 |
+
print(df.columns)
|
| 41 |
+
|
| 42 |
+
# Example of working with the data
|
| 43 |
+
queries = df["q_text"].tolist()
|
| 44 |
+
positive_docs = df["d_pos_text"].tolist()
|
| 45 |
+
negative_docs = df["d_neg_text"].tolist()
|
| 46 |
+
```
|
| 47 |
+
|
| 48 |
+
## Data Source and Preparation
|
| 49 |
+
|
| 50 |
+
These datasets are derived from the MS MARCO passage retrieval dataset, processed to create effective training examples for two-tower models.
|
| 51 |
+
|
| 52 |
+
## Dataset Structure
|
| 53 |
+
|
| 54 |
+
The datasets follow a common schema with the following fields:
|
| 55 |
+
- `q_text`: Query text
|
| 56 |
+
- `d_pos_text`: Positive (relevant) document text
|
| 57 |
+
- `d_neg_text`: Negative (non-relevant) document text
|
| 58 |
+
|
| 59 |
+
Additional fields may be present in specific datasets.
|
| 60 |
+
|
| 61 |
+
## Citation
|
| 62 |
+
|
| 63 |
+
If you use this dataset in your research, please cite the original MS MARCO dataset:
|
| 64 |
+
|
| 65 |
+
```
|
| 66 |
+
@article{msmarco,
|
| 67 |
+
title={MS MARCO: A Human Generated MAchine Reading COmprehension Dataset},
|
| 68 |
+
author={Nguyen, Tri and Rosenberg, Matthew and Song, Xia and Gao, Jianfeng and Tiwary, Saurabh and Majumder, Rangan and Deng, Li},
|
| 69 |
+
journal={arXiv preprint arXiv:1611.09268},
|
| 70 |
+
year={2016}
|
| 71 |
+
}
|
| 72 |
+
```
|