Upload folder using huggingface_hub
Browse files- 1_Pooling/config.json +10 -0
- README.md +468 -0
- config.json +25 -0
- config_sentence_transformers.json +14 -0
- eval/binary_classification_evaluation_paws-val-watcher_results.csv +5 -0
- model.safetensors +3 -0
- modules.json +14 -0
- sentence_bert_config.json +4 -0
- special_tokens_map.json +37 -0
- tokenizer.json +0 -0
- tokenizer_config.json +63 -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,468 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
tags:
|
| 3 |
+
- sentence-transformers
|
| 4 |
+
- sentence-similarity
|
| 5 |
+
- feature-extraction
|
| 6 |
+
- dense
|
| 7 |
+
- generated_from_trainer
|
| 8 |
+
- dataset_size:44114
|
| 9 |
+
- loss:ContrastiveLoss
|
| 10 |
+
widget:
|
| 11 |
+
- source_sentence: The city is located in 1889 , along the Nehalem River and Nehalem
|
| 12 |
+
Bay , near the Pacific Ocean .
|
| 13 |
+
sentences:
|
| 14 |
+
- Incorporated in 1889 , the city lies along the Pacific Ocean near the Nehalem
|
| 15 |
+
River and Nehalem Bay .
|
| 16 |
+
- Along the coast there are almost 2,000 islands , about three quarters of which
|
| 17 |
+
are uninhabited .
|
| 18 |
+
- The mammalian fauna of Madagascar is largely endemic and highly distinctive .
|
| 19 |
+
- source_sentence: Chris Blackwell , the mother of Blackwell , was one of the greatest
|
| 20 |
+
landowners in Saint Mary at the turn of the 20th century .
|
| 21 |
+
sentences:
|
| 22 |
+
- One of the largest landowners in Saint Mary at the turn of the twentieth century
|
| 23 |
+
was Blanche Blackwell , mother of Chris Blackwell .
|
| 24 |
+
- The cast for the third season of `` California Dreams '' was the same as the cast
|
| 25 |
+
for the fourth season .
|
| 26 |
+
- 'The affine scaling direction can be used to define a heuristic to adaptively
|
| 27 |
+
the centering parameter as :'
|
| 28 |
+
- source_sentence: The Roman - Catholic diocese of Cyangugu is a diocese in the city
|
| 29 |
+
of Cyangugu in the church province of Kigali , Rwanda .
|
| 30 |
+
sentences:
|
| 31 |
+
- Chad Ochocinco ( born 1978 ; formerly Chad Johnson ) is an American - American
|
| 32 |
+
- football receiver .
|
| 33 |
+
- She published several jingles and sang some successful music videos .
|
| 34 |
+
- The Roman Catholic Diocese of Cyangugu is a diocese located in the city of Kigali
|
| 35 |
+
in the ecclesiastical province of Cyangugu in Rwanda .
|
| 36 |
+
- source_sentence: Abhishek introduces Rishi and Netra Tanuja as his wife .
|
| 37 |
+
sentences:
|
| 38 |
+
- Abhishek introduces Tanuja to Rishi and Netra as his wife .
|
| 39 |
+
- At the end of the 18th century the castle was property of the Counts Ansidei ,
|
| 40 |
+
in the 19th century it was bought by the Piceller family .
|
| 41 |
+
- Deepaaradhana is an Indian Malayalam film of 1983 , produced by Vijayanand and
|
| 42 |
+
directed by TK Balachandran .
|
| 43 |
+
- source_sentence: He is also well singing in other regional forms such as Bhajans
|
| 44 |
+
, Ghazals , Nazrulgeeti and numerous semi-classical songs .
|
| 45 |
+
sentences:
|
| 46 |
+
- When the membrane potential reaches approximately – 60 mV , the K channels close
|
| 47 |
+
and the Na channels open and the prepotential phase begins again .
|
| 48 |
+
- He is also skilled in singing other regional forms like Bhajans , Ghazals , Nazrulgeeti
|
| 49 |
+
and numerous semi-classical songs as well .
|
| 50 |
+
- Conotalopia mustelina is a species of sea snail , a top gastropod mollusk in the
|
| 51 |
+
Trochidae family , the navy snails .
|
| 52 |
+
pipeline_tag: sentence-similarity
|
| 53 |
+
library_name: sentence-transformers
|
| 54 |
+
metrics:
|
| 55 |
+
- cosine_accuracy
|
| 56 |
+
- cosine_accuracy_threshold
|
| 57 |
+
- cosine_f1
|
| 58 |
+
- cosine_f1_threshold
|
| 59 |
+
- cosine_precision
|
| 60 |
+
- cosine_recall
|
| 61 |
+
- cosine_ap
|
| 62 |
+
- cosine_mcc
|
| 63 |
+
model-index:
|
| 64 |
+
- name: SentenceTransformer
|
| 65 |
+
results:
|
| 66 |
+
- task:
|
| 67 |
+
type: binary-classification
|
| 68 |
+
name: Binary Classification
|
| 69 |
+
dataset:
|
| 70 |
+
name: paws val watcher
|
| 71 |
+
type: paws-val-watcher
|
| 72 |
+
metrics:
|
| 73 |
+
- type: cosine_accuracy
|
| 74 |
+
value: 0.9277327935222672
|
| 75 |
+
name: Cosine Accuracy
|
| 76 |
+
- type: cosine_accuracy_threshold
|
| 77 |
+
value: 0.8190367221832275
|
| 78 |
+
name: Cosine Accuracy Threshold
|
| 79 |
+
- type: cosine_f1
|
| 80 |
+
value: 0.9206490331184708
|
| 81 |
+
name: Cosine F1
|
| 82 |
+
- type: cosine_f1_threshold
|
| 83 |
+
value: 0.8180307745933533
|
| 84 |
+
name: Cosine F1 Threshold
|
| 85 |
+
- type: cosine_precision
|
| 86 |
+
value: 0.8942141623488774
|
| 87 |
+
name: Cosine Precision
|
| 88 |
+
- type: cosine_recall
|
| 89 |
+
value: 0.9486944571690334
|
| 90 |
+
name: Cosine Recall
|
| 91 |
+
- type: cosine_ap
|
| 92 |
+
value: 0.9612681828396534
|
| 93 |
+
name: Cosine Ap
|
| 94 |
+
- type: cosine_mcc
|
| 95 |
+
value: 0.8556704322534656
|
| 96 |
+
name: Cosine Mcc
|
| 97 |
+
---
|
| 98 |
+
|
| 99 |
+
# SentenceTransformer
|
| 100 |
+
|
| 101 |
+
This is a [sentence-transformers](https://www.SBERT.net) model trained. 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:** [Unknown](https://huggingface.co/unknown) -->
|
| 108 |
+
- **Maximum Sequence Length:** 64 tokens
|
| 109 |
+
- **Output Dimensionality:** 768 dimensions
|
| 110 |
+
- **Similarity Function:** Cosine Similarity
|
| 111 |
+
<!-- - **Training Dataset:** Unknown -->
|
| 112 |
+
<!-- - **Language:** Unknown -->
|
| 113 |
+
<!-- - **License:** Unknown -->
|
| 114 |
+
|
| 115 |
+
### Model Sources
|
| 116 |
+
|
| 117 |
+
- **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
|
| 118 |
+
- **Repository:** [Sentence Transformers on GitHub](https://github.com/huggingface/sentence-transformers)
|
| 119 |
+
- **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
|
| 120 |
+
|
| 121 |
+
### Full Model Architecture
|
| 122 |
+
|
| 123 |
+
```
|
| 124 |
+
SentenceTransformer(
|
| 125 |
+
(0): Transformer({'max_seq_length': 64, 'do_lower_case': False, 'architecture': 'BertModel'})
|
| 126 |
+
(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})
|
| 127 |
+
)
|
| 128 |
+
```
|
| 129 |
+
|
| 130 |
+
## Usage
|
| 131 |
+
|
| 132 |
+
### Direct Usage (Sentence Transformers)
|
| 133 |
+
|
| 134 |
+
First install the Sentence Transformers library:
|
| 135 |
+
|
| 136 |
+
```bash
|
| 137 |
+
pip install -U sentence-transformers
|
| 138 |
+
```
|
| 139 |
+
|
| 140 |
+
Then you can load this model and run inference.
|
| 141 |
+
```python
|
| 142 |
+
from sentence_transformers import SentenceTransformer
|
| 143 |
+
|
| 144 |
+
# Download from the 🤗 Hub
|
| 145 |
+
model = SentenceTransformer("sentence_transformers_model_id")
|
| 146 |
+
# Run inference
|
| 147 |
+
sentences = [
|
| 148 |
+
'He is also well singing in other regional forms such as Bhajans , Ghazals , Nazrulgeeti and numerous semi-classical songs .',
|
| 149 |
+
'He is also skilled in singing other regional forms like Bhajans , Ghazals , Nazrulgeeti and numerous semi-classical songs as well .',
|
| 150 |
+
'Conotalopia mustelina is a species of sea snail , a top gastropod mollusk in the Trochidae family , the navy snails .',
|
| 151 |
+
]
|
| 152 |
+
embeddings = model.encode(sentences)
|
| 153 |
+
print(embeddings.shape)
|
| 154 |
+
# [3, 768]
|
| 155 |
+
|
| 156 |
+
# Get the similarity scores for the embeddings
|
| 157 |
+
similarities = model.similarity(embeddings, embeddings)
|
| 158 |
+
print(similarities)
|
| 159 |
+
# tensor([[1.0000, 0.9958, 0.5938],
|
| 160 |
+
# [0.9958, 1.0000, 0.6041],
|
| 161 |
+
# [0.5938, 0.6041, 1.0000]])
|
| 162 |
+
```
|
| 163 |
+
|
| 164 |
+
<!--
|
| 165 |
+
### Direct Usage (Transformers)
|
| 166 |
+
|
| 167 |
+
<details><summary>Click to see the direct usage in Transformers</summary>
|
| 168 |
+
|
| 169 |
+
</details>
|
| 170 |
+
-->
|
| 171 |
+
|
| 172 |
+
<!--
|
| 173 |
+
### Downstream Usage (Sentence Transformers)
|
| 174 |
+
|
| 175 |
+
You can finetune this model on your own dataset.
|
| 176 |
+
|
| 177 |
+
<details><summary>Click to expand</summary>
|
| 178 |
+
|
| 179 |
+
</details>
|
| 180 |
+
-->
|
| 181 |
+
|
| 182 |
+
<!--
|
| 183 |
+
### Out-of-Scope Use
|
| 184 |
+
|
| 185 |
+
*List how the model may foreseeably be misused and address what users ought not to do with the model.*
|
| 186 |
+
-->
|
| 187 |
+
|
| 188 |
+
## Evaluation
|
| 189 |
+
|
| 190 |
+
### Metrics
|
| 191 |
+
|
| 192 |
+
#### Binary Classification
|
| 193 |
+
|
| 194 |
+
* Dataset: `paws-val-watcher`
|
| 195 |
+
* Evaluated with [<code>BinaryClassificationEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.BinaryClassificationEvaluator)
|
| 196 |
+
|
| 197 |
+
| Metric | Value |
|
| 198 |
+
|:--------------------------|:-----------|
|
| 199 |
+
| cosine_accuracy | 0.9277 |
|
| 200 |
+
| cosine_accuracy_threshold | 0.819 |
|
| 201 |
+
| cosine_f1 | 0.9206 |
|
| 202 |
+
| cosine_f1_threshold | 0.818 |
|
| 203 |
+
| cosine_precision | 0.8942 |
|
| 204 |
+
| cosine_recall | 0.9487 |
|
| 205 |
+
| **cosine_ap** | **0.9613** |
|
| 206 |
+
| cosine_mcc | 0.8557 |
|
| 207 |
+
|
| 208 |
+
<!--
|
| 209 |
+
## Bias, Risks and Limitations
|
| 210 |
+
|
| 211 |
+
*What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
|
| 212 |
+
-->
|
| 213 |
+
|
| 214 |
+
<!--
|
| 215 |
+
### Recommendations
|
| 216 |
+
|
| 217 |
+
*What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
|
| 218 |
+
-->
|
| 219 |
+
|
| 220 |
+
## Training Details
|
| 221 |
+
|
| 222 |
+
### Training Dataset
|
| 223 |
+
|
| 224 |
+
#### Unnamed Dataset
|
| 225 |
+
|
| 226 |
+
* Size: 44,114 training samples
|
| 227 |
+
* Columns: <code>sentence_0</code>, <code>sentence_1</code>, and <code>label</code>
|
| 228 |
+
* Approximate statistics based on the first 1000 samples:
|
| 229 |
+
| | sentence_0 | sentence_1 | label |
|
| 230 |
+
|:--------|:-----------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------|:---------------------------------------------------------------|
|
| 231 |
+
| type | string | string | float |
|
| 232 |
+
| details | <ul><li>min: 12 tokens</li><li>mean: 26.76 tokens</li><li>max: 54 tokens</li></ul> | <ul><li>min: 11 tokens</li><li>mean: 26.82 tokens</li><li>max: 54 tokens</li></ul> | <ul><li>min: 0.0</li><li>mean: 0.49</li><li>max: 1.0</li></ul> |
|
| 233 |
+
* Samples:
|
| 234 |
+
| sentence_0 | sentence_1 | label |
|
| 235 |
+
|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:-----------------|
|
| 236 |
+
| <code>The southern area contains the Tara Mountains and the northern area consists of open plains along the coast , and the city proper .</code> | <code>The southern area contains the Tara mountains and the northern area consists of open plains along the coast and the actual city .</code> | <code>1.0</code> |
|
| 237 |
+
| <code>It began as a fishing village inhabited by Polish settlers from the Kaszub region in 1870 , as well as by some German immigrants .</code> | <code>It began as a fishing village populated by German settlers from the Kaszub region , as well as some Polish immigrants in 1870 .</code> | <code>0.0</code> |
|
| 238 |
+
| <code>Wyoming Highway 377 was a short Wyoming state road in central Sweetwater County that served the community of Point of Rocks and the Jim Bridger Power Plant .</code> | <code>Wyoming Highway 377 was a short Wyoming State Road in central Sweetwater County that served as the community of Point of Rocks and the Jim Bridger Power Plant .</code> | <code>1.0</code> |
|
| 239 |
+
* Loss: [<code>ContrastiveLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#contrastiveloss) with these parameters:
|
| 240 |
+
```json
|
| 241 |
+
{
|
| 242 |
+
"distance_metric": "SiameseDistanceMetric.COSINE_DISTANCE",
|
| 243 |
+
"margin": 0.5,
|
| 244 |
+
"size_average": true
|
| 245 |
+
}
|
| 246 |
+
```
|
| 247 |
+
|
| 248 |
+
### Training Hyperparameters
|
| 249 |
+
#### Non-Default Hyperparameters
|
| 250 |
+
|
| 251 |
+
- `per_device_train_batch_size`: 16
|
| 252 |
+
- `per_device_eval_batch_size`: 16
|
| 253 |
+
- `num_train_epochs`: 4
|
| 254 |
+
- `multi_dataset_batch_sampler`: round_robin
|
| 255 |
+
|
| 256 |
+
#### All Hyperparameters
|
| 257 |
+
<details><summary>Click to expand</summary>
|
| 258 |
+
|
| 259 |
+
- `overwrite_output_dir`: False
|
| 260 |
+
- `do_predict`: False
|
| 261 |
+
- `eval_strategy`: no
|
| 262 |
+
- `prediction_loss_only`: True
|
| 263 |
+
- `per_device_train_batch_size`: 16
|
| 264 |
+
- `per_device_eval_batch_size`: 16
|
| 265 |
+
- `per_gpu_train_batch_size`: None
|
| 266 |
+
- `per_gpu_eval_batch_size`: None
|
| 267 |
+
- `gradient_accumulation_steps`: 1
|
| 268 |
+
- `eval_accumulation_steps`: None
|
| 269 |
+
- `torch_empty_cache_steps`: None
|
| 270 |
+
- `learning_rate`: 5e-05
|
| 271 |
+
- `weight_decay`: 0.0
|
| 272 |
+
- `adam_beta1`: 0.9
|
| 273 |
+
- `adam_beta2`: 0.999
|
| 274 |
+
- `adam_epsilon`: 1e-08
|
| 275 |
+
- `max_grad_norm`: 1
|
| 276 |
+
- `num_train_epochs`: 4
|
| 277 |
+
- `max_steps`: -1
|
| 278 |
+
- `lr_scheduler_type`: linear
|
| 279 |
+
- `lr_scheduler_kwargs`: {}
|
| 280 |
+
- `warmup_ratio`: 0.0
|
| 281 |
+
- `warmup_steps`: 0
|
| 282 |
+
- `log_level`: passive
|
| 283 |
+
- `log_level_replica`: warning
|
| 284 |
+
- `log_on_each_node`: True
|
| 285 |
+
- `logging_nan_inf_filter`: True
|
| 286 |
+
- `save_safetensors`: True
|
| 287 |
+
- `save_on_each_node`: False
|
| 288 |
+
- `save_only_model`: False
|
| 289 |
+
- `restore_callback_states_from_checkpoint`: False
|
| 290 |
+
- `no_cuda`: False
|
| 291 |
+
- `use_cpu`: False
|
| 292 |
+
- `use_mps_device`: False
|
| 293 |
+
- `seed`: 42
|
| 294 |
+
- `data_seed`: None
|
| 295 |
+
- `jit_mode_eval`: False
|
| 296 |
+
- `bf16`: False
|
| 297 |
+
- `fp16`: False
|
| 298 |
+
- `fp16_opt_level`: O1
|
| 299 |
+
- `half_precision_backend`: auto
|
| 300 |
+
- `bf16_full_eval`: False
|
| 301 |
+
- `fp16_full_eval`: False
|
| 302 |
+
- `tf32`: None
|
| 303 |
+
- `local_rank`: 0
|
| 304 |
+
- `ddp_backend`: None
|
| 305 |
+
- `tpu_num_cores`: None
|
| 306 |
+
- `tpu_metrics_debug`: False
|
| 307 |
+
- `debug`: []
|
| 308 |
+
- `dataloader_drop_last`: False
|
| 309 |
+
- `dataloader_num_workers`: 0
|
| 310 |
+
- `dataloader_prefetch_factor`: None
|
| 311 |
+
- `past_index`: -1
|
| 312 |
+
- `disable_tqdm`: False
|
| 313 |
+
- `remove_unused_columns`: True
|
| 314 |
+
- `label_names`: None
|
| 315 |
+
- `load_best_model_at_end`: False
|
| 316 |
+
- `ignore_data_skip`: False
|
| 317 |
+
- `fsdp`: []
|
| 318 |
+
- `fsdp_min_num_params`: 0
|
| 319 |
+
- `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
|
| 320 |
+
- `fsdp_transformer_layer_cls_to_wrap`: None
|
| 321 |
+
- `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
|
| 322 |
+
- `parallelism_config`: None
|
| 323 |
+
- `deepspeed`: None
|
| 324 |
+
- `label_smoothing_factor`: 0.0
|
| 325 |
+
- `optim`: adamw_torch_fused
|
| 326 |
+
- `optim_args`: None
|
| 327 |
+
- `adafactor`: False
|
| 328 |
+
- `group_by_length`: False
|
| 329 |
+
- `length_column_name`: length
|
| 330 |
+
- `project`: huggingface
|
| 331 |
+
- `trackio_space_id`: trackio
|
| 332 |
+
- `ddp_find_unused_parameters`: None
|
| 333 |
+
- `ddp_bucket_cap_mb`: None
|
| 334 |
+
- `ddp_broadcast_buffers`: False
|
| 335 |
+
- `dataloader_pin_memory`: True
|
| 336 |
+
- `dataloader_persistent_workers`: False
|
| 337 |
+
- `skip_memory_metrics`: True
|
| 338 |
+
- `use_legacy_prediction_loop`: False
|
| 339 |
+
- `push_to_hub`: False
|
| 340 |
+
- `resume_from_checkpoint`: None
|
| 341 |
+
- `hub_model_id`: None
|
| 342 |
+
- `hub_strategy`: every_save
|
| 343 |
+
- `hub_private_repo`: None
|
| 344 |
+
- `hub_always_push`: False
|
| 345 |
+
- `hub_revision`: None
|
| 346 |
+
- `gradient_checkpointing`: False
|
| 347 |
+
- `gradient_checkpointing_kwargs`: None
|
| 348 |
+
- `include_inputs_for_metrics`: False
|
| 349 |
+
- `include_for_metrics`: []
|
| 350 |
+
- `eval_do_concat_batches`: True
|
| 351 |
+
- `fp16_backend`: auto
|
| 352 |
+
- `push_to_hub_model_id`: None
|
| 353 |
+
- `push_to_hub_organization`: None
|
| 354 |
+
- `mp_parameters`:
|
| 355 |
+
- `auto_find_batch_size`: False
|
| 356 |
+
- `full_determinism`: False
|
| 357 |
+
- `torchdynamo`: None
|
| 358 |
+
- `ray_scope`: last
|
| 359 |
+
- `ddp_timeout`: 1800
|
| 360 |
+
- `torch_compile`: False
|
| 361 |
+
- `torch_compile_backend`: None
|
| 362 |
+
- `torch_compile_mode`: None
|
| 363 |
+
- `include_tokens_per_second`: False
|
| 364 |
+
- `include_num_input_tokens_seen`: no
|
| 365 |
+
- `neftune_noise_alpha`: None
|
| 366 |
+
- `optim_target_modules`: None
|
| 367 |
+
- `batch_eval_metrics`: False
|
| 368 |
+
- `eval_on_start`: False
|
| 369 |
+
- `use_liger_kernel`: False
|
| 370 |
+
- `liger_kernel_config`: None
|
| 371 |
+
- `eval_use_gather_object`: False
|
| 372 |
+
- `average_tokens_across_devices`: True
|
| 373 |
+
- `prompts`: None
|
| 374 |
+
- `batch_sampler`: batch_sampler
|
| 375 |
+
- `multi_dataset_batch_sampler`: round_robin
|
| 376 |
+
- `router_mapping`: {}
|
| 377 |
+
- `learning_rate_mapping`: {}
|
| 378 |
+
|
| 379 |
+
</details>
|
| 380 |
+
|
| 381 |
+
### Training Logs
|
| 382 |
+
| Epoch | Step | Training Loss | paws-val-watcher_cosine_ap |
|
| 383 |
+
|:------:|:-----:|:-------------:|:--------------------------:|
|
| 384 |
+
| 0.1813 | 500 | 0.0319 | - |
|
| 385 |
+
| 0.3626 | 1000 | 0.0224 | - |
|
| 386 |
+
| 0.5439 | 1500 | 0.0175 | - |
|
| 387 |
+
| 0.7252 | 2000 | 0.0146 | - |
|
| 388 |
+
| 0.9065 | 2500 | 0.013 | - |
|
| 389 |
+
| 1.0 | 2758 | - | 0.9348 |
|
| 390 |
+
| 1.0877 | 3000 | 0.0109 | - |
|
| 391 |
+
| 1.2690 | 3500 | 0.0092 | - |
|
| 392 |
+
| 1.4503 | 4000 | 0.0085 | - |
|
| 393 |
+
| 1.6316 | 4500 | 0.008 | - |
|
| 394 |
+
| 1.8129 | 5000 | 0.0075 | - |
|
| 395 |
+
| 1.9942 | 5500 | 0.0076 | - |
|
| 396 |
+
| 2.0 | 5516 | - | 0.9543 |
|
| 397 |
+
| 2.1755 | 6000 | 0.0053 | - |
|
| 398 |
+
| 2.3568 | 6500 | 0.0053 | - |
|
| 399 |
+
| 2.5381 | 7000 | 0.0052 | - |
|
| 400 |
+
| 2.7194 | 7500 | 0.0049 | - |
|
| 401 |
+
| 2.9007 | 8000 | 0.0047 | - |
|
| 402 |
+
| 3.0 | 8274 | - | 0.9580 |
|
| 403 |
+
| 3.0819 | 8500 | 0.0042 | - |
|
| 404 |
+
| 3.2632 | 9000 | 0.0037 | - |
|
| 405 |
+
| 3.4445 | 9500 | 0.0035 | - |
|
| 406 |
+
| 3.6258 | 10000 | 0.0036 | - |
|
| 407 |
+
| 3.8071 | 10500 | 0.0036 | - |
|
| 408 |
+
| 3.9884 | 11000 | 0.0036 | - |
|
| 409 |
+
| 4.0 | 11032 | - | 0.9613 |
|
| 410 |
+
|
| 411 |
+
|
| 412 |
+
### Framework Versions
|
| 413 |
+
- Python: 3.12.12
|
| 414 |
+
- Sentence Transformers: 5.2.0
|
| 415 |
+
- Transformers: 4.57.3
|
| 416 |
+
- PyTorch: 2.9.0+cu126
|
| 417 |
+
- Accelerate: 1.12.0
|
| 418 |
+
- Datasets: 4.0.0
|
| 419 |
+
- Tokenizers: 0.22.1
|
| 420 |
+
|
| 421 |
+
## Citation
|
| 422 |
+
|
| 423 |
+
### BibTeX
|
| 424 |
+
|
| 425 |
+
#### Sentence Transformers
|
| 426 |
+
```bibtex
|
| 427 |
+
@inproceedings{reimers-2019-sentence-bert,
|
| 428 |
+
title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
|
| 429 |
+
author = "Reimers, Nils and Gurevych, Iryna",
|
| 430 |
+
booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
|
| 431 |
+
month = "11",
|
| 432 |
+
year = "2019",
|
| 433 |
+
publisher = "Association for Computational Linguistics",
|
| 434 |
+
url = "https://arxiv.org/abs/1908.10084",
|
| 435 |
+
}
|
| 436 |
+
```
|
| 437 |
+
|
| 438 |
+
#### ContrastiveLoss
|
| 439 |
+
```bibtex
|
| 440 |
+
@inproceedings{hadsell2006dimensionality,
|
| 441 |
+
author={Hadsell, R. and Chopra, S. and LeCun, Y.},
|
| 442 |
+
booktitle={2006 IEEE Computer Society Conference on Computer Vision and Pattern Recognition (CVPR'06)},
|
| 443 |
+
title={Dimensionality Reduction by Learning an Invariant Mapping},
|
| 444 |
+
year={2006},
|
| 445 |
+
volume={2},
|
| 446 |
+
number={},
|
| 447 |
+
pages={1735-1742},
|
| 448 |
+
doi={10.1109/CVPR.2006.100}
|
| 449 |
+
}
|
| 450 |
+
```
|
| 451 |
+
|
| 452 |
+
<!--
|
| 453 |
+
## Glossary
|
| 454 |
+
|
| 455 |
+
*Clearly define terms in order to be accessible across audiences.*
|
| 456 |
+
-->
|
| 457 |
+
|
| 458 |
+
<!--
|
| 459 |
+
## Model Card Authors
|
| 460 |
+
|
| 461 |
+
*Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
|
| 462 |
+
-->
|
| 463 |
+
|
| 464 |
+
<!--
|
| 465 |
+
## Model Card Contact
|
| 466 |
+
|
| 467 |
+
*Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
|
| 468 |
+
-->
|
config.json
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architectures": [
|
| 3 |
+
"BertModel"
|
| 4 |
+
],
|
| 5 |
+
"attention_probs_dropout_prob": 0.1,
|
| 6 |
+
"classifier_dropout": null,
|
| 7 |
+
"dtype": "float32",
|
| 8 |
+
"gradient_checkpointing": false,
|
| 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-12,
|
| 15 |
+
"max_position_embeddings": 512,
|
| 16 |
+
"model_type": "bert",
|
| 17 |
+
"num_attention_heads": 12,
|
| 18 |
+
"num_hidden_layers": 12,
|
| 19 |
+
"pad_token_id": 0,
|
| 20 |
+
"position_embedding_type": "absolute",
|
| 21 |
+
"transformers_version": "4.57.3",
|
| 22 |
+
"type_vocab_size": 2,
|
| 23 |
+
"use_cache": true,
|
| 24 |
+
"vocab_size": 30522
|
| 25 |
+
}
|
config_sentence_transformers.json
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"model_type": "SentenceTransformer",
|
| 3 |
+
"__version__": {
|
| 4 |
+
"sentence_transformers": "5.2.0",
|
| 5 |
+
"transformers": "4.57.3",
|
| 6 |
+
"pytorch": "2.9.0+cu126"
|
| 7 |
+
},
|
| 8 |
+
"prompts": {
|
| 9 |
+
"query": "",
|
| 10 |
+
"document": ""
|
| 11 |
+
},
|
| 12 |
+
"default_prompt_name": null,
|
| 13 |
+
"similarity_fn_name": "cosine"
|
| 14 |
+
}
|
eval/binary_classification_evaluation_paws-val-watcher_results.csv
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
epoch,steps,cosine_accuracy,cosine_accuracy_threshold,cosine_f1,cosine_precision,cosine_recall,cosine_f1_threshold,cosine_ap,cosine_mcc
|
| 2 |
+
1.0,2758,0.8921052631578947,0.8806893504197968,0.8506188647033718,0.912963811268896,0.9348496837429896,0.7817241689872801
|
| 3 |
+
2.0,5516,0.9172064777327935,0.9061946902654867,0.8763371844244758,0.9381584974805314,0.9543142650820976,0.8288923423316907
|
| 4 |
+
3.0,8274,0.9257085020242914,0.9172118204376268,0.9035555555555556,0.9312872194228127,0.9580228650892402,0.8501826095361721
|
| 5 |
+
4.0,11032,0.9277327935222672,0.9206490331184708,0.8942141623488774,0.9486944571690334,0.9612681828396534,0.8556704322534656
|
model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9703cfb86d37815e801f54ef9122246d0630215514ae90e3b1cdf1d590412c34
|
| 3 |
+
size 437951328
|
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": 64,
|
| 3 |
+
"do_lower_case": false
|
| 4 |
+
}
|
special_tokens_map.json
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"cls_token": {
|
| 3 |
+
"content": "[CLS]",
|
| 4 |
+
"lstrip": false,
|
| 5 |
+
"normalized": false,
|
| 6 |
+
"rstrip": false,
|
| 7 |
+
"single_word": false
|
| 8 |
+
},
|
| 9 |
+
"mask_token": {
|
| 10 |
+
"content": "[MASK]",
|
| 11 |
+
"lstrip": false,
|
| 12 |
+
"normalized": false,
|
| 13 |
+
"rstrip": false,
|
| 14 |
+
"single_word": false
|
| 15 |
+
},
|
| 16 |
+
"pad_token": {
|
| 17 |
+
"content": "[PAD]",
|
| 18 |
+
"lstrip": false,
|
| 19 |
+
"normalized": false,
|
| 20 |
+
"rstrip": false,
|
| 21 |
+
"single_word": false
|
| 22 |
+
},
|
| 23 |
+
"sep_token": {
|
| 24 |
+
"content": "[SEP]",
|
| 25 |
+
"lstrip": false,
|
| 26 |
+
"normalized": false,
|
| 27 |
+
"rstrip": false,
|
| 28 |
+
"single_word": false
|
| 29 |
+
},
|
| 30 |
+
"unk_token": {
|
| 31 |
+
"content": "[UNK]",
|
| 32 |
+
"lstrip": false,
|
| 33 |
+
"normalized": false,
|
| 34 |
+
"rstrip": false,
|
| 35 |
+
"single_word": false
|
| 36 |
+
}
|
| 37 |
+
}
|
tokenizer.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
tokenizer_config.json
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"added_tokens_decoder": {
|
| 3 |
+
"0": {
|
| 4 |
+
"content": "[PAD]",
|
| 5 |
+
"lstrip": false,
|
| 6 |
+
"normalized": false,
|
| 7 |
+
"rstrip": false,
|
| 8 |
+
"single_word": false,
|
| 9 |
+
"special": true
|
| 10 |
+
},
|
| 11 |
+
"100": {
|
| 12 |
+
"content": "[UNK]",
|
| 13 |
+
"lstrip": false,
|
| 14 |
+
"normalized": false,
|
| 15 |
+
"rstrip": false,
|
| 16 |
+
"single_word": false,
|
| 17 |
+
"special": true
|
| 18 |
+
},
|
| 19 |
+
"101": {
|
| 20 |
+
"content": "[CLS]",
|
| 21 |
+
"lstrip": false,
|
| 22 |
+
"normalized": false,
|
| 23 |
+
"rstrip": false,
|
| 24 |
+
"single_word": false,
|
| 25 |
+
"special": true
|
| 26 |
+
},
|
| 27 |
+
"102": {
|
| 28 |
+
"content": "[SEP]",
|
| 29 |
+
"lstrip": false,
|
| 30 |
+
"normalized": false,
|
| 31 |
+
"rstrip": false,
|
| 32 |
+
"single_word": false,
|
| 33 |
+
"special": true
|
| 34 |
+
},
|
| 35 |
+
"103": {
|
| 36 |
+
"content": "[MASK]",
|
| 37 |
+
"lstrip": false,
|
| 38 |
+
"normalized": false,
|
| 39 |
+
"rstrip": false,
|
| 40 |
+
"single_word": false,
|
| 41 |
+
"special": true
|
| 42 |
+
}
|
| 43 |
+
},
|
| 44 |
+
"clean_up_tokenization_spaces": false,
|
| 45 |
+
"cls_token": "[CLS]",
|
| 46 |
+
"do_lower_case": true,
|
| 47 |
+
"extra_special_tokens": {},
|
| 48 |
+
"mask_token": "[MASK]",
|
| 49 |
+
"max_length": 64,
|
| 50 |
+
"model_max_length": 64,
|
| 51 |
+
"pad_to_multiple_of": null,
|
| 52 |
+
"pad_token": "[PAD]",
|
| 53 |
+
"pad_token_type_id": 0,
|
| 54 |
+
"padding_side": "right",
|
| 55 |
+
"sep_token": "[SEP]",
|
| 56 |
+
"stride": 0,
|
| 57 |
+
"strip_accents": null,
|
| 58 |
+
"tokenize_chinese_chars": true,
|
| 59 |
+
"tokenizer_class": "BertTokenizer",
|
| 60 |
+
"truncation_side": "right",
|
| 61 |
+
"truncation_strategy": "longest_first",
|
| 62 |
+
"unk_token": "[UNK]"
|
| 63 |
+
}
|
vocab.txt
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|