wwydmanski
commited on
Commit
•
9dcaea4
1
Parent(s):
1153c85
Upload folder using huggingface_hub
Browse files- 1_Pooling/config.json +10 -0
- README.md +431 -0
- config.json +31 -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 +37 -0
- tokenizer.json +0 -0
- tokenizer_config.json +57 -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,431 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
tags:
|
3 |
+
- sentence-transformers
|
4 |
+
- sentence-similarity
|
5 |
+
- feature-extraction
|
6 |
+
- generated_from_trainer
|
7 |
+
- dataset_size:10053
|
8 |
+
- loss:MultipleNegativesRankingLoss
|
9 |
+
base_model: allenai/specter2_base
|
10 |
+
widget:
|
11 |
+
- source_sentence: Fluorescence quenching of tryptophan residues
|
12 |
+
sentences:
|
13 |
+
- 'Fluorescence of buried tyrosine residues in proteins. '
|
14 |
+
- 'A fluorescence quenching study of tryptophanyl residues of (Ca2+ + Mg2+)-ATPase
|
15 |
+
from sarcoplasmic reticulum. '
|
16 |
+
- 'Some hormonal influences on the acetylation of sulfanilamide in vivo. '
|
17 |
+
- source_sentence: Human migration to the Americas
|
18 |
+
sentences:
|
19 |
+
- 'Homo sapiens in the Americas. Overview of the earliest human expansion in the
|
20 |
+
New World. '
|
21 |
+
- 'Profiles of College Drinkers Defined by Alcohol Behaviors at the Week Level:
|
22 |
+
Replication Across Semesters and Prospective Associations With Hazardous Drinking
|
23 |
+
and Dependence-Related Symptoms. '
|
24 |
+
- 'Human migration. '
|
25 |
+
- source_sentence: Human Mobility Prediction
|
26 |
+
sentences:
|
27 |
+
- 'Human mobility prediction from region functions with taxi trajectories. '
|
28 |
+
- 'Understanding Human Mobility from Twitter. '
|
29 |
+
- 'Ovarian cancer gene therapy using HPV-16 pseudovirion carrying the HSV-tk gene. '
|
30 |
+
- source_sentence: Nevirapine Resistance
|
31 |
+
sentences:
|
32 |
+
- 'Nevirapine toxicity. '
|
33 |
+
- 'Recognizing rhenium. '
|
34 |
+
- 'Update on nevirapine: quest for a niche. '
|
35 |
+
- source_sentence: EHL tendon reconstruction
|
36 |
+
sentences:
|
37 |
+
- 'A Combined Surgical Approach for Extensor Hallucis Longus Reconstruction: Two
|
38 |
+
Case Reports. '
|
39 |
+
- 'Flexor tendon reconstruction. '
|
40 |
+
- 'Noble gases and neuroprotection: summary of current evidence. '
|
41 |
+
pipeline_tag: sentence-similarity
|
42 |
+
library_name: sentence-transformers
|
43 |
+
metrics:
|
44 |
+
- cosine_accuracy
|
45 |
+
- dot_accuracy
|
46 |
+
- manhattan_accuracy
|
47 |
+
- euclidean_accuracy
|
48 |
+
- max_accuracy
|
49 |
+
model-index:
|
50 |
+
- name: SentenceTransformer based on allenai/specter2_base
|
51 |
+
results:
|
52 |
+
- task:
|
53 |
+
type: triplet
|
54 |
+
name: Triplet
|
55 |
+
dataset:
|
56 |
+
name: triplet dev
|
57 |
+
type: triplet-dev
|
58 |
+
metrics:
|
59 |
+
- type: cosine_accuracy
|
60 |
+
value: 0.573
|
61 |
+
name: Cosine Accuracy
|
62 |
+
- type: dot_accuracy
|
63 |
+
value: 0.455
|
64 |
+
name: Dot Accuracy
|
65 |
+
- type: manhattan_accuracy
|
66 |
+
value: 0.576
|
67 |
+
name: Manhattan Accuracy
|
68 |
+
- type: euclidean_accuracy
|
69 |
+
value: 0.577
|
70 |
+
name: Euclidean Accuracy
|
71 |
+
- type: max_accuracy
|
72 |
+
value: 0.577
|
73 |
+
name: Max Accuracy
|
74 |
+
---
|
75 |
+
|
76 |
+
# SentenceTransformer based on allenai/specter2_base
|
77 |
+
|
78 |
+
This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [allenai/specter2_base](https://huggingface.co/allenai/specter2_base) on the json 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.
|
79 |
+
|
80 |
+
## Model Details
|
81 |
+
|
82 |
+
### Model Description
|
83 |
+
- **Model Type:** Sentence Transformer
|
84 |
+
- **Base model:** [allenai/specter2_base](https://huggingface.co/allenai/specter2_base) <!-- at revision 3447645e1def9117997203454fa4495937bfbd83 -->
|
85 |
+
- **Maximum Sequence Length:** 512 tokens
|
86 |
+
- **Output Dimensionality:** 768 tokens
|
87 |
+
- **Similarity Function:** Cosine Similarity
|
88 |
+
- **Training Dataset:**
|
89 |
+
- json
|
90 |
+
<!-- - **Language:** Unknown -->
|
91 |
+
<!-- - **License:** Unknown -->
|
92 |
+
|
93 |
+
### Model Sources
|
94 |
+
|
95 |
+
- **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
|
96 |
+
- **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
|
97 |
+
- **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
|
98 |
+
|
99 |
+
### Full Model Architecture
|
100 |
+
|
101 |
+
```
|
102 |
+
SentenceTransformer(
|
103 |
+
(0): Transformer({'max_seq_length': 512, 'do_lower_case': False}) with Transformer model: PeftModelForFeatureExtraction
|
104 |
+
(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})
|
105 |
+
)
|
106 |
+
```
|
107 |
+
|
108 |
+
## Usage
|
109 |
+
|
110 |
+
### Direct Usage (Sentence Transformers)
|
111 |
+
|
112 |
+
First install the Sentence Transformers library:
|
113 |
+
|
114 |
+
```bash
|
115 |
+
pip install -U sentence-transformers
|
116 |
+
```
|
117 |
+
|
118 |
+
Then you can load this model and run inference.
|
119 |
+
```python
|
120 |
+
from sentence_transformers import SentenceTransformer
|
121 |
+
|
122 |
+
# Download from the 🤗 Hub
|
123 |
+
model = SentenceTransformer("sentence_transformers_model_id")
|
124 |
+
# Run inference
|
125 |
+
sentences = [
|
126 |
+
'EHL tendon reconstruction',
|
127 |
+
'A Combined Surgical Approach for Extensor Hallucis Longus Reconstruction: Two Case Reports. ',
|
128 |
+
'Flexor tendon reconstruction. ',
|
129 |
+
]
|
130 |
+
embeddings = model.encode(sentences)
|
131 |
+
print(embeddings.shape)
|
132 |
+
# [3, 768]
|
133 |
+
|
134 |
+
# Get the similarity scores for the embeddings
|
135 |
+
similarities = model.similarity(embeddings, embeddings)
|
136 |
+
print(similarities.shape)
|
137 |
+
# [3, 3]
|
138 |
+
```
|
139 |
+
|
140 |
+
<!--
|
141 |
+
### Direct Usage (Transformers)
|
142 |
+
|
143 |
+
<details><summary>Click to see the direct usage in Transformers</summary>
|
144 |
+
|
145 |
+
</details>
|
146 |
+
-->
|
147 |
+
|
148 |
+
<!--
|
149 |
+
### Downstream Usage (Sentence Transformers)
|
150 |
+
|
151 |
+
You can finetune this model on your own dataset.
|
152 |
+
|
153 |
+
<details><summary>Click to expand</summary>
|
154 |
+
|
155 |
+
</details>
|
156 |
+
-->
|
157 |
+
|
158 |
+
<!--
|
159 |
+
### Out-of-Scope Use
|
160 |
+
|
161 |
+
*List how the model may foreseeably be misused and address what users ought not to do with the model.*
|
162 |
+
-->
|
163 |
+
|
164 |
+
## Evaluation
|
165 |
+
|
166 |
+
### Metrics
|
167 |
+
|
168 |
+
#### Triplet
|
169 |
+
* Dataset: `triplet-dev`
|
170 |
+
* Evaluated with [<code>TripletEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.TripletEvaluator)
|
171 |
+
|
172 |
+
| Metric | Value |
|
173 |
+
|:--------------------|:----------|
|
174 |
+
| **cosine_accuracy** | **0.573** |
|
175 |
+
| dot_accuracy | 0.455 |
|
176 |
+
| manhattan_accuracy | 0.576 |
|
177 |
+
| euclidean_accuracy | 0.577 |
|
178 |
+
| max_accuracy | 0.577 |
|
179 |
+
|
180 |
+
<!--
|
181 |
+
## Bias, Risks and Limitations
|
182 |
+
|
183 |
+
*What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
|
184 |
+
-->
|
185 |
+
|
186 |
+
<!--
|
187 |
+
### Recommendations
|
188 |
+
|
189 |
+
*What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
|
190 |
+
-->
|
191 |
+
|
192 |
+
## Training Details
|
193 |
+
|
194 |
+
### Training Dataset
|
195 |
+
|
196 |
+
#### json
|
197 |
+
|
198 |
+
* Dataset: json
|
199 |
+
* Size: 10,053 training samples
|
200 |
+
* Columns: <code>anchor</code>, <code>positive</code>, and <code>negative</code>
|
201 |
+
* Approximate statistics based on the first 1000 samples:
|
202 |
+
| | anchor | positive | negative |
|
203 |
+
|:--------|:---------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|
|
204 |
+
| type | string | string | string |
|
205 |
+
| details | <ul><li>min: 4 tokens</li><li>mean: 7.54 tokens</li><li>max: 24 tokens</li></ul> | <ul><li>min: 4 tokens</li><li>mean: 20.11 tokens</li><li>max: 63 tokens</li></ul> | <ul><li>min: 3 tokens</li><li>mean: 12.36 tokens</li><li>max: 48 tokens</li></ul> |
|
206 |
+
* Samples:
|
207 |
+
| anchor | positive | negative |
|
208 |
+
|:-------------------------------------------------------------|:--------------------------------------------------------------------------------------------------------------------|:-------------------------------------------------------------|
|
209 |
+
| <code>COM-induced secretome changes in U937 monocytes</code> | <code>Characterization of calcium oxalate crystal-induced changes in the secretome of U937 human monocytes. </code> | <code>Monocytes. </code> |
|
210 |
+
| <code>Metamaterials</code> | <code>Sound attenuation optimization using metaporous materials tuned on exceptional points. </code> | <code>Metamaterials: A cat's eye for all directions. </code> |
|
211 |
+
| <code>Pediatric Parasitology</code> | <code>Parasitic infections among school age children 6 to 11-years-of-age in the Eastern province. </code> | <code>[DIALOGUE ON PEDIATRIC PARASITOLOGY]. </code> |
|
212 |
+
* Loss: [<code>MultipleNegativesRankingLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#multiplenegativesrankingloss) with these parameters:
|
213 |
+
```json
|
214 |
+
{
|
215 |
+
"scale": 20.0,
|
216 |
+
"similarity_fct": "cos_sim"
|
217 |
+
}
|
218 |
+
```
|
219 |
+
|
220 |
+
### Training Hyperparameters
|
221 |
+
#### Non-Default Hyperparameters
|
222 |
+
|
223 |
+
- `eval_strategy`: steps
|
224 |
+
- `per_device_train_batch_size`: 512
|
225 |
+
- `per_device_eval_batch_size`: 512
|
226 |
+
- `learning_rate`: 0.001
|
227 |
+
- `num_train_epochs`: 1
|
228 |
+
- `lr_scheduler_type`: cosine_with_restarts
|
229 |
+
- `warmup_ratio`: 0.1
|
230 |
+
- `bf16`: True
|
231 |
+
- `batch_sampler`: no_duplicates
|
232 |
+
|
233 |
+
#### All Hyperparameters
|
234 |
+
<details><summary>Click to expand</summary>
|
235 |
+
|
236 |
+
- `overwrite_output_dir`: False
|
237 |
+
- `do_predict`: False
|
238 |
+
- `eval_strategy`: steps
|
239 |
+
- `prediction_loss_only`: True
|
240 |
+
- `per_device_train_batch_size`: 512
|
241 |
+
- `per_device_eval_batch_size`: 512
|
242 |
+
- `per_gpu_train_batch_size`: None
|
243 |
+
- `per_gpu_eval_batch_size`: None
|
244 |
+
- `gradient_accumulation_steps`: 1
|
245 |
+
- `eval_accumulation_steps`: None
|
246 |
+
- `torch_empty_cache_steps`: None
|
247 |
+
- `learning_rate`: 0.001
|
248 |
+
- `weight_decay`: 0.0
|
249 |
+
- `adam_beta1`: 0.9
|
250 |
+
- `adam_beta2`: 0.999
|
251 |
+
- `adam_epsilon`: 1e-08
|
252 |
+
- `max_grad_norm`: 1.0
|
253 |
+
- `num_train_epochs`: 1
|
254 |
+
- `max_steps`: -1
|
255 |
+
- `lr_scheduler_type`: cosine_with_restarts
|
256 |
+
- `lr_scheduler_kwargs`: {}
|
257 |
+
- `warmup_ratio`: 0.1
|
258 |
+
- `warmup_steps`: 0
|
259 |
+
- `log_level`: passive
|
260 |
+
- `log_level_replica`: warning
|
261 |
+
- `log_on_each_node`: True
|
262 |
+
- `logging_nan_inf_filter`: True
|
263 |
+
- `save_safetensors`: True
|
264 |
+
- `save_on_each_node`: False
|
265 |
+
- `save_only_model`: False
|
266 |
+
- `restore_callback_states_from_checkpoint`: False
|
267 |
+
- `no_cuda`: False
|
268 |
+
- `use_cpu`: False
|
269 |
+
- `use_mps_device`: False
|
270 |
+
- `seed`: 42
|
271 |
+
- `data_seed`: None
|
272 |
+
- `jit_mode_eval`: False
|
273 |
+
- `use_ipex`: False
|
274 |
+
- `bf16`: True
|
275 |
+
- `fp16`: False
|
276 |
+
- `fp16_opt_level`: O1
|
277 |
+
- `half_precision_backend`: auto
|
278 |
+
- `bf16_full_eval`: False
|
279 |
+
- `fp16_full_eval`: False
|
280 |
+
- `tf32`: None
|
281 |
+
- `local_rank`: 0
|
282 |
+
- `ddp_backend`: None
|
283 |
+
- `tpu_num_cores`: None
|
284 |
+
- `tpu_metrics_debug`: False
|
285 |
+
- `debug`: []
|
286 |
+
- `dataloader_drop_last`: False
|
287 |
+
- `dataloader_num_workers`: 0
|
288 |
+
- `dataloader_prefetch_factor`: None
|
289 |
+
- `past_index`: -1
|
290 |
+
- `disable_tqdm`: False
|
291 |
+
- `remove_unused_columns`: True
|
292 |
+
- `label_names`: None
|
293 |
+
- `load_best_model_at_end`: False
|
294 |
+
- `ignore_data_skip`: False
|
295 |
+
- `fsdp`: []
|
296 |
+
- `fsdp_min_num_params`: 0
|
297 |
+
- `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
|
298 |
+
- `fsdp_transformer_layer_cls_to_wrap`: None
|
299 |
+
- `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
|
300 |
+
- `deepspeed`: None
|
301 |
+
- `label_smoothing_factor`: 0.0
|
302 |
+
- `optim`: adamw_torch
|
303 |
+
- `optim_args`: None
|
304 |
+
- `adafactor`: False
|
305 |
+
- `group_by_length`: False
|
306 |
+
- `length_column_name`: length
|
307 |
+
- `ddp_find_unused_parameters`: None
|
308 |
+
- `ddp_bucket_cap_mb`: None
|
309 |
+
- `ddp_broadcast_buffers`: False
|
310 |
+
- `dataloader_pin_memory`: True
|
311 |
+
- `dataloader_persistent_workers`: False
|
312 |
+
- `skip_memory_metrics`: True
|
313 |
+
- `use_legacy_prediction_loop`: False
|
314 |
+
- `push_to_hub`: False
|
315 |
+
- `resume_from_checkpoint`: None
|
316 |
+
- `hub_model_id`: None
|
317 |
+
- `hub_strategy`: every_save
|
318 |
+
- `hub_private_repo`: False
|
319 |
+
- `hub_always_push`: False
|
320 |
+
- `gradient_checkpointing`: False
|
321 |
+
- `gradient_checkpointing_kwargs`: None
|
322 |
+
- `include_inputs_for_metrics`: False
|
323 |
+
- `eval_do_concat_batches`: True
|
324 |
+
- `fp16_backend`: auto
|
325 |
+
- `push_to_hub_model_id`: None
|
326 |
+
- `push_to_hub_organization`: None
|
327 |
+
- `mp_parameters`:
|
328 |
+
- `auto_find_batch_size`: False
|
329 |
+
- `full_determinism`: False
|
330 |
+
- `torchdynamo`: None
|
331 |
+
- `ray_scope`: last
|
332 |
+
- `ddp_timeout`: 1800
|
333 |
+
- `torch_compile`: False
|
334 |
+
- `torch_compile_backend`: None
|
335 |
+
- `torch_compile_mode`: None
|
336 |
+
- `dispatch_batches`: None
|
337 |
+
- `split_batches`: None
|
338 |
+
- `include_tokens_per_second`: False
|
339 |
+
- `include_num_input_tokens_seen`: False
|
340 |
+
- `neftune_noise_alpha`: None
|
341 |
+
- `optim_target_modules`: None
|
342 |
+
- `batch_eval_metrics`: False
|
343 |
+
- `eval_on_start`: False
|
344 |
+
- `use_liger_kernel`: False
|
345 |
+
- `eval_use_gather_object`: False
|
346 |
+
- `batch_sampler`: no_duplicates
|
347 |
+
- `multi_dataset_batch_sampler`: proportional
|
348 |
+
|
349 |
+
</details>
|
350 |
+
|
351 |
+
### Training Logs
|
352 |
+
| Epoch | Step | Training Loss | triplet-dev_cosine_accuracy |
|
353 |
+
|:-----:|:----:|:-------------:|:---------------------------:|
|
354 |
+
| 0 | 0 | - | 0.373 |
|
355 |
+
| 0.05 | 1 | 4.5633 | - |
|
356 |
+
| 0.1 | 2 | 4.5857 | - |
|
357 |
+
| 0.15 | 3 | 4.1852 | - |
|
358 |
+
| 0.2 | 4 | 3.2547 | - |
|
359 |
+
| 0.25 | 5 | 2.3117 | - |
|
360 |
+
| 0.3 | 6 | 1.949 | - |
|
361 |
+
| 0.35 | 7 | 1.7767 | - |
|
362 |
+
| 0.4 | 8 | 1.79 | - |
|
363 |
+
| 0.45 | 9 | 1.6081 | - |
|
364 |
+
| 0.5 | 10 | 1.7499 | - |
|
365 |
+
| 0.55 | 11 | 1.6395 | - |
|
366 |
+
| 0.6 | 12 | 1.5645 | - |
|
367 |
+
| 0.65 | 13 | 1.5804 | - |
|
368 |
+
| 0.7 | 14 | 1.5303 | - |
|
369 |
+
| 0.75 | 15 | 1.5452 | - |
|
370 |
+
| 0.8 | 16 | 1.5012 | - |
|
371 |
+
| 0.85 | 17 | 1.5283 | - |
|
372 |
+
| 0.9 | 18 | 1.5982 | - |
|
373 |
+
| 0.95 | 19 | 1.4714 | - |
|
374 |
+
| 1.0 | 20 | 1.3331 | 0.573 |
|
375 |
+
|
376 |
+
|
377 |
+
### Framework Versions
|
378 |
+
- Python: 3.9.19
|
379 |
+
- Sentence Transformers: 3.1.1
|
380 |
+
- Transformers: 4.45.2
|
381 |
+
- PyTorch: 2.5.0
|
382 |
+
- Accelerate: 1.0.1
|
383 |
+
- Datasets: 2.19.0
|
384 |
+
- Tokenizers: 0.20.3
|
385 |
+
|
386 |
+
## Citation
|
387 |
+
|
388 |
+
### BibTeX
|
389 |
+
|
390 |
+
#### Sentence Transformers
|
391 |
+
```bibtex
|
392 |
+
@inproceedings{reimers-2019-sentence-bert,
|
393 |
+
title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
|
394 |
+
author = "Reimers, Nils and Gurevych, Iryna",
|
395 |
+
booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
|
396 |
+
month = "11",
|
397 |
+
year = "2019",
|
398 |
+
publisher = "Association for Computational Linguistics",
|
399 |
+
url = "https://arxiv.org/abs/1908.10084",
|
400 |
+
}
|
401 |
+
```
|
402 |
+
|
403 |
+
#### MultipleNegativesRankingLoss
|
404 |
+
```bibtex
|
405 |
+
@misc{henderson2017efficient,
|
406 |
+
title={Efficient Natural Language Response Suggestion for Smart Reply},
|
407 |
+
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},
|
408 |
+
year={2017},
|
409 |
+
eprint={1705.00652},
|
410 |
+
archivePrefix={arXiv},
|
411 |
+
primaryClass={cs.CL}
|
412 |
+
}
|
413 |
+
```
|
414 |
+
|
415 |
+
<!--
|
416 |
+
## Glossary
|
417 |
+
|
418 |
+
*Clearly define terms in order to be accessible across audiences.*
|
419 |
+
-->
|
420 |
+
|
421 |
+
<!--
|
422 |
+
## Model Card Authors
|
423 |
+
|
424 |
+
*Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
|
425 |
+
-->
|
426 |
+
|
427 |
+
<!--
|
428 |
+
## Model Card Contact
|
429 |
+
|
430 |
+
*Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
|
431 |
+
-->
|
config.json
ADDED
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_name_or_path": "allenai/specter2_base",
|
3 |
+
"adapters": {
|
4 |
+
"adapters": {},
|
5 |
+
"config_map": {},
|
6 |
+
"fusion_config_map": {},
|
7 |
+
"fusions": {}
|
8 |
+
},
|
9 |
+
"architectures": [
|
10 |
+
"BertModel"
|
11 |
+
],
|
12 |
+
"attention_probs_dropout_prob": 0.1,
|
13 |
+
"classifier_dropout": null,
|
14 |
+
"hidden_act": "gelu",
|
15 |
+
"hidden_dropout_prob": 0.1,
|
16 |
+
"hidden_size": 768,
|
17 |
+
"initializer_range": 0.02,
|
18 |
+
"intermediate_size": 3072,
|
19 |
+
"layer_norm_eps": 1e-12,
|
20 |
+
"max_position_embeddings": 512,
|
21 |
+
"model_type": "bert",
|
22 |
+
"num_attention_heads": 12,
|
23 |
+
"num_hidden_layers": 12,
|
24 |
+
"pad_token_id": 0,
|
25 |
+
"position_embedding_type": "absolute",
|
26 |
+
"torch_dtype": "float32",
|
27 |
+
"transformers_version": "4.45.2",
|
28 |
+
"type_vocab_size": 2,
|
29 |
+
"use_cache": true,
|
30 |
+
"vocab_size": 31090
|
31 |
+
}
|
config_sentence_transformers.json
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"__version__": {
|
3 |
+
"sentence_transformers": "3.1.1",
|
4 |
+
"transformers": "4.45.2",
|
5 |
+
"pytorch": "2.5.0"
|
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:f28c210968fa892fc8131e69d75c4d3935559efb78f5ebf6c1fcc47d3f4fa1d7
|
3 |
+
size 439696224
|
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,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,57 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
"101": {
|
12 |
+
"content": "[UNK]",
|
13 |
+
"lstrip": false,
|
14 |
+
"normalized": false,
|
15 |
+
"rstrip": false,
|
16 |
+
"single_word": false,
|
17 |
+
"special": true
|
18 |
+
},
|
19 |
+
"102": {
|
20 |
+
"content": "[CLS]",
|
21 |
+
"lstrip": false,
|
22 |
+
"normalized": false,
|
23 |
+
"rstrip": false,
|
24 |
+
"single_word": false,
|
25 |
+
"special": true
|
26 |
+
},
|
27 |
+
"103": {
|
28 |
+
"content": "[SEP]",
|
29 |
+
"lstrip": false,
|
30 |
+
"normalized": false,
|
31 |
+
"rstrip": false,
|
32 |
+
"single_word": false,
|
33 |
+
"special": true
|
34 |
+
},
|
35 |
+
"104": {
|
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_basic_tokenize": true,
|
47 |
+
"do_lower_case": true,
|
48 |
+
"mask_token": "[MASK]",
|
49 |
+
"model_max_length": 1000000000000000019884624838656,
|
50 |
+
"never_split": null,
|
51 |
+
"pad_token": "[PAD]",
|
52 |
+
"sep_token": "[SEP]",
|
53 |
+
"strip_accents": null,
|
54 |
+
"tokenize_chinese_chars": true,
|
55 |
+
"tokenizer_class": "BertTokenizer",
|
56 |
+
"unk_token": "[UNK]"
|
57 |
+
}
|
vocab.txt
ADDED
The diff for this file is too large to render.
See raw diff
|
|