chanbistec
commited on
Commit
•
e011522
1
Parent(s):
cc37b08
Add new SentenceTransformer model.
Browse files- 1_Pooling/config.json +10 -0
- README.md +535 -0
- config.json +24 -0
- config_sentence_transformers.json +10 -0
- model.safetensors +3 -0
- modules.json +14 -0
- sentence_bert_config.json +4 -0
- special_tokens_map.json +51 -0
- tokenizer.json +0 -0
- tokenizer_config.json +65 -0
- vocab.txt +0 -0
1_Pooling/config.json
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"word_embedding_dimension": 768,
|
3 |
+
"pooling_mode_cls_token": false,
|
4 |
+
"pooling_mode_mean_tokens": true,
|
5 |
+
"pooling_mode_max_tokens": false,
|
6 |
+
"pooling_mode_mean_sqrt_len_tokens": false,
|
7 |
+
"pooling_mode_weightedmean_tokens": false,
|
8 |
+
"pooling_mode_lasttoken": false,
|
9 |
+
"include_prompt": true
|
10 |
+
}
|
README.md
ADDED
@@ -0,0 +1,535 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
base_model: microsoft/mpnet-base
|
3 |
+
datasets:
|
4 |
+
- sentence-transformers/all-nli
|
5 |
+
language:
|
6 |
+
- en
|
7 |
+
library_name: sentence-transformers
|
8 |
+
license: apache-2.0
|
9 |
+
metrics:
|
10 |
+
- cosine_accuracy
|
11 |
+
- dot_accuracy
|
12 |
+
- manhattan_accuracy
|
13 |
+
- euclidean_accuracy
|
14 |
+
- max_accuracy
|
15 |
+
pipeline_tag: sentence-similarity
|
16 |
+
tags:
|
17 |
+
- sentence-transformers
|
18 |
+
- sentence-similarity
|
19 |
+
- feature-extraction
|
20 |
+
- generated_from_trainer
|
21 |
+
- dataset_size:557850
|
22 |
+
- loss:MultipleNegativesRankingLoss
|
23 |
+
widget:
|
24 |
+
- source_sentence: A man is jumping unto his filthy bed.
|
25 |
+
sentences:
|
26 |
+
- A young male is looking at a newspaper while 2 females walks past him.
|
27 |
+
- The bed is dirty.
|
28 |
+
- The man is on the moon.
|
29 |
+
- source_sentence: A carefully balanced male stands on one foot near a clean ocean
|
30 |
+
beach area.
|
31 |
+
sentences:
|
32 |
+
- A man is ouside near the beach.
|
33 |
+
- Three policemen patrol the streets on bikes
|
34 |
+
- A man is sitting on his couch.
|
35 |
+
- source_sentence: The man is wearing a blue shirt.
|
36 |
+
sentences:
|
37 |
+
- Near the trashcan the man stood and smoked
|
38 |
+
- A man in a blue shirt leans on a wall beside a road with a blue van and red car
|
39 |
+
with water in the background.
|
40 |
+
- A man in a black shirt is playing a guitar.
|
41 |
+
- source_sentence: The girls are outdoors.
|
42 |
+
sentences:
|
43 |
+
- Two girls riding on an amusement part ride.
|
44 |
+
- a guy laughs while doing laundry
|
45 |
+
- Three girls are standing together in a room, one is listening, one is writing
|
46 |
+
on a wall and the third is talking to them.
|
47 |
+
- source_sentence: A construction worker peeking out of a manhole while his coworker
|
48 |
+
sits on the sidewalk smiling.
|
49 |
+
sentences:
|
50 |
+
- A worker is looking out of a manhole.
|
51 |
+
- A man is giving a presentation.
|
52 |
+
- The workers are both inside the manhole.
|
53 |
+
model-index:
|
54 |
+
- name: MPNet base trained on AllNLI triplets
|
55 |
+
results:
|
56 |
+
- task:
|
57 |
+
type: triplet
|
58 |
+
name: Triplet
|
59 |
+
dataset:
|
60 |
+
name: all nli dev
|
61 |
+
type: all-nli-dev
|
62 |
+
metrics:
|
63 |
+
- type: cosine_accuracy
|
64 |
+
value: 0.9141859052247874
|
65 |
+
name: Cosine Accuracy
|
66 |
+
- type: dot_accuracy
|
67 |
+
value: 0.08444714459295262
|
68 |
+
name: Dot Accuracy
|
69 |
+
- type: manhattan_accuracy
|
70 |
+
value: 0.9097812879708383
|
71 |
+
name: Manhattan Accuracy
|
72 |
+
- type: euclidean_accuracy
|
73 |
+
value: 0.9097812879708383
|
74 |
+
name: Euclidean Accuracy
|
75 |
+
- type: max_accuracy
|
76 |
+
value: 0.9141859052247874
|
77 |
+
name: Max Accuracy
|
78 |
+
- task:
|
79 |
+
type: triplet
|
80 |
+
name: Triplet
|
81 |
+
dataset:
|
82 |
+
name: all nli test
|
83 |
+
type: all-nli-test
|
84 |
+
metrics:
|
85 |
+
- type: cosine_accuracy
|
86 |
+
value: 0.926463912846119
|
87 |
+
name: Cosine Accuracy
|
88 |
+
- type: dot_accuracy
|
89 |
+
value: 0.07353608715388107
|
90 |
+
name: Dot Accuracy
|
91 |
+
- type: manhattan_accuracy
|
92 |
+
value: 0.9187471629596006
|
93 |
+
name: Manhattan Accuracy
|
94 |
+
- type: euclidean_accuracy
|
95 |
+
value: 0.9179906188530791
|
96 |
+
name: Euclidean Accuracy
|
97 |
+
- type: max_accuracy
|
98 |
+
value: 0.926463912846119
|
99 |
+
name: Max Accuracy
|
100 |
+
---
|
101 |
+
|
102 |
+
# MPNet base trained on AllNLI triplets
|
103 |
+
|
104 |
+
This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [microsoft/mpnet-base](https://huggingface.co/microsoft/mpnet-base) on the [all-nli](https://huggingface.co/datasets/sentence-transformers/all-nli) dataset. It maps sentences & paragraphs to a 768-dimensional dense vector space and can be used for semantic textual similarity, semantic search, paraphrase mining, text classification, clustering, and more.
|
105 |
+
|
106 |
+
## Model Details
|
107 |
+
|
108 |
+
### Model Description
|
109 |
+
- **Model Type:** Sentence Transformer
|
110 |
+
- **Base model:** [microsoft/mpnet-base](https://huggingface.co/microsoft/mpnet-base) <!-- at revision 6996ce1e91bd2a9c7d7f61daec37463394f73f09 -->
|
111 |
+
- **Maximum Sequence Length:** 512 tokens
|
112 |
+
- **Output Dimensionality:** 768 tokens
|
113 |
+
- **Similarity Function:** Cosine Similarity
|
114 |
+
- **Training Dataset:**
|
115 |
+
- [all-nli](https://huggingface.co/datasets/sentence-transformers/all-nli)
|
116 |
+
- **Language:** en
|
117 |
+
- **License:** apache-2.0
|
118 |
+
|
119 |
+
### Model Sources
|
120 |
+
|
121 |
+
- **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
|
122 |
+
- **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
|
123 |
+
- **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
|
124 |
+
|
125 |
+
### Full Model Architecture
|
126 |
+
|
127 |
+
```
|
128 |
+
SentenceTransformer(
|
129 |
+
(0): Transformer({'max_seq_length': 512, 'do_lower_case': False}) with Transformer model: MPNetModel
|
130 |
+
(1): Pooling({'word_embedding_dimension': 768, 'pooling_mode_cls_token': False, 'pooling_mode_mean_tokens': True, 'pooling_mode_max_tokens': False, 'pooling_mode_mean_sqrt_len_tokens': False, 'pooling_mode_weightedmean_tokens': False, 'pooling_mode_lasttoken': False, 'include_prompt': True})
|
131 |
+
)
|
132 |
+
```
|
133 |
+
|
134 |
+
## Usage
|
135 |
+
|
136 |
+
### Direct Usage (Sentence Transformers)
|
137 |
+
|
138 |
+
First install the Sentence Transformers library:
|
139 |
+
|
140 |
+
```bash
|
141 |
+
pip install -U sentence-transformers
|
142 |
+
```
|
143 |
+
|
144 |
+
Then you can load this model and run inference.
|
145 |
+
```python
|
146 |
+
from sentence_transformers import SentenceTransformer
|
147 |
+
|
148 |
+
# Download from the 🤗 Hub
|
149 |
+
model = SentenceTransformer("chanbistec/mpnet-base-all-nli-triplet")
|
150 |
+
# Run inference
|
151 |
+
sentences = [
|
152 |
+
'A construction worker peeking out of a manhole while his coworker sits on the sidewalk smiling.',
|
153 |
+
'A worker is looking out of a manhole.',
|
154 |
+
'The workers are both inside the manhole.',
|
155 |
+
]
|
156 |
+
embeddings = model.encode(sentences)
|
157 |
+
print(embeddings.shape)
|
158 |
+
# [3, 768]
|
159 |
+
|
160 |
+
# Get the similarity scores for the embeddings
|
161 |
+
similarities = model.similarity(embeddings, embeddings)
|
162 |
+
print(similarities.shape)
|
163 |
+
# [3, 3]
|
164 |
+
```
|
165 |
+
|
166 |
+
<!--
|
167 |
+
### Direct Usage (Transformers)
|
168 |
+
|
169 |
+
<details><summary>Click to see the direct usage in Transformers</summary>
|
170 |
+
|
171 |
+
</details>
|
172 |
+
-->
|
173 |
+
|
174 |
+
<!--
|
175 |
+
### Downstream Usage (Sentence Transformers)
|
176 |
+
|
177 |
+
You can finetune this model on your own dataset.
|
178 |
+
|
179 |
+
<details><summary>Click to expand</summary>
|
180 |
+
|
181 |
+
</details>
|
182 |
+
-->
|
183 |
+
|
184 |
+
<!--
|
185 |
+
### Out-of-Scope Use
|
186 |
+
|
187 |
+
*List how the model may foreseeably be misused and address what users ought not to do with the model.*
|
188 |
+
-->
|
189 |
+
|
190 |
+
## Evaluation
|
191 |
+
|
192 |
+
### Metrics
|
193 |
+
|
194 |
+
#### Triplet
|
195 |
+
* Dataset: `all-nli-dev`
|
196 |
+
* Evaluated with [<code>TripletEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.TripletEvaluator)
|
197 |
+
|
198 |
+
| Metric | Value |
|
199 |
+
|:-------------------|:-----------|
|
200 |
+
| cosine_accuracy | 0.9142 |
|
201 |
+
| dot_accuracy | 0.0844 |
|
202 |
+
| manhattan_accuracy | 0.9098 |
|
203 |
+
| euclidean_accuracy | 0.9098 |
|
204 |
+
| **max_accuracy** | **0.9142** |
|
205 |
+
|
206 |
+
#### Triplet
|
207 |
+
* Dataset: `all-nli-test`
|
208 |
+
* Evaluated with [<code>TripletEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.TripletEvaluator)
|
209 |
+
|
210 |
+
| Metric | Value |
|
211 |
+
|:-------------------|:-----------|
|
212 |
+
| cosine_accuracy | 0.9265 |
|
213 |
+
| dot_accuracy | 0.0735 |
|
214 |
+
| manhattan_accuracy | 0.9187 |
|
215 |
+
| euclidean_accuracy | 0.918 |
|
216 |
+
| **max_accuracy** | **0.9265** |
|
217 |
+
|
218 |
+
<!--
|
219 |
+
## Bias, Risks and Limitations
|
220 |
+
|
221 |
+
*What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
|
222 |
+
-->
|
223 |
+
|
224 |
+
<!--
|
225 |
+
### Recommendations
|
226 |
+
|
227 |
+
*What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
|
228 |
+
-->
|
229 |
+
|
230 |
+
## Training Details
|
231 |
+
|
232 |
+
### Training Dataset
|
233 |
+
|
234 |
+
#### all-nli
|
235 |
+
|
236 |
+
* Dataset: [all-nli](https://huggingface.co/datasets/sentence-transformers/all-nli) at [d482672](https://huggingface.co/datasets/sentence-transformers/all-nli/tree/d482672c8e74ce18da116f430137434ba2e52fab)
|
237 |
+
* Size: 557,850 training samples
|
238 |
+
* Columns: <code>anchor</code>, <code>positive</code>, and <code>negative</code>
|
239 |
+
* Approximate statistics based on the first 1000 samples:
|
240 |
+
| | anchor | positive | negative |
|
241 |
+
|:--------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|:---------------------------------------------------------------------------------|
|
242 |
+
| type | string | string | string |
|
243 |
+
| details | <ul><li>min: 7 tokens</li><li>mean: 10.46 tokens</li><li>max: 46 tokens</li></ul> | <ul><li>min: 6 tokens</li><li>mean: 12.81 tokens</li><li>max: 40 tokens</li></ul> | <ul><li>min: 5 tokens</li><li>mean: 13.4 tokens</li><li>max: 50 tokens</li></ul> |
|
244 |
+
* Samples:
|
245 |
+
| anchor | positive | negative |
|
246 |
+
|:---------------------------------------------------------------------------|:-------------------------------------------------|:-----------------------------------------------------------|
|
247 |
+
| <code>A person on a horse jumps over a broken down airplane.</code> | <code>A person is outdoors, on a horse.</code> | <code>A person is at a diner, ordering an omelette.</code> |
|
248 |
+
| <code>Children smiling and waving at camera</code> | <code>There are children present</code> | <code>The kids are frowning</code> |
|
249 |
+
| <code>A boy is jumping on skateboard in the middle of a red bridge.</code> | <code>The boy does a skateboarding trick.</code> | <code>The boy skates down the sidewalk.</code> |
|
250 |
+
* Loss: [<code>MultipleNegativesRankingLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#multiplenegativesrankingloss) with these parameters:
|
251 |
+
```json
|
252 |
+
{
|
253 |
+
"scale": 20.0,
|
254 |
+
"similarity_fct": "cos_sim"
|
255 |
+
}
|
256 |
+
```
|
257 |
+
|
258 |
+
### Evaluation Dataset
|
259 |
+
|
260 |
+
#### all-nli
|
261 |
+
|
262 |
+
* Dataset: [all-nli](https://huggingface.co/datasets/sentence-transformers/all-nli) at [d482672](https://huggingface.co/datasets/sentence-transformers/all-nli/tree/d482672c8e74ce18da116f430137434ba2e52fab)
|
263 |
+
* Size: 6,584 evaluation samples
|
264 |
+
* Columns: <code>anchor</code>, <code>positive</code>, and <code>negative</code>
|
265 |
+
* Approximate statistics based on the first 1000 samples:
|
266 |
+
| | anchor | positive | negative |
|
267 |
+
|:--------|:----------------------------------------------------------------------------------|:---------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|
|
268 |
+
| type | string | string | string |
|
269 |
+
| details | <ul><li>min: 6 tokens</li><li>mean: 17.95 tokens</li><li>max: 63 tokens</li></ul> | <ul><li>min: 4 tokens</li><li>mean: 9.78 tokens</li><li>max: 29 tokens</li></ul> | <ul><li>min: 5 tokens</li><li>mean: 10.35 tokens</li><li>max: 29 tokens</li></ul> |
|
270 |
+
* Samples:
|
271 |
+
| anchor | positive | negative |
|
272 |
+
|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:------------------------------------------------------------|:--------------------------------------------------------|
|
273 |
+
| <code>Two women are embracing while holding to go packages.</code> | <code>Two woman are holding packages.</code> | <code>The men are fighting outside a deli.</code> |
|
274 |
+
| <code>Two young children in blue jerseys, one with the number 9 and one with the number 2 are standing on wooden steps in a bathroom and washing their hands in a sink.</code> | <code>Two kids in numbered jerseys wash their hands.</code> | <code>Two kids in jackets walk to school.</code> |
|
275 |
+
| <code>A man selling donuts to a customer during a world exhibition event held in the city of Angeles</code> | <code>A man selling donuts to a customer.</code> | <code>A woman drinks her coffee in a small cafe.</code> |
|
276 |
+
* Loss: [<code>MultipleNegativesRankingLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#multiplenegativesrankingloss) with these parameters:
|
277 |
+
```json
|
278 |
+
{
|
279 |
+
"scale": 20.0,
|
280 |
+
"similarity_fct": "cos_sim"
|
281 |
+
}
|
282 |
+
```
|
283 |
+
|
284 |
+
### Training Hyperparameters
|
285 |
+
#### Non-Default Hyperparameters
|
286 |
+
|
287 |
+
- `eval_strategy`: steps
|
288 |
+
- `per_device_train_batch_size`: 16
|
289 |
+
- `per_device_eval_batch_size`: 16
|
290 |
+
- `learning_rate`: 2e-05
|
291 |
+
- `num_train_epochs`: 1
|
292 |
+
- `warmup_ratio`: 0.1
|
293 |
+
- `batch_sampler`: no_duplicates
|
294 |
+
|
295 |
+
#### All Hyperparameters
|
296 |
+
<details><summary>Click to expand</summary>
|
297 |
+
|
298 |
+
- `overwrite_output_dir`: False
|
299 |
+
- `do_predict`: False
|
300 |
+
- `eval_strategy`: steps
|
301 |
+
- `prediction_loss_only`: True
|
302 |
+
- `per_device_train_batch_size`: 16
|
303 |
+
- `per_device_eval_batch_size`: 16
|
304 |
+
- `per_gpu_train_batch_size`: None
|
305 |
+
- `per_gpu_eval_batch_size`: None
|
306 |
+
- `gradient_accumulation_steps`: 1
|
307 |
+
- `eval_accumulation_steps`: None
|
308 |
+
- `torch_empty_cache_steps`: None
|
309 |
+
- `learning_rate`: 2e-05
|
310 |
+
- `weight_decay`: 0.0
|
311 |
+
- `adam_beta1`: 0.9
|
312 |
+
- `adam_beta2`: 0.999
|
313 |
+
- `adam_epsilon`: 1e-08
|
314 |
+
- `max_grad_norm`: 1.0
|
315 |
+
- `num_train_epochs`: 1
|
316 |
+
- `max_steps`: -1
|
317 |
+
- `lr_scheduler_type`: linear
|
318 |
+
- `lr_scheduler_kwargs`: {}
|
319 |
+
- `warmup_ratio`: 0.1
|
320 |
+
- `warmup_steps`: 0
|
321 |
+
- `log_level`: passive
|
322 |
+
- `log_level_replica`: warning
|
323 |
+
- `log_on_each_node`: True
|
324 |
+
- `logging_nan_inf_filter`: True
|
325 |
+
- `save_safetensors`: True
|
326 |
+
- `save_on_each_node`: False
|
327 |
+
- `save_only_model`: False
|
328 |
+
- `restore_callback_states_from_checkpoint`: False
|
329 |
+
- `no_cuda`: False
|
330 |
+
- `use_cpu`: False
|
331 |
+
- `use_mps_device`: False
|
332 |
+
- `seed`: 42
|
333 |
+
- `data_seed`: None
|
334 |
+
- `jit_mode_eval`: False
|
335 |
+
- `use_ipex`: False
|
336 |
+
- `bf16`: False
|
337 |
+
- `fp16`: False
|
338 |
+
- `fp16_opt_level`: O1
|
339 |
+
- `half_precision_backend`: auto
|
340 |
+
- `bf16_full_eval`: False
|
341 |
+
- `fp16_full_eval`: False
|
342 |
+
- `tf32`: None
|
343 |
+
- `local_rank`: 0
|
344 |
+
- `ddp_backend`: None
|
345 |
+
- `tpu_num_cores`: None
|
346 |
+
- `tpu_metrics_debug`: False
|
347 |
+
- `debug`: []
|
348 |
+
- `dataloader_drop_last`: False
|
349 |
+
- `dataloader_num_workers`: 0
|
350 |
+
- `dataloader_prefetch_factor`: None
|
351 |
+
- `past_index`: -1
|
352 |
+
- `disable_tqdm`: False
|
353 |
+
- `remove_unused_columns`: True
|
354 |
+
- `label_names`: None
|
355 |
+
- `load_best_model_at_end`: False
|
356 |
+
- `ignore_data_skip`: False
|
357 |
+
- `fsdp`: []
|
358 |
+
- `fsdp_min_num_params`: 0
|
359 |
+
- `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
|
360 |
+
- `fsdp_transformer_layer_cls_to_wrap`: None
|
361 |
+
- `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
|
362 |
+
- `deepspeed`: None
|
363 |
+
- `label_smoothing_factor`: 0.0
|
364 |
+
- `optim`: adamw_torch
|
365 |
+
- `optim_args`: None
|
366 |
+
- `adafactor`: False
|
367 |
+
- `group_by_length`: False
|
368 |
+
- `length_column_name`: length
|
369 |
+
- `ddp_find_unused_parameters`: None
|
370 |
+
- `ddp_bucket_cap_mb`: None
|
371 |
+
- `ddp_broadcast_buffers`: False
|
372 |
+
- `dataloader_pin_memory`: True
|
373 |
+
- `dataloader_persistent_workers`: False
|
374 |
+
- `skip_memory_metrics`: True
|
375 |
+
- `use_legacy_prediction_loop`: False
|
376 |
+
- `push_to_hub`: False
|
377 |
+
- `resume_from_checkpoint`: None
|
378 |
+
- `hub_model_id`: None
|
379 |
+
- `hub_strategy`: every_save
|
380 |
+
- `hub_private_repo`: False
|
381 |
+
- `hub_always_push`: False
|
382 |
+
- `gradient_checkpointing`: False
|
383 |
+
- `gradient_checkpointing_kwargs`: None
|
384 |
+
- `include_inputs_for_metrics`: False
|
385 |
+
- `eval_do_concat_batches`: True
|
386 |
+
- `fp16_backend`: auto
|
387 |
+
- `push_to_hub_model_id`: None
|
388 |
+
- `push_to_hub_organization`: None
|
389 |
+
- `mp_parameters`:
|
390 |
+
- `auto_find_batch_size`: False
|
391 |
+
- `full_determinism`: False
|
392 |
+
- `torchdynamo`: None
|
393 |
+
- `ray_scope`: last
|
394 |
+
- `ddp_timeout`: 1800
|
395 |
+
- `torch_compile`: False
|
396 |
+
- `torch_compile_backend`: None
|
397 |
+
- `torch_compile_mode`: None
|
398 |
+
- `dispatch_batches`: None
|
399 |
+
- `split_batches`: None
|
400 |
+
- `include_tokens_per_second`: False
|
401 |
+
- `include_num_input_tokens_seen`: False
|
402 |
+
- `neftune_noise_alpha`: None
|
403 |
+
- `optim_target_modules`: None
|
404 |
+
- `batch_eval_metrics`: False
|
405 |
+
- `eval_on_start`: False
|
406 |
+
- `eval_use_gather_object`: False
|
407 |
+
- `batch_sampler`: no_duplicates
|
408 |
+
- `multi_dataset_batch_sampler`: proportional
|
409 |
+
|
410 |
+
</details>
|
411 |
+
|
412 |
+
### Training Logs
|
413 |
+
| Epoch | Step | Training Loss | loss | all-nli-dev_max_accuracy | all-nli-test_max_accuracy |
|
414 |
+
|:-----:|:----:|:-------------:|:------:|:------------------------:|:-------------------------:|
|
415 |
+
| 0 | 0 | - | - | 0.6832 | - |
|
416 |
+
| 0.016 | 100 | 3.0282 | 1.5782 | 0.7752 | - |
|
417 |
+
| 0.032 | 200 | 1.2529 | 0.9154 | 0.7991 | - |
|
418 |
+
| 0.048 | 300 | 1.4472 | 0.7901 | 0.8103 | - |
|
419 |
+
| 0.064 | 400 | 0.9059 | 0.7468 | 0.8114 | - |
|
420 |
+
| 0.08 | 500 | 0.8663 | 0.8423 | 0.7981 | - |
|
421 |
+
| 0.096 | 600 | 1.0836 | 0.8995 | 0.8010 | - |
|
422 |
+
| 0.112 | 700 | 0.9315 | 0.8971 | 0.8100 | - |
|
423 |
+
| 0.128 | 800 | 1.1273 | 0.9654 | 0.8012 | - |
|
424 |
+
| 0.144 | 900 | 1.1194 | 0.9318 | 0.8303 | - |
|
425 |
+
| 0.16 | 1000 | 1.0911 | 0.9048 | 0.8038 | - |
|
426 |
+
| 0.176 | 1100 | 1.1332 | 0.9340 | 0.8039 | - |
|
427 |
+
| 0.192 | 1200 | 1.0154 | 0.9041 | 0.8076 | - |
|
428 |
+
| 0.208 | 1300 | 0.7995 | 0.9301 | 0.7959 | - |
|
429 |
+
| 0.224 | 1400 | 0.7614 | 0.8275 | 0.8071 | - |
|
430 |
+
| 0.24 | 1500 | 0.8724 | 0.7973 | 0.8173 | - |
|
431 |
+
| 0.256 | 1600 | 0.6751 | 0.7916 | 0.8197 | - |
|
432 |
+
| 0.272 | 1700 | 0.8933 | 0.8572 | 0.8194 | - |
|
433 |
+
| 0.288 | 1800 | 0.8585 | 0.8560 | 0.8056 | - |
|
434 |
+
| 0.304 | 1900 | 0.8354 | 0.7987 | 0.8123 | - |
|
435 |
+
| 0.32 | 2000 | 0.7484 | 0.7559 | 0.8348 | - |
|
436 |
+
| 0.336 | 2100 | 0.6047 | 0.7532 | 0.8471 | - |
|
437 |
+
| 0.352 | 2200 | 0.6221 | 0.6956 | 0.8665 | - |
|
438 |
+
| 0.368 | 2300 | 0.8332 | 0.7214 | 0.8542 | - |
|
439 |
+
| 0.384 | 2400 | 0.7755 | 0.7007 | 0.8481 | - |
|
440 |
+
| 0.4 | 2500 | 0.6912 | 0.7505 | 0.8499 | - |
|
441 |
+
| 0.416 | 2600 | 0.6169 | 0.6536 | 0.8591 | - |
|
442 |
+
| 0.432 | 2700 | 0.8907 | 0.7240 | 0.8560 | - |
|
443 |
+
| 0.448 | 2800 | 0.8576 | 0.6790 | 0.8499 | - |
|
444 |
+
| 0.464 | 2900 | 0.8057 | 0.6870 | 0.8575 | - |
|
445 |
+
| 0.48 | 3000 | 0.6928 | 0.6540 | 0.8641 | - |
|
446 |
+
| 0.496 | 3100 | 0.7566 | 0.6419 | 0.8682 | - |
|
447 |
+
| 0.512 | 3200 | 0.5757 | 0.6109 | 0.8783 | - |
|
448 |
+
| 0.528 | 3300 | 0.601 | 0.5481 | 0.8914 | - |
|
449 |
+
| 0.544 | 3400 | 0.5105 | 0.5853 | 0.8820 | - |
|
450 |
+
| 0.56 | 3500 | 0.5116 | 0.5918 | 0.8961 | - |
|
451 |
+
| 0.576 | 3600 | 0.495 | 0.5546 | 0.8897 | - |
|
452 |
+
| 0.592 | 3700 | 0.5585 | 0.5457 | 0.8970 | - |
|
453 |
+
| 0.608 | 3800 | 0.4778 | 0.5056 | 0.9020 | - |
|
454 |
+
| 0.624 | 3900 | 0.5116 | 0.5203 | 0.9019 | - |
|
455 |
+
| 0.64 | 4000 | 0.753 | 0.5490 | 0.9019 | - |
|
456 |
+
| 0.656 | 4100 | 0.9207 | 0.5447 | 0.9049 | - |
|
457 |
+
| 0.672 | 4200 | 0.8695 | 0.4996 | 0.9055 | - |
|
458 |
+
| 0.688 | 4300 | 0.6867 | 0.4825 | 0.9107 | - |
|
459 |
+
| 0.704 | 4400 | 0.5961 | 0.4670 | 0.9166 | - |
|
460 |
+
| 0.72 | 4500 | 0.5547 | 0.4748 | 0.9104 | - |
|
461 |
+
| 0.736 | 4600 | 0.6145 | 0.4636 | 0.9145 | - |
|
462 |
+
| 0.752 | 4700 | 0.6643 | 0.4806 | 0.9128 | - |
|
463 |
+
| 0.768 | 4800 | 0.6134 | 0.4521 | 0.9110 | - |
|
464 |
+
| 0.784 | 4900 | 0.5847 | 0.4627 | 0.9080 | - |
|
465 |
+
| 0.8 | 5000 | 0.6482 | 0.4853 | 0.9107 | - |
|
466 |
+
| 0.816 | 5100 | 0.5103 | 0.4374 | 0.9104 | - |
|
467 |
+
| 0.832 | 5200 | 0.5639 | 0.4306 | 0.9089 | - |
|
468 |
+
| 0.848 | 5300 | 0.5247 | 0.4418 | 0.9116 | - |
|
469 |
+
| 0.864 | 5400 | 0.6094 | 0.4564 | 0.9101 | - |
|
470 |
+
| 0.88 | 5500 | 0.5296 | 0.4394 | 0.9092 | - |
|
471 |
+
| 0.896 | 5600 | 0.5469 | 0.4316 | 0.9101 | - |
|
472 |
+
| 0.912 | 5700 | 0.6061 | 0.4258 | 0.9124 | - |
|
473 |
+
| 0.928 | 5800 | 0.5456 | 0.4167 | 0.9113 | - |
|
474 |
+
| 0.944 | 5900 | 0.6776 | 0.4168 | 0.9108 | - |
|
475 |
+
| 0.96 | 6000 | 0.7401 | 0.4267 | 0.9139 | - |
|
476 |
+
| 0.976 | 6100 | 0.6568 | 0.4227 | 0.9140 | - |
|
477 |
+
| 0.992 | 6200 | 0.0002 | 0.4224 | 0.9142 | - |
|
478 |
+
| 1.0 | 6250 | - | - | - | 0.9265 |
|
479 |
+
|
480 |
+
|
481 |
+
### Framework Versions
|
482 |
+
- Python: 3.12.4
|
483 |
+
- Sentence Transformers: 3.1.0
|
484 |
+
- Transformers: 4.44.2
|
485 |
+
- PyTorch: 2.4.1
|
486 |
+
- Accelerate: 0.34.2
|
487 |
+
- Datasets: 3.0.0
|
488 |
+
- Tokenizers: 0.19.1
|
489 |
+
|
490 |
+
## Citation
|
491 |
+
|
492 |
+
### BibTeX
|
493 |
+
|
494 |
+
#### Sentence Transformers
|
495 |
+
```bibtex
|
496 |
+
@inproceedings{reimers-2019-sentence-bert,
|
497 |
+
title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
|
498 |
+
author = "Reimers, Nils and Gurevych, Iryna",
|
499 |
+
booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
|
500 |
+
month = "11",
|
501 |
+
year = "2019",
|
502 |
+
publisher = "Association for Computational Linguistics",
|
503 |
+
url = "https://arxiv.org/abs/1908.10084",
|
504 |
+
}
|
505 |
+
```
|
506 |
+
|
507 |
+
#### MultipleNegativesRankingLoss
|
508 |
+
```bibtex
|
509 |
+
@misc{henderson2017efficient,
|
510 |
+
title={Efficient Natural Language Response Suggestion for Smart Reply},
|
511 |
+
author={Matthew Henderson and Rami Al-Rfou and Brian Strope and Yun-hsuan Sung and Laszlo Lukacs and Ruiqi Guo and Sanjiv Kumar and Balint Miklos and Ray Kurzweil},
|
512 |
+
year={2017},
|
513 |
+
eprint={1705.00652},
|
514 |
+
archivePrefix={arXiv},
|
515 |
+
primaryClass={cs.CL}
|
516 |
+
}
|
517 |
+
```
|
518 |
+
|
519 |
+
<!--
|
520 |
+
## Glossary
|
521 |
+
|
522 |
+
*Clearly define terms in order to be accessible across audiences.*
|
523 |
+
-->
|
524 |
+
|
525 |
+
<!--
|
526 |
+
## Model Card Authors
|
527 |
+
|
528 |
+
*Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
|
529 |
+
-->
|
530 |
+
|
531 |
+
<!--
|
532 |
+
## Model Card Contact
|
533 |
+
|
534 |
+
*Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
|
535 |
+
-->
|
config.json
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_name_or_path": "microsoft/mpnet-base",
|
3 |
+
"architectures": [
|
4 |
+
"MPNetModel"
|
5 |
+
],
|
6 |
+
"attention_probs_dropout_prob": 0.1,
|
7 |
+
"bos_token_id": 0,
|
8 |
+
"eos_token_id": 2,
|
9 |
+
"hidden_act": "gelu",
|
10 |
+
"hidden_dropout_prob": 0.1,
|
11 |
+
"hidden_size": 768,
|
12 |
+
"initializer_range": 0.02,
|
13 |
+
"intermediate_size": 3072,
|
14 |
+
"layer_norm_eps": 1e-05,
|
15 |
+
"max_position_embeddings": 514,
|
16 |
+
"model_type": "mpnet",
|
17 |
+
"num_attention_heads": 12,
|
18 |
+
"num_hidden_layers": 12,
|
19 |
+
"pad_token_id": 1,
|
20 |
+
"relative_attention_num_buckets": 32,
|
21 |
+
"torch_dtype": "float32",
|
22 |
+
"transformers_version": "4.44.2",
|
23 |
+
"vocab_size": 30527
|
24 |
+
}
|
config_sentence_transformers.json
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"__version__": {
|
3 |
+
"sentence_transformers": "3.1.0",
|
4 |
+
"transformers": "4.44.2",
|
5 |
+
"pytorch": "2.4.1"
|
6 |
+
},
|
7 |
+
"prompts": {},
|
8 |
+
"default_prompt_name": null,
|
9 |
+
"similarity_fn_name": null
|
10 |
+
}
|
model.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:f5391c4f06529607d793c73cc74f50a7925c969fe9dedb3f43d0292fab4d2cc0
|
3 |
+
size 437967672
|
modules.json
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
[
|
2 |
+
{
|
3 |
+
"idx": 0,
|
4 |
+
"name": "0",
|
5 |
+
"path": "",
|
6 |
+
"type": "sentence_transformers.models.Transformer"
|
7 |
+
},
|
8 |
+
{
|
9 |
+
"idx": 1,
|
10 |
+
"name": "1",
|
11 |
+
"path": "1_Pooling",
|
12 |
+
"type": "sentence_transformers.models.Pooling"
|
13 |
+
}
|
14 |
+
]
|
sentence_bert_config.json
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"max_seq_length": 512,
|
3 |
+
"do_lower_case": false
|
4 |
+
}
|
special_tokens_map.json
ADDED
@@ -0,0 +1,51 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"bos_token": {
|
3 |
+
"content": "<s>",
|
4 |
+
"lstrip": false,
|
5 |
+
"normalized": false,
|
6 |
+
"rstrip": false,
|
7 |
+
"single_word": false
|
8 |
+
},
|
9 |
+
"cls_token": {
|
10 |
+
"content": "<s>",
|
11 |
+
"lstrip": false,
|
12 |
+
"normalized": true,
|
13 |
+
"rstrip": false,
|
14 |
+
"single_word": false
|
15 |
+
},
|
16 |
+
"eos_token": {
|
17 |
+
"content": "</s>",
|
18 |
+
"lstrip": false,
|
19 |
+
"normalized": false,
|
20 |
+
"rstrip": false,
|
21 |
+
"single_word": false
|
22 |
+
},
|
23 |
+
"mask_token": {
|
24 |
+
"content": "<mask>",
|
25 |
+
"lstrip": true,
|
26 |
+
"normalized": false,
|
27 |
+
"rstrip": false,
|
28 |
+
"single_word": false
|
29 |
+
},
|
30 |
+
"pad_token": {
|
31 |
+
"content": "<pad>",
|
32 |
+
"lstrip": false,
|
33 |
+
"normalized": false,
|
34 |
+
"rstrip": false,
|
35 |
+
"single_word": false
|
36 |
+
},
|
37 |
+
"sep_token": {
|
38 |
+
"content": "</s>",
|
39 |
+
"lstrip": false,
|
40 |
+
"normalized": true,
|
41 |
+
"rstrip": false,
|
42 |
+
"single_word": false
|
43 |
+
},
|
44 |
+
"unk_token": {
|
45 |
+
"content": "[UNK]",
|
46 |
+
"lstrip": false,
|
47 |
+
"normalized": false,
|
48 |
+
"rstrip": false,
|
49 |
+
"single_word": false
|
50 |
+
}
|
51 |
+
}
|
tokenizer.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|
tokenizer_config.json
ADDED
@@ -0,0 +1,65 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"added_tokens_decoder": {
|
3 |
+
"0": {
|
4 |
+
"content": "<s>",
|
5 |
+
"lstrip": false,
|
6 |
+
"normalized": false,
|
7 |
+
"rstrip": false,
|
8 |
+
"single_word": false,
|
9 |
+
"special": true
|
10 |
+
},
|
11 |
+
"1": {
|
12 |
+
"content": "<pad>",
|
13 |
+
"lstrip": false,
|
14 |
+
"normalized": false,
|
15 |
+
"rstrip": false,
|
16 |
+
"single_word": false,
|
17 |
+
"special": true
|
18 |
+
},
|
19 |
+
"2": {
|
20 |
+
"content": "</s>",
|
21 |
+
"lstrip": false,
|
22 |
+
"normalized": false,
|
23 |
+
"rstrip": false,
|
24 |
+
"single_word": false,
|
25 |
+
"special": true
|
26 |
+
},
|
27 |
+
"3": {
|
28 |
+
"content": "<unk>",
|
29 |
+
"lstrip": false,
|
30 |
+
"normalized": true,
|
31 |
+
"rstrip": false,
|
32 |
+
"single_word": false,
|
33 |
+
"special": true
|
34 |
+
},
|
35 |
+
"104": {
|
36 |
+
"content": "[UNK]",
|
37 |
+
"lstrip": false,
|
38 |
+
"normalized": false,
|
39 |
+
"rstrip": false,
|
40 |
+
"single_word": false,
|
41 |
+
"special": true
|
42 |
+
},
|
43 |
+
"30526": {
|
44 |
+
"content": "<mask>",
|
45 |
+
"lstrip": true,
|
46 |
+
"normalized": false,
|
47 |
+
"rstrip": false,
|
48 |
+
"single_word": false,
|
49 |
+
"special": true
|
50 |
+
}
|
51 |
+
},
|
52 |
+
"bos_token": "<s>",
|
53 |
+
"clean_up_tokenization_spaces": true,
|
54 |
+
"cls_token": "<s>",
|
55 |
+
"do_lower_case": true,
|
56 |
+
"eos_token": "</s>",
|
57 |
+
"mask_token": "<mask>",
|
58 |
+
"model_max_length": 512,
|
59 |
+
"pad_token": "<pad>",
|
60 |
+
"sep_token": "</s>",
|
61 |
+
"strip_accents": null,
|
62 |
+
"tokenize_chinese_chars": true,
|
63 |
+
"tokenizer_class": "MPNetTokenizer",
|
64 |
+
"unk_token": "[UNK]"
|
65 |
+
}
|
vocab.txt
ADDED
The diff for this file is too large to render.
See raw diff
|
|