Add new SentenceTransformer model.
Browse files- 1_Pooling/config.json +10 -0
- README.md +472 -0
- config.json +24 -0
- config_sentence_transformers.json +10 -0
- model.safetensors +3 -0
- modules.json +20 -0
- sentence_bert_config.json +4 -0
- special_tokens_map.json +51 -0
- tokenizer.json +0 -0
- tokenizer_config.json +72 -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,472 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
base_model: sentence-transformers/all-mpnet-base-v2
|
3 |
+
datasets: []
|
4 |
+
language: []
|
5 |
+
library_name: sentence-transformers
|
6 |
+
metrics:
|
7 |
+
- pearson_cosine
|
8 |
+
- spearman_cosine
|
9 |
+
- pearson_manhattan
|
10 |
+
- spearman_manhattan
|
11 |
+
- pearson_euclidean
|
12 |
+
- spearman_euclidean
|
13 |
+
- pearson_dot
|
14 |
+
- spearman_dot
|
15 |
+
- pearson_max
|
16 |
+
- spearman_max
|
17 |
+
pipeline_tag: sentence-similarity
|
18 |
+
tags:
|
19 |
+
- sentence-transformers
|
20 |
+
- sentence-similarity
|
21 |
+
- feature-extraction
|
22 |
+
- generated_from_trainer
|
23 |
+
- dataset_size:13063
|
24 |
+
- loss:CosineSimilarityLoss
|
25 |
+
widget:
|
26 |
+
- source_sentence: I cant wait to leave Chicago
|
27 |
+
sentences:
|
28 |
+
- This is the shit Chicago needs to be recognized for not Keef
|
29 |
+
- is candice singing again tonight
|
30 |
+
- half time Chelsea were losing 10
|
31 |
+
- source_sentence: Andre miller best lobbing pg in the game
|
32 |
+
sentences:
|
33 |
+
- Am I the only one who dont get Amber alert
|
34 |
+
- Backstrom hurt in warmup Harding could start
|
35 |
+
- Andre miller is even slower in person
|
36 |
+
- source_sentence: Bayless couldve dunked that from the free throw
|
37 |
+
sentences:
|
38 |
+
- but what great finger roll by Bayless
|
39 |
+
- Wow Bayless has to make EspnSCTop with that end of 3rd
|
40 |
+
- i mean calum u didnt follow
|
41 |
+
- source_sentence: Backstrom Hurt in warmups Harding gets the start
|
42 |
+
sentences:
|
43 |
+
- Should I go to Nashville or Chicago for my 17th birthday
|
44 |
+
- I hate Chelsea possibly more than most
|
45 |
+
- Of course Backstrom would get injured during warmups
|
46 |
+
- source_sentence: Calum I love you plz follow me
|
47 |
+
sentences:
|
48 |
+
- CALUM PLEASE BE MY FIRST CELEBRITY TO FOLLOW ME
|
49 |
+
- Walking around downtown Chicago in a dress and listening to the new Iggy Pop
|
50 |
+
- I think Candice has what it takes to win American Idol AND Angie too
|
51 |
+
model-index:
|
52 |
+
- name: SentenceTransformer based on sentence-transformers/all-mpnet-base-v2
|
53 |
+
results:
|
54 |
+
- task:
|
55 |
+
type: semantic-similarity
|
56 |
+
name: Semantic Similarity
|
57 |
+
dataset:
|
58 |
+
name: Unknown
|
59 |
+
type: unknown
|
60 |
+
metrics:
|
61 |
+
- type: pearson_cosine
|
62 |
+
value: 0.6949485250178733
|
63 |
+
name: Pearson Cosine
|
64 |
+
- type: spearman_cosine
|
65 |
+
value: 0.6626359968437283
|
66 |
+
name: Spearman Cosine
|
67 |
+
- type: pearson_manhattan
|
68 |
+
value: 0.688092975176289
|
69 |
+
name: Pearson Manhattan
|
70 |
+
- type: spearman_manhattan
|
71 |
+
value: 0.6630998028133662
|
72 |
+
name: Spearman Manhattan
|
73 |
+
- type: pearson_euclidean
|
74 |
+
value: 0.6880277270034267
|
75 |
+
name: Pearson Euclidean
|
76 |
+
- type: spearman_euclidean
|
77 |
+
value: 0.6626358741747785
|
78 |
+
name: Spearman Euclidean
|
79 |
+
- type: pearson_dot
|
80 |
+
value: 0.694948520847878
|
81 |
+
name: Pearson Dot
|
82 |
+
- type: spearman_dot
|
83 |
+
value: 0.6626359082695851
|
84 |
+
name: Spearman Dot
|
85 |
+
- type: pearson_max
|
86 |
+
value: 0.6949485250178733
|
87 |
+
name: Pearson Max
|
88 |
+
- type: spearman_max
|
89 |
+
value: 0.6630998028133662
|
90 |
+
name: Spearman Max
|
91 |
+
---
|
92 |
+
|
93 |
+
# SentenceTransformer based on sentence-transformers/all-mpnet-base-v2
|
94 |
+
|
95 |
+
This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [sentence-transformers/all-mpnet-base-v2](https://huggingface.co/sentence-transformers/all-mpnet-base-v2). 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.
|
96 |
+
|
97 |
+
## Model Details
|
98 |
+
|
99 |
+
### Model Description
|
100 |
+
- **Model Type:** Sentence Transformer
|
101 |
+
- **Base model:** [sentence-transformers/all-mpnet-base-v2](https://huggingface.co/sentence-transformers/all-mpnet-base-v2) <!-- at revision 84f2bcc00d77236f9e89c8a360a00fb1139bf47d -->
|
102 |
+
- **Maximum Sequence Length:** 384 tokens
|
103 |
+
- **Output Dimensionality:** 768 tokens
|
104 |
+
- **Similarity Function:** Cosine Similarity
|
105 |
+
<!-- - **Training Dataset:** Unknown -->
|
106 |
+
<!-- - **Language:** Unknown -->
|
107 |
+
<!-- - **License:** Unknown -->
|
108 |
+
|
109 |
+
### Model Sources
|
110 |
+
|
111 |
+
- **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
|
112 |
+
- **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
|
113 |
+
- **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
|
114 |
+
|
115 |
+
### Full Model Architecture
|
116 |
+
|
117 |
+
```
|
118 |
+
SentenceTransformer(
|
119 |
+
(0): Transformer({'max_seq_length': 384, 'do_lower_case': False}) with Transformer model: MPNetModel
|
120 |
+
(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})
|
121 |
+
(2): Normalize()
|
122 |
+
)
|
123 |
+
```
|
124 |
+
|
125 |
+
## Usage
|
126 |
+
|
127 |
+
### Direct Usage (Sentence Transformers)
|
128 |
+
|
129 |
+
First install the Sentence Transformers library:
|
130 |
+
|
131 |
+
```bash
|
132 |
+
pip install -U sentence-transformers
|
133 |
+
```
|
134 |
+
|
135 |
+
Then you can load this model and run inference.
|
136 |
+
```python
|
137 |
+
from sentence_transformers import SentenceTransformer
|
138 |
+
|
139 |
+
# Download from the 🤗 Hub
|
140 |
+
model = SentenceTransformer("mspy/twitter-paraphrase-embeddings")
|
141 |
+
# Run inference
|
142 |
+
sentences = [
|
143 |
+
'Calum I love you plz follow me',
|
144 |
+
'CALUM PLEASE BE MY FIRST CELEBRITY TO FOLLOW ME',
|
145 |
+
'Walking around downtown Chicago in a dress and listening to the new Iggy Pop',
|
146 |
+
]
|
147 |
+
embeddings = model.encode(sentences)
|
148 |
+
print(embeddings.shape)
|
149 |
+
# [3, 768]
|
150 |
+
|
151 |
+
# Get the similarity scores for the embeddings
|
152 |
+
similarities = model.similarity(embeddings, embeddings)
|
153 |
+
print(similarities.shape)
|
154 |
+
# [3, 3]
|
155 |
+
```
|
156 |
+
|
157 |
+
<!--
|
158 |
+
### Direct Usage (Transformers)
|
159 |
+
|
160 |
+
<details><summary>Click to see the direct usage in Transformers</summary>
|
161 |
+
|
162 |
+
</details>
|
163 |
+
-->
|
164 |
+
|
165 |
+
<!--
|
166 |
+
### Downstream Usage (Sentence Transformers)
|
167 |
+
|
168 |
+
You can finetune this model on your own dataset.
|
169 |
+
|
170 |
+
<details><summary>Click to expand</summary>
|
171 |
+
|
172 |
+
</details>
|
173 |
+
-->
|
174 |
+
|
175 |
+
<!--
|
176 |
+
### Out-of-Scope Use
|
177 |
+
|
178 |
+
*List how the model may foreseeably be misused and address what users ought not to do with the model.*
|
179 |
+
-->
|
180 |
+
|
181 |
+
## Evaluation
|
182 |
+
|
183 |
+
### Metrics
|
184 |
+
|
185 |
+
#### Semantic Similarity
|
186 |
+
|
187 |
+
* Evaluated with [<code>EmbeddingSimilarityEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.EmbeddingSimilarityEvaluator)
|
188 |
+
|
189 |
+
| Metric | Value |
|
190 |
+
|:--------------------|:-----------|
|
191 |
+
| pearson_cosine | 0.6949 |
|
192 |
+
| **spearman_cosine** | **0.6626** |
|
193 |
+
| pearson_manhattan | 0.6881 |
|
194 |
+
| spearman_manhattan | 0.6631 |
|
195 |
+
| pearson_euclidean | 0.688 |
|
196 |
+
| spearman_euclidean | 0.6626 |
|
197 |
+
| pearson_dot | 0.6949 |
|
198 |
+
| spearman_dot | 0.6626 |
|
199 |
+
| pearson_max | 0.6949 |
|
200 |
+
| spearman_max | 0.6631 |
|
201 |
+
|
202 |
+
<!--
|
203 |
+
## Bias, Risks and Limitations
|
204 |
+
|
205 |
+
*What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
|
206 |
+
-->
|
207 |
+
|
208 |
+
<!--
|
209 |
+
### Recommendations
|
210 |
+
|
211 |
+
*What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
|
212 |
+
-->
|
213 |
+
|
214 |
+
## Training Details
|
215 |
+
|
216 |
+
### Training Dataset
|
217 |
+
|
218 |
+
#### Unnamed Dataset
|
219 |
+
|
220 |
+
|
221 |
+
* Size: 13,063 training samples
|
222 |
+
* Columns: <code>sentence1</code>, <code>sentence2</code>, and <code>label</code>
|
223 |
+
* Approximate statistics based on the first 1000 samples:
|
224 |
+
| | sentence1 | sentence2 | label |
|
225 |
+
|:--------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|:---------------------------------------------------------------|
|
226 |
+
| type | string | string | float |
|
227 |
+
| details | <ul><li>min: 7 tokens</li><li>mean: 11.16 tokens</li><li>max: 28 tokens</li></ul> | <ul><li>min: 7 tokens</li><li>mean: 12.31 tokens</li><li>max: 22 tokens</li></ul> | <ul><li>min: 0.0</li><li>mean: 0.33</li><li>max: 1.0</li></ul> |
|
228 |
+
* Samples:
|
229 |
+
| sentence1 | sentence2 | label |
|
230 |
+
|:------------------------------------------------------|:-------------------------------------------------------------------|:-----------------|
|
231 |
+
| <code>EJ Manuel the 1st QB to go in this draft</code> | <code>But my bro from the 757 EJ Manuel is the 1st QB gone</code> | <code>1.0</code> |
|
232 |
+
| <code>EJ Manuel the 1st QB to go in this draft</code> | <code>Can believe EJ Manuel went as the 1st QB in the draft</code> | <code>1.0</code> |
|
233 |
+
| <code>EJ Manuel the 1st QB to go in this draft</code> | <code>EJ MANUEL IS THE 1ST QB what</code> | <code>0.6</code> |
|
234 |
+
* Loss: [<code>CosineSimilarityLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#cosinesimilarityloss) with these parameters:
|
235 |
+
```json
|
236 |
+
{
|
237 |
+
"loss_fct": "torch.nn.modules.loss.MSELoss"
|
238 |
+
}
|
239 |
+
```
|
240 |
+
|
241 |
+
### Evaluation Dataset
|
242 |
+
|
243 |
+
#### Unnamed Dataset
|
244 |
+
|
245 |
+
|
246 |
+
* Size: 4,727 evaluation samples
|
247 |
+
* Columns: <code>sentence1</code>, <code>sentence2</code>, and <code>label</code>
|
248 |
+
* Approximate statistics based on the first 1000 samples:
|
249 |
+
| | sentence1 | sentence2 | label |
|
250 |
+
|:--------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|:---------------------------------------------------------------|
|
251 |
+
| type | string | string | float |
|
252 |
+
| details | <ul><li>min: 7 tokens</li><li>mean: 10.04 tokens</li><li>max: 16 tokens</li></ul> | <ul><li>min: 7 tokens</li><li>mean: 12.22 tokens</li><li>max: 26 tokens</li></ul> | <ul><li>min: 0.0</li><li>mean: 0.33</li><li>max: 1.0</li></ul> |
|
253 |
+
* Samples:
|
254 |
+
| sentence1 | sentence2 | label |
|
255 |
+
|:---------------------------------------------------------------|:------------------------------------------------------------------|:-----------------|
|
256 |
+
| <code>A Walk to Remember is the definition of true love</code> | <code>A Walk to Remember is on and Im in town and Im upset</code> | <code>0.2</code> |
|
257 |
+
| <code>A Walk to Remember is the definition of true love</code> | <code>A Walk to Remember is the cutest thing</code> | <code>0.6</code> |
|
258 |
+
| <code>A Walk to Remember is the definition of true love</code> | <code>A walk to remember is on ABC family youre welcome</code> | <code>0.2</code> |
|
259 |
+
* Loss: [<code>CosineSimilarityLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#cosinesimilarityloss) with these parameters:
|
260 |
+
```json
|
261 |
+
{
|
262 |
+
"loss_fct": "torch.nn.modules.loss.MSELoss"
|
263 |
+
}
|
264 |
+
```
|
265 |
+
|
266 |
+
### Training Hyperparameters
|
267 |
+
#### Non-Default Hyperparameters
|
268 |
+
|
269 |
+
- `eval_strategy`: steps
|
270 |
+
- `gradient_accumulation_steps`: 2
|
271 |
+
- `learning_rate`: 2e-05
|
272 |
+
- `num_train_epochs`: 4
|
273 |
+
- `warmup_ratio`: 0.1
|
274 |
+
- `fp16`: True
|
275 |
+
|
276 |
+
#### All Hyperparameters
|
277 |
+
<details><summary>Click to expand</summary>
|
278 |
+
|
279 |
+
- `overwrite_output_dir`: False
|
280 |
+
- `do_predict`: False
|
281 |
+
- `eval_strategy`: steps
|
282 |
+
- `prediction_loss_only`: True
|
283 |
+
- `per_device_train_batch_size`: 8
|
284 |
+
- `per_device_eval_batch_size`: 8
|
285 |
+
- `per_gpu_train_batch_size`: None
|
286 |
+
- `per_gpu_eval_batch_size`: None
|
287 |
+
- `gradient_accumulation_steps`: 2
|
288 |
+
- `eval_accumulation_steps`: None
|
289 |
+
- `torch_empty_cache_steps`: None
|
290 |
+
- `learning_rate`: 2e-05
|
291 |
+
- `weight_decay`: 0.0
|
292 |
+
- `adam_beta1`: 0.9
|
293 |
+
- `adam_beta2`: 0.999
|
294 |
+
- `adam_epsilon`: 1e-08
|
295 |
+
- `max_grad_norm`: 1.0
|
296 |
+
- `num_train_epochs`: 4
|
297 |
+
- `max_steps`: -1
|
298 |
+
- `lr_scheduler_type`: linear
|
299 |
+
- `lr_scheduler_kwargs`: {}
|
300 |
+
- `warmup_ratio`: 0.1
|
301 |
+
- `warmup_steps`: 0
|
302 |
+
- `log_level`: passive
|
303 |
+
- `log_level_replica`: warning
|
304 |
+
- `log_on_each_node`: True
|
305 |
+
- `logging_nan_inf_filter`: True
|
306 |
+
- `save_safetensors`: True
|
307 |
+
- `save_on_each_node`: False
|
308 |
+
- `save_only_model`: False
|
309 |
+
- `restore_callback_states_from_checkpoint`: False
|
310 |
+
- `no_cuda`: False
|
311 |
+
- `use_cpu`: False
|
312 |
+
- `use_mps_device`: False
|
313 |
+
- `seed`: 42
|
314 |
+
- `data_seed`: None
|
315 |
+
- `jit_mode_eval`: False
|
316 |
+
- `use_ipex`: False
|
317 |
+
- `bf16`: False
|
318 |
+
- `fp16`: True
|
319 |
+
- `fp16_opt_level`: O1
|
320 |
+
- `half_precision_backend`: auto
|
321 |
+
- `bf16_full_eval`: False
|
322 |
+
- `fp16_full_eval`: False
|
323 |
+
- `tf32`: None
|
324 |
+
- `local_rank`: 0
|
325 |
+
- `ddp_backend`: None
|
326 |
+
- `tpu_num_cores`: None
|
327 |
+
- `tpu_metrics_debug`: False
|
328 |
+
- `debug`: []
|
329 |
+
- `dataloader_drop_last`: False
|
330 |
+
- `dataloader_num_workers`: 0
|
331 |
+
- `dataloader_prefetch_factor`: None
|
332 |
+
- `past_index`: -1
|
333 |
+
- `disable_tqdm`: False
|
334 |
+
- `remove_unused_columns`: True
|
335 |
+
- `label_names`: None
|
336 |
+
- `load_best_model_at_end`: False
|
337 |
+
- `ignore_data_skip`: False
|
338 |
+
- `fsdp`: []
|
339 |
+
- `fsdp_min_num_params`: 0
|
340 |
+
- `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
|
341 |
+
- `fsdp_transformer_layer_cls_to_wrap`: None
|
342 |
+
- `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
|
343 |
+
- `deepspeed`: None
|
344 |
+
- `label_smoothing_factor`: 0.0
|
345 |
+
- `optim`: adamw_torch
|
346 |
+
- `optim_args`: None
|
347 |
+
- `adafactor`: False
|
348 |
+
- `group_by_length`: False
|
349 |
+
- `length_column_name`: length
|
350 |
+
- `ddp_find_unused_parameters`: None
|
351 |
+
- `ddp_bucket_cap_mb`: None
|
352 |
+
- `ddp_broadcast_buffers`: False
|
353 |
+
- `dataloader_pin_memory`: True
|
354 |
+
- `dataloader_persistent_workers`: False
|
355 |
+
- `skip_memory_metrics`: True
|
356 |
+
- `use_legacy_prediction_loop`: False
|
357 |
+
- `push_to_hub`: False
|
358 |
+
- `resume_from_checkpoint`: None
|
359 |
+
- `hub_model_id`: None
|
360 |
+
- `hub_strategy`: every_save
|
361 |
+
- `hub_private_repo`: False
|
362 |
+
- `hub_always_push`: False
|
363 |
+
- `gradient_checkpointing`: False
|
364 |
+
- `gradient_checkpointing_kwargs`: None
|
365 |
+
- `include_inputs_for_metrics`: False
|
366 |
+
- `eval_do_concat_batches`: True
|
367 |
+
- `fp16_backend`: auto
|
368 |
+
- `push_to_hub_model_id`: None
|
369 |
+
- `push_to_hub_organization`: None
|
370 |
+
- `mp_parameters`:
|
371 |
+
- `auto_find_batch_size`: False
|
372 |
+
- `full_determinism`: False
|
373 |
+
- `torchdynamo`: None
|
374 |
+
- `ray_scope`: last
|
375 |
+
- `ddp_timeout`: 1800
|
376 |
+
- `torch_compile`: False
|
377 |
+
- `torch_compile_backend`: None
|
378 |
+
- `torch_compile_mode`: None
|
379 |
+
- `dispatch_batches`: None
|
380 |
+
- `split_batches`: None
|
381 |
+
- `include_tokens_per_second`: False
|
382 |
+
- `include_num_input_tokens_seen`: False
|
383 |
+
- `neftune_noise_alpha`: None
|
384 |
+
- `optim_target_modules`: None
|
385 |
+
- `batch_eval_metrics`: False
|
386 |
+
- `eval_on_start`: False
|
387 |
+
- `eval_use_gather_object`: False
|
388 |
+
- `batch_sampler`: batch_sampler
|
389 |
+
- `multi_dataset_batch_sampler`: proportional
|
390 |
+
|
391 |
+
</details>
|
392 |
+
|
393 |
+
### Training Logs
|
394 |
+
| Epoch | Step | Training Loss | loss | spearman_cosine |
|
395 |
+
|:------:|:----:|:-------------:|:------:|:---------------:|
|
396 |
+
| 0.1225 | 100 | - | 0.0729 | 0.6058 |
|
397 |
+
| 0.2449 | 200 | - | 0.0646 | 0.6340 |
|
398 |
+
| 0.3674 | 300 | - | 0.0627 | 0.6397 |
|
399 |
+
| 0.4899 | 400 | - | 0.0621 | 0.6472 |
|
400 |
+
| 0.6124 | 500 | 0.0627 | 0.0626 | 0.6496 |
|
401 |
+
| 0.7348 | 600 | - | 0.0621 | 0.6446 |
|
402 |
+
| 0.8573 | 700 | - | 0.0593 | 0.6695 |
|
403 |
+
| 0.9798 | 800 | - | 0.0636 | 0.6440 |
|
404 |
+
| 1.1023 | 900 | - | 0.0618 | 0.6525 |
|
405 |
+
| 1.2247 | 1000 | 0.0383 | 0.0604 | 0.6639 |
|
406 |
+
| 1.3472 | 1100 | - | 0.0608 | 0.6590 |
|
407 |
+
| 1.4697 | 1200 | - | 0.0620 | 0.6504 |
|
408 |
+
| 1.5922 | 1300 | - | 0.0617 | 0.6467 |
|
409 |
+
| 1.7146 | 1400 | - | 0.0615 | 0.6574 |
|
410 |
+
| 1.8371 | 1500 | 0.0293 | 0.0622 | 0.6536 |
|
411 |
+
| 1.9596 | 1600 | - | 0.0609 | 0.6599 |
|
412 |
+
| 2.0821 | 1700 | - | 0.0605 | 0.6658 |
|
413 |
+
| 2.2045 | 1800 | - | 0.0615 | 0.6588 |
|
414 |
+
| 2.3270 | 1900 | - | 0.0615 | 0.6575 |
|
415 |
+
| 2.4495 | 2000 | 0.0215 | 0.0614 | 0.6598 |
|
416 |
+
| 2.5720 | 2100 | - | 0.0603 | 0.6681 |
|
417 |
+
| 2.6944 | 2200 | - | 0.0606 | 0.6669 |
|
418 |
+
| 2.8169 | 2300 | - | 0.0605 | 0.6642 |
|
419 |
+
| 2.9394 | 2400 | - | 0.0606 | 0.6630 |
|
420 |
+
| 3.0618 | 2500 | 0.018 | 0.0611 | 0.6616 |
|
421 |
+
| 3.1843 | 2600 | - | 0.0611 | 0.6619 |
|
422 |
+
| 3.3068 | 2700 | - | 0.0611 | 0.6608 |
|
423 |
+
| 3.4293 | 2800 | - | 0.0608 | 0.6632 |
|
424 |
+
| 3.5517 | 2900 | - | 0.0608 | 0.6623 |
|
425 |
+
| 3.6742 | 3000 | 0.014 | 0.0615 | 0.6596 |
|
426 |
+
| 3.7967 | 3100 | - | 0.0612 | 0.6616 |
|
427 |
+
| 3.9192 | 3200 | - | 0.0610 | 0.6626 |
|
428 |
+
|
429 |
+
|
430 |
+
### Framework Versions
|
431 |
+
- Python: 3.10.14
|
432 |
+
- Sentence Transformers: 3.0.1
|
433 |
+
- Transformers: 4.43.3
|
434 |
+
- PyTorch: 2.4.0+cu121
|
435 |
+
- Accelerate: 0.33.0
|
436 |
+
- Datasets: 2.20.0
|
437 |
+
- Tokenizers: 0.19.1
|
438 |
+
|
439 |
+
## Citation
|
440 |
+
|
441 |
+
### BibTeX
|
442 |
+
|
443 |
+
#### Sentence Transformers
|
444 |
+
```bibtex
|
445 |
+
@inproceedings{reimers-2019-sentence-bert,
|
446 |
+
title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
|
447 |
+
author = "Reimers, Nils and Gurevych, Iryna",
|
448 |
+
booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
|
449 |
+
month = "11",
|
450 |
+
year = "2019",
|
451 |
+
publisher = "Association for Computational Linguistics",
|
452 |
+
url = "https://arxiv.org/abs/1908.10084",
|
453 |
+
}
|
454 |
+
```
|
455 |
+
|
456 |
+
<!--
|
457 |
+
## Glossary
|
458 |
+
|
459 |
+
*Clearly define terms in order to be accessible across audiences.*
|
460 |
+
-->
|
461 |
+
|
462 |
+
<!--
|
463 |
+
## Model Card Authors
|
464 |
+
|
465 |
+
*Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
|
466 |
+
-->
|
467 |
+
|
468 |
+
<!--
|
469 |
+
## Model Card Contact
|
470 |
+
|
471 |
+
*Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
|
472 |
+
-->
|
config.json
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_name_or_path": "output/mpnet-base-paraphrase-identification",
|
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.43.3",
|
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.43.3",
|
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:358ee68ffd9268b5aa6d74febe2d85365b7c897749b535a908e17bd2aadb5365
|
3 |
+
size 437967672
|
modules.json
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
{
|
15 |
+
"idx": 2,
|
16 |
+
"name": "2",
|
17 |
+
"path": "2_Normalize",
|
18 |
+
"type": "sentence_transformers.models.Normalize"
|
19 |
+
}
|
20 |
+
]
|
sentence_bert_config.json
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"max_seq_length": 384,
|
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": false,
|
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": false,
|
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,72 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
"max_length": 128,
|
59 |
+
"model_max_length": 384,
|
60 |
+
"pad_to_multiple_of": null,
|
61 |
+
"pad_token": "<pad>",
|
62 |
+
"pad_token_type_id": 0,
|
63 |
+
"padding_side": "right",
|
64 |
+
"sep_token": "</s>",
|
65 |
+
"stride": 0,
|
66 |
+
"strip_accents": null,
|
67 |
+
"tokenize_chinese_chars": true,
|
68 |
+
"tokenizer_class": "MPNetTokenizer",
|
69 |
+
"truncation_side": "right",
|
70 |
+
"truncation_strategy": "longest_first",
|
71 |
+
"unk_token": "[UNK]"
|
72 |
+
}
|
vocab.txt
ADDED
The diff for this file is too large to render.
See raw diff
|
|