Update README.md
Browse files
README.md
CHANGED
@@ -83,6 +83,8 @@ This dataset gathers very few samples from [MS MARCO](https://microsoft.github.i
|
|
83 |
|
84 |
#### `triplet` subset
|
85 |
|
|
|
|
|
86 |
* Columns: "query", "positive", "negative"
|
87 |
* Column types: `str`, `str`, `str`
|
88 |
* Examples:
|
@@ -93,5 +95,41 @@ This dataset gathers very few samples from [MS MARCO](https://microsoft.github.i
|
|
93 |
"negative": 'The New York State Education Department requires 60 Liberal Arts credits in a Bachelor of Science program and 90 Liberal Arts credits in a Bachelor of Arts program. In the list of course descriptions, courses which are liberal arts for all students are identified by (Liberal Arts) after the course number.'
|
94 |
}
|
95 |
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
96 |
|
97 |
-
|
|
|
|
|
|
|
|
83 |
|
84 |
#### `triplet` subset
|
85 |
|
86 |
+
The `triplet` file is all we need to fine-tune a model based on contrastive loss.
|
87 |
+
|
88 |
* Columns: "query", "positive", "negative"
|
89 |
* Column types: `str`, `str`, `str`
|
90 |
* Examples:
|
|
|
95 |
"negative": 'The New York State Education Department requires 60 Liberal Arts credits in a Bachelor of Science program and 90 Liberal Arts credits in a Bachelor of Arts program. In the list of course descriptions, courses which are liberal arts for all students are identified by (Liberal Arts) after the course number.'
|
96 |
}
|
97 |
```
|
98 |
+
* Datasets
|
99 |
+
```python
|
100 |
+
from datasets import load_dataset
|
101 |
+
|
102 |
+
dataset = load_dataset("lightonai/lighton-ms-marco-mini", "triplet", split="train")
|
103 |
+
```
|
104 |
+
|
105 |
+
#### `knowledge distillation` subset
|
106 |
+
|
107 |
+
To fine-tune a model using knowledge distillation loss we will need three distinct file:
|
108 |
+
|
109 |
+
* Datasets
|
110 |
+
```python
|
111 |
+
from datasets import load_dataset
|
112 |
+
|
113 |
+
train = load_dataset(
|
114 |
+
"lightonai/lighton-ms-marco-mini",
|
115 |
+
"train",
|
116 |
+
split="train",
|
117 |
+
)
|
118 |
+
|
119 |
+
queries = load_dataset(
|
120 |
+
"lightonai/lighton-ms-marco-mini",
|
121 |
+
"queries",
|
122 |
+
split="train",
|
123 |
+
)
|
124 |
+
|
125 |
+
documents = load_dataset(
|
126 |
+
"lightonai/lighton-ms-marco-mini",
|
127 |
+
"documents",
|
128 |
+
split="train",
|
129 |
+
)
|
130 |
+
```
|
131 |
|
132 |
+
Where:
|
133 |
+
- `train` contains three distinct columns: `['query_id', 'document_ids', 'scores']`
|
134 |
+
- `queries` contains two distinct columns: `['query_id', 'text']`
|
135 |
+
- `documents` contains two distinct columns: `['document_ids', 'text']`
|