Add new SentenceTransformer model.
Browse files- 1_Pooling/config.json +10 -0
- README.md +476 -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,476 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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:100000
|
22 |
+
- loss:MultipleNegativesRankingLoss
|
23 |
+
widget:
|
24 |
+
- source_sentence: People on bicycles waiting at an intersection.
|
25 |
+
sentences:
|
26 |
+
- More than one person on a bicycle is obeying traffic laws.
|
27 |
+
- The people are on skateboards.
|
28 |
+
- People waiting at a light on bikes.
|
29 |
+
- source_sentence: A dog is in the water.
|
30 |
+
sentences:
|
31 |
+
- A white dog with brown spots standing in water.
|
32 |
+
- A woman in a white outfit holds her purse while on a crowded bus.
|
33 |
+
- A wakeboarder is traveling across the water behind a ramp.
|
34 |
+
- source_sentence: The people are sleeping.
|
35 |
+
sentences:
|
36 |
+
- A man and young boy asleep in a chair.
|
37 |
+
- A father and his son cuddle while sleeping.
|
38 |
+
- Several people are sitting on the back of a truck outside.
|
39 |
+
- source_sentence: A dog is swimming.
|
40 |
+
sentences:
|
41 |
+
- A brown god relaxes on a brick sidewalk.
|
42 |
+
- The furry brown dog is swimming in the ocean.
|
43 |
+
- a black dog swimming in the water with a tennis ball in his mouth
|
44 |
+
- source_sentence: A dog is swimming.
|
45 |
+
sentences:
|
46 |
+
- A woman in all black throws a football indoors while man looks at his cellphone
|
47 |
+
in the background.
|
48 |
+
- A white dog with a stick in his mouth standing next to a black dog.
|
49 |
+
- A dog with yellow fur swims, neck deep, in water.
|
50 |
+
model-index:
|
51 |
+
- name: MPNet base trained on AllNLI triplets
|
52 |
+
results:
|
53 |
+
- task:
|
54 |
+
type: triplet
|
55 |
+
name: Triplet
|
56 |
+
dataset:
|
57 |
+
name: all nli dev
|
58 |
+
type: all-nli-dev
|
59 |
+
metrics:
|
60 |
+
- type: cosine_accuracy
|
61 |
+
value: 0.9059842041312273
|
62 |
+
name: Cosine Accuracy
|
63 |
+
- type: dot_accuracy
|
64 |
+
value: 0.09386391251518833
|
65 |
+
name: Dot Accuracy
|
66 |
+
- type: manhattan_accuracy
|
67 |
+
value: 0.900820170109356
|
68 |
+
name: Manhattan Accuracy
|
69 |
+
- type: euclidean_accuracy
|
70 |
+
value: 0.9017314702308628
|
71 |
+
name: Euclidean Accuracy
|
72 |
+
- type: max_accuracy
|
73 |
+
value: 0.9059842041312273
|
74 |
+
name: Max Accuracy
|
75 |
+
- task:
|
76 |
+
type: triplet
|
77 |
+
name: Triplet
|
78 |
+
dataset:
|
79 |
+
name: all nli test
|
80 |
+
type: all-nli-test
|
81 |
+
metrics:
|
82 |
+
- type: cosine_accuracy
|
83 |
+
value: 0.9185958541382963
|
84 |
+
name: Cosine Accuracy
|
85 |
+
- type: dot_accuracy
|
86 |
+
value: 0.08019367529126949
|
87 |
+
name: Dot Accuracy
|
88 |
+
- type: manhattan_accuracy
|
89 |
+
value: 0.9142078983204721
|
90 |
+
name: Manhattan Accuracy
|
91 |
+
- type: euclidean_accuracy
|
92 |
+
value: 0.9142078983204721
|
93 |
+
name: Euclidean Accuracy
|
94 |
+
- type: max_accuracy
|
95 |
+
value: 0.9185958541382963
|
96 |
+
name: Max Accuracy
|
97 |
+
---
|
98 |
+
|
99 |
+
# MPNet base trained on AllNLI triplets
|
100 |
+
|
101 |
+
This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [microsoft/mpnet-base](https://huggingface.co/microsoft/mpnet-base) on the [sentence-transformers/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.
|
102 |
+
|
103 |
+
## Model Details
|
104 |
+
|
105 |
+
### Model Description
|
106 |
+
- **Model Type:** Sentence Transformer
|
107 |
+
- **Base model:** [microsoft/mpnet-base](https://huggingface.co/microsoft/mpnet-base) <!-- at revision 6996ce1e91bd2a9c7d7f61daec37463394f73f09 -->
|
108 |
+
- **Maximum Sequence Length:** 512 tokens
|
109 |
+
- **Output Dimensionality:** 768 tokens
|
110 |
+
- **Similarity Function:** Cosine Similarity
|
111 |
+
- **Training Dataset:**
|
112 |
+
- [sentence-transformers/all-nli](https://huggingface.co/datasets/sentence-transformers/all-nli)
|
113 |
+
- **Language:** en
|
114 |
+
- **License:** apache-2.0
|
115 |
+
|
116 |
+
### Model Sources
|
117 |
+
|
118 |
+
- **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
|
119 |
+
- **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
|
120 |
+
- **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
|
121 |
+
|
122 |
+
### Full Model Architecture
|
123 |
+
|
124 |
+
```
|
125 |
+
SentenceTransformer(
|
126 |
+
(0): Transformer({'max_seq_length': 512, 'do_lower_case': False}) with Transformer model: MPNetModel
|
127 |
+
(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})
|
128 |
+
)
|
129 |
+
```
|
130 |
+
|
131 |
+
## Usage
|
132 |
+
|
133 |
+
### Direct Usage (Sentence Transformers)
|
134 |
+
|
135 |
+
First install the Sentence Transformers library:
|
136 |
+
|
137 |
+
```bash
|
138 |
+
pip install -U sentence-transformers
|
139 |
+
```
|
140 |
+
|
141 |
+
Then you can load this model and run inference.
|
142 |
+
```python
|
143 |
+
from sentence_transformers import SentenceTransformer
|
144 |
+
|
145 |
+
# Download from the 🤗 Hub
|
146 |
+
model = SentenceTransformer("korruz/mpnet-base-all-nli-triplet")
|
147 |
+
# Run inference
|
148 |
+
sentences = [
|
149 |
+
'A dog is swimming.',
|
150 |
+
'A dog with yellow fur swims, neck deep, in water.',
|
151 |
+
'A white dog with a stick in his mouth standing next to a black dog.',
|
152 |
+
]
|
153 |
+
embeddings = model.encode(sentences)
|
154 |
+
print(embeddings.shape)
|
155 |
+
# [3, 768]
|
156 |
+
|
157 |
+
# Get the similarity scores for the embeddings
|
158 |
+
similarities = model.similarity(embeddings, embeddings)
|
159 |
+
print(similarities.shape)
|
160 |
+
# [3, 3]
|
161 |
+
```
|
162 |
+
|
163 |
+
<!--
|
164 |
+
### Direct Usage (Transformers)
|
165 |
+
|
166 |
+
<details><summary>Click to see the direct usage in Transformers</summary>
|
167 |
+
|
168 |
+
</details>
|
169 |
+
-->
|
170 |
+
|
171 |
+
<!--
|
172 |
+
### Downstream Usage (Sentence Transformers)
|
173 |
+
|
174 |
+
You can finetune this model on your own dataset.
|
175 |
+
|
176 |
+
<details><summary>Click to expand</summary>
|
177 |
+
|
178 |
+
</details>
|
179 |
+
-->
|
180 |
+
|
181 |
+
<!--
|
182 |
+
### Out-of-Scope Use
|
183 |
+
|
184 |
+
*List how the model may foreseeably be misused and address what users ought not to do with the model.*
|
185 |
+
-->
|
186 |
+
|
187 |
+
## Evaluation
|
188 |
+
|
189 |
+
### Metrics
|
190 |
+
|
191 |
+
#### Triplet
|
192 |
+
* Dataset: `all-nli-dev`
|
193 |
+
* Evaluated with [<code>TripletEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.TripletEvaluator)
|
194 |
+
|
195 |
+
| Metric | Value |
|
196 |
+
|:-------------------|:----------|
|
197 |
+
| cosine_accuracy | 0.906 |
|
198 |
+
| dot_accuracy | 0.0939 |
|
199 |
+
| manhattan_accuracy | 0.9008 |
|
200 |
+
| euclidean_accuracy | 0.9017 |
|
201 |
+
| **max_accuracy** | **0.906** |
|
202 |
+
|
203 |
+
#### Triplet
|
204 |
+
* Dataset: `all-nli-test`
|
205 |
+
* Evaluated with [<code>TripletEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.TripletEvaluator)
|
206 |
+
|
207 |
+
| Metric | Value |
|
208 |
+
|:-------------------|:-----------|
|
209 |
+
| cosine_accuracy | 0.9186 |
|
210 |
+
| dot_accuracy | 0.0802 |
|
211 |
+
| manhattan_accuracy | 0.9142 |
|
212 |
+
| euclidean_accuracy | 0.9142 |
|
213 |
+
| **max_accuracy** | **0.9186** |
|
214 |
+
|
215 |
+
<!--
|
216 |
+
## Bias, Risks and Limitations
|
217 |
+
|
218 |
+
*What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
|
219 |
+
-->
|
220 |
+
|
221 |
+
<!--
|
222 |
+
### Recommendations
|
223 |
+
|
224 |
+
*What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
|
225 |
+
-->
|
226 |
+
|
227 |
+
## Training Details
|
228 |
+
|
229 |
+
### Training Dataset
|
230 |
+
|
231 |
+
#### sentence-transformers/all-nli
|
232 |
+
|
233 |
+
* Dataset: [sentence-transformers/all-nli](https://huggingface.co/datasets/sentence-transformers/all-nli) at [d482672](https://huggingface.co/datasets/sentence-transformers/all-nli/tree/d482672c8e74ce18da116f430137434ba2e52fab)
|
234 |
+
* Size: 100,000 training samples
|
235 |
+
* Columns: <code>anchor</code>, <code>positive</code>, and <code>negative</code>
|
236 |
+
* Approximate statistics based on the first 1000 samples:
|
237 |
+
| | anchor | positive | negative |
|
238 |
+
|:--------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|:---------------------------------------------------------------------------------|
|
239 |
+
| type | string | string | string |
|
240 |
+
| 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> |
|
241 |
+
* Samples:
|
242 |
+
| anchor | positive | negative |
|
243 |
+
|:---------------------------------------------------------------------------|:-------------------------------------------------|:-----------------------------------------------------------|
|
244 |
+
| <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> |
|
245 |
+
| <code>Children smiling and waving at camera</code> | <code>There are children present</code> | <code>The kids are frowning</code> |
|
246 |
+
| <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> |
|
247 |
+
* Loss: [<code>MultipleNegativesRankingLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#multiplenegativesrankingloss) with these parameters:
|
248 |
+
```json
|
249 |
+
{
|
250 |
+
"scale": 20.0,
|
251 |
+
"similarity_fct": "cos_sim"
|
252 |
+
}
|
253 |
+
```
|
254 |
+
|
255 |
+
### Training Hyperparameters
|
256 |
+
#### Non-Default Hyperparameters
|
257 |
+
|
258 |
+
- `eval_strategy`: steps
|
259 |
+
- `per_device_train_batch_size`: 16
|
260 |
+
- `per_device_eval_batch_size`: 16
|
261 |
+
- `learning_rate`: 2e-05
|
262 |
+
- `num_train_epochs`: 1
|
263 |
+
- `warmup_ratio`: 0.1
|
264 |
+
- `fp16`: True
|
265 |
+
- `batch_sampler`: no_duplicates
|
266 |
+
|
267 |
+
#### All Hyperparameters
|
268 |
+
<details><summary>Click to expand</summary>
|
269 |
+
|
270 |
+
- `overwrite_output_dir`: False
|
271 |
+
- `do_predict`: False
|
272 |
+
- `eval_strategy`: steps
|
273 |
+
- `prediction_loss_only`: True
|
274 |
+
- `per_device_train_batch_size`: 16
|
275 |
+
- `per_device_eval_batch_size`: 16
|
276 |
+
- `per_gpu_train_batch_size`: None
|
277 |
+
- `per_gpu_eval_batch_size`: None
|
278 |
+
- `gradient_accumulation_steps`: 1
|
279 |
+
- `eval_accumulation_steps`: None
|
280 |
+
- `torch_empty_cache_steps`: None
|
281 |
+
- `learning_rate`: 2e-05
|
282 |
+
- `weight_decay`: 0.0
|
283 |
+
- `adam_beta1`: 0.9
|
284 |
+
- `adam_beta2`: 0.999
|
285 |
+
- `adam_epsilon`: 1e-08
|
286 |
+
- `max_grad_norm`: 1.0
|
287 |
+
- `num_train_epochs`: 1
|
288 |
+
- `max_steps`: -1
|
289 |
+
- `lr_scheduler_type`: linear
|
290 |
+
- `lr_scheduler_kwargs`: {}
|
291 |
+
- `warmup_ratio`: 0.1
|
292 |
+
- `warmup_steps`: 0
|
293 |
+
- `log_level`: passive
|
294 |
+
- `log_level_replica`: warning
|
295 |
+
- `log_on_each_node`: True
|
296 |
+
- `logging_nan_inf_filter`: True
|
297 |
+
- `save_safetensors`: True
|
298 |
+
- `save_on_each_node`: False
|
299 |
+
- `save_only_model`: False
|
300 |
+
- `restore_callback_states_from_checkpoint`: False
|
301 |
+
- `no_cuda`: False
|
302 |
+
- `use_cpu`: False
|
303 |
+
- `use_mps_device`: False
|
304 |
+
- `seed`: 42
|
305 |
+
- `data_seed`: None
|
306 |
+
- `jit_mode_eval`: False
|
307 |
+
- `use_ipex`: False
|
308 |
+
- `bf16`: False
|
309 |
+
- `fp16`: True
|
310 |
+
- `fp16_opt_level`: O1
|
311 |
+
- `half_precision_backend`: auto
|
312 |
+
- `bf16_full_eval`: False
|
313 |
+
- `fp16_full_eval`: False
|
314 |
+
- `tf32`: None
|
315 |
+
- `local_rank`: 0
|
316 |
+
- `ddp_backend`: None
|
317 |
+
- `tpu_num_cores`: None
|
318 |
+
- `tpu_metrics_debug`: False
|
319 |
+
- `debug`: []
|
320 |
+
- `dataloader_drop_last`: False
|
321 |
+
- `dataloader_num_workers`: 0
|
322 |
+
- `dataloader_prefetch_factor`: None
|
323 |
+
- `past_index`: -1
|
324 |
+
- `disable_tqdm`: False
|
325 |
+
- `remove_unused_columns`: True
|
326 |
+
- `label_names`: None
|
327 |
+
- `load_best_model_at_end`: False
|
328 |
+
- `ignore_data_skip`: False
|
329 |
+
- `fsdp`: []
|
330 |
+
- `fsdp_min_num_params`: 0
|
331 |
+
- `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
|
332 |
+
- `fsdp_transformer_layer_cls_to_wrap`: None
|
333 |
+
- `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
|
334 |
+
- `deepspeed`: None
|
335 |
+
- `label_smoothing_factor`: 0.0
|
336 |
+
- `optim`: adamw_torch
|
337 |
+
- `optim_args`: None
|
338 |
+
- `adafactor`: False
|
339 |
+
- `group_by_length`: False
|
340 |
+
- `length_column_name`: length
|
341 |
+
- `ddp_find_unused_parameters`: None
|
342 |
+
- `ddp_bucket_cap_mb`: None
|
343 |
+
- `ddp_broadcast_buffers`: False
|
344 |
+
- `dataloader_pin_memory`: True
|
345 |
+
- `dataloader_persistent_workers`: False
|
346 |
+
- `skip_memory_metrics`: True
|
347 |
+
- `use_legacy_prediction_loop`: False
|
348 |
+
- `push_to_hub`: False
|
349 |
+
- `resume_from_checkpoint`: None
|
350 |
+
- `hub_model_id`: None
|
351 |
+
- `hub_strategy`: every_save
|
352 |
+
- `hub_private_repo`: False
|
353 |
+
- `hub_always_push`: False
|
354 |
+
- `gradient_checkpointing`: False
|
355 |
+
- `gradient_checkpointing_kwargs`: None
|
356 |
+
- `include_inputs_for_metrics`: False
|
357 |
+
- `eval_do_concat_batches`: True
|
358 |
+
- `fp16_backend`: auto
|
359 |
+
- `push_to_hub_model_id`: None
|
360 |
+
- `push_to_hub_organization`: None
|
361 |
+
- `mp_parameters`:
|
362 |
+
- `auto_find_batch_size`: False
|
363 |
+
- `full_determinism`: False
|
364 |
+
- `torchdynamo`: None
|
365 |
+
- `ray_scope`: last
|
366 |
+
- `ddp_timeout`: 1800
|
367 |
+
- `torch_compile`: False
|
368 |
+
- `torch_compile_backend`: None
|
369 |
+
- `torch_compile_mode`: None
|
370 |
+
- `dispatch_batches`: None
|
371 |
+
- `split_batches`: None
|
372 |
+
- `include_tokens_per_second`: False
|
373 |
+
- `include_num_input_tokens_seen`: False
|
374 |
+
- `neftune_noise_alpha`: None
|
375 |
+
- `optim_target_modules`: None
|
376 |
+
- `batch_eval_metrics`: False
|
377 |
+
- `eval_on_start`: False
|
378 |
+
- `eval_use_gather_object`: False
|
379 |
+
- `batch_sampler`: no_duplicates
|
380 |
+
- `multi_dataset_batch_sampler`: proportional
|
381 |
+
|
382 |
+
</details>
|
383 |
+
|
384 |
+
### Training Logs
|
385 |
+
| Epoch | Step | Training Loss | all-nli-dev_max_accuracy | all-nli-test_max_accuracy |
|
386 |
+
|:-----:|:----:|:-------------:|:------------------------:|:-------------------------:|
|
387 |
+
| 0 | 0 | - | 0.6832 | - |
|
388 |
+
| 0.032 | 100 | 3.2593 | 0.8010 | - |
|
389 |
+
| 0.064 | 200 | 1.318 | 0.8152 | - |
|
390 |
+
| 0.096 | 300 | 1.2552 | 0.8256 | - |
|
391 |
+
| 0.128 | 400 | 1.3322 | 0.8141 | - |
|
392 |
+
| 0.16 | 500 | 1.4141 | 0.8224 | - |
|
393 |
+
| 0.192 | 600 | 1.2339 | 0.8149 | - |
|
394 |
+
| 0.224 | 700 | 1.2556 | 0.8091 | - |
|
395 |
+
| 0.256 | 800 | 1.138 | 0.8262 | - |
|
396 |
+
| 0.288 | 900 | 1.0928 | 0.8311 | - |
|
397 |
+
| 0.32 | 1000 | 1.0438 | 0.8341 | - |
|
398 |
+
| 0.352 | 1100 | 1.1159 | 0.8323 | - |
|
399 |
+
| 0.384 | 1200 | 1.1909 | 0.8472 | - |
|
400 |
+
| 0.416 | 1300 | 1.2542 | 0.8543 | - |
|
401 |
+
| 0.448 | 1400 | 1.2359 | 0.8574 | - |
|
402 |
+
| 0.48 | 1500 | 1.0265 | 0.8712 | - |
|
403 |
+
| 0.512 | 1600 | 0.8688 | 0.8783 | - |
|
404 |
+
| 0.544 | 1700 | 0.8819 | 0.8841 | - |
|
405 |
+
| 0.576 | 1800 | 0.8903 | 0.8931 | - |
|
406 |
+
| 0.608 | 1900 | 0.9334 | 0.8858 | - |
|
407 |
+
| 0.64 | 2000 | 1.0225 | 0.9028 | - |
|
408 |
+
| 0.672 | 2100 | 0.9252 | 0.9034 | - |
|
409 |
+
| 0.704 | 2200 | 0.9036 | 0.9033 | - |
|
410 |
+
| 0.736 | 2300 | 0.8122 | 0.9040 | - |
|
411 |
+
| 0.768 | 2400 | 0.8503 | 0.9058 | - |
|
412 |
+
| 0.8 | 2500 | 0.8448 | 0.9055 | - |
|
413 |
+
| 0.832 | 2600 | 0.7918 | 0.9039 | - |
|
414 |
+
| 0.864 | 2700 | 0.7787 | 0.9025 | - |
|
415 |
+
| 0.896 | 2800 | 0.8624 | 0.9034 | - |
|
416 |
+
| 0.928 | 2900 | 0.9513 | 0.9058 | - |
|
417 |
+
| 0.96 | 3000 | 0.6548 | 0.9072 | - |
|
418 |
+
| 0.992 | 3100 | 0.0163 | 0.9060 | - |
|
419 |
+
| 1.0 | 3125 | - | - | 0.9186 |
|
420 |
+
|
421 |
+
|
422 |
+
### Framework Versions
|
423 |
+
- Python: 3.10.12
|
424 |
+
- Sentence Transformers: 3.0.1
|
425 |
+
- Transformers: 4.44.2
|
426 |
+
- PyTorch: 2.4.0+cu121
|
427 |
+
- Accelerate: 0.33.0
|
428 |
+
- Datasets: 2.21.0
|
429 |
+
- Tokenizers: 0.19.1
|
430 |
+
|
431 |
+
## Citation
|
432 |
+
|
433 |
+
### BibTeX
|
434 |
+
|
435 |
+
#### Sentence Transformers
|
436 |
+
```bibtex
|
437 |
+
@inproceedings{reimers-2019-sentence-bert,
|
438 |
+
title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
|
439 |
+
author = "Reimers, Nils and Gurevych, Iryna",
|
440 |
+
booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
|
441 |
+
month = "11",
|
442 |
+
year = "2019",
|
443 |
+
publisher = "Association for Computational Linguistics",
|
444 |
+
url = "https://arxiv.org/abs/1908.10084",
|
445 |
+
}
|
446 |
+
```
|
447 |
+
|
448 |
+
#### MultipleNegativesRankingLoss
|
449 |
+
```bibtex
|
450 |
+
@misc{henderson2017efficient,
|
451 |
+
title={Efficient Natural Language Response Suggestion for Smart Reply},
|
452 |
+
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},
|
453 |
+
year={2017},
|
454 |
+
eprint={1705.00652},
|
455 |
+
archivePrefix={arXiv},
|
456 |
+
primaryClass={cs.CL}
|
457 |
+
}
|
458 |
+
```
|
459 |
+
|
460 |
+
<!--
|
461 |
+
## Glossary
|
462 |
+
|
463 |
+
*Clearly define terms in order to be accessible across audiences.*
|
464 |
+
-->
|
465 |
+
|
466 |
+
<!--
|
467 |
+
## Model Card Authors
|
468 |
+
|
469 |
+
*Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
|
470 |
+
-->
|
471 |
+
|
472 |
+
<!--
|
473 |
+
## Model Card Contact
|
474 |
+
|
475 |
+
*Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
|
476 |
+
-->
|
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.0.1",
|
4 |
+
"transformers": "4.44.2",
|
5 |
+
"pytorch": "2.4.0+cu121"
|
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:aeb694ed891951136dd79533b633871e4f08a5fc5a22cb83b56d841ca046377f
|
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
|
|