wwydmanski
commited on
Upload folder using huggingface_hub
Browse files- 1_Pooling/config.json +10 -0
- README.md +456 -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,456 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
base_model: allenai/specter2_base
|
3 |
+
library_name: sentence-transformers
|
4 |
+
pipeline_tag: sentence-similarity
|
5 |
+
tags:
|
6 |
+
- sentence-transformers
|
7 |
+
- sentence-similarity
|
8 |
+
- feature-extraction
|
9 |
+
- generated_from_trainer
|
10 |
+
- dataset_size:8705
|
11 |
+
- loss:MultipleNegativesRankingLoss
|
12 |
+
widget:
|
13 |
+
- source_sentence: Vaccine Administration in High-Risk Groups
|
14 |
+
sentences:
|
15 |
+
- '[V+: strategies improving vaccination coverage among children with chronic diseases]. '
|
16 |
+
- 'Medical writer welcomes advice on working with medical writers. '
|
17 |
+
- 'Vaccination management. '
|
18 |
+
- source_sentence: Eosinophil recruitment and STAT6 signalling pathway in nematode
|
19 |
+
infections
|
20 |
+
sentences:
|
21 |
+
- 'The roles of eotaxin and the STAT6 signalling pathway in eosinophil recruitment
|
22 |
+
and host resistance to the nematodes Nippostrongylus brasiliensis and Heligmosomoides
|
23 |
+
bakeri. '
|
24 |
+
- 'ABO blood groups from Palamau, Bihar, India. '
|
25 |
+
- 'Both stat5a and stat5b are required for antigen-induced eosinophil and T-cell
|
26 |
+
recruitment into the tissue. '
|
27 |
+
- source_sentence: Constitutional Medicine Status
|
28 |
+
sentences:
|
29 |
+
- '[Present status of constitutional medicine]. '
|
30 |
+
- 'Convergence of submodality-specific input onto neurons in primary somatosensory
|
31 |
+
cortex. '
|
32 |
+
- 'The link between health and wellbeing and constitutional recognition. '
|
33 |
+
- source_sentence: Telehealth challenges
|
34 |
+
sentences:
|
35 |
+
- '[Technological transformations and evolution of the medical practice: current
|
36 |
+
status, issues and perspectives for the development of telemedicine]. '
|
37 |
+
- 'The untapped potential of Telehealth. '
|
38 |
+
- 'Enhanced chartreusin solubility by hydroxybenzoate hydrotropy. '
|
39 |
+
- source_sentence: Kawasaki disease immunoprophylaxis
|
40 |
+
sentences:
|
41 |
+
- '[Effect of immunoglobulin in the prevention of coronary artery aneurysms in Kawasaki
|
42 |
+
disease]. '
|
43 |
+
- 'Management of Kawasaki disease. '
|
44 |
+
- 'IgA anti-epidermal transglutaminase antibodies in dermatitis herpetiformis and
|
45 |
+
pediatric celiac disease. '
|
46 |
+
---
|
47 |
+
|
48 |
+
# SentenceTransformer based on allenai/specter2_base
|
49 |
+
|
50 |
+
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.
|
51 |
+
|
52 |
+
## Model Details
|
53 |
+
|
54 |
+
### Model Description
|
55 |
+
- **Model Type:** Sentence Transformer
|
56 |
+
- **Base model:** [allenai/specter2_base](https://huggingface.co/allenai/specter2_base) <!-- at revision 3447645e1def9117997203454fa4495937bfbd83 -->
|
57 |
+
- **Maximum Sequence Length:** 512 tokens
|
58 |
+
- **Output Dimensionality:** 768 tokens
|
59 |
+
- **Similarity Function:** Cosine Similarity
|
60 |
+
- **Training Dataset:**
|
61 |
+
- json
|
62 |
+
<!-- - **Language:** Unknown -->
|
63 |
+
<!-- - **License:** Unknown -->
|
64 |
+
|
65 |
+
### Model Sources
|
66 |
+
|
67 |
+
- **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
|
68 |
+
- **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
|
69 |
+
- **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
|
70 |
+
|
71 |
+
### Full Model Architecture
|
72 |
+
|
73 |
+
```
|
74 |
+
SentenceTransformer(
|
75 |
+
(0): Transformer({'max_seq_length': 512, 'do_lower_case': False}) with Transformer model: BertModel
|
76 |
+
(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})
|
77 |
+
)
|
78 |
+
```
|
79 |
+
|
80 |
+
## Usage
|
81 |
+
|
82 |
+
### Direct Usage (Sentence Transformers)
|
83 |
+
|
84 |
+
First install the Sentence Transformers library:
|
85 |
+
|
86 |
+
```bash
|
87 |
+
pip install -U sentence-transformers
|
88 |
+
```
|
89 |
+
|
90 |
+
Then you can load this model and run inference.
|
91 |
+
```python
|
92 |
+
from sentence_transformers import SentenceTransformer
|
93 |
+
|
94 |
+
# Download from the 🤗 Hub
|
95 |
+
model = SentenceTransformer("sentence_transformers_model_id")
|
96 |
+
# Run inference
|
97 |
+
sentences = [
|
98 |
+
'Kawasaki disease immunoprophylaxis',
|
99 |
+
'[Effect of immunoglobulin in the prevention of coronary artery aneurysms in Kawasaki disease]. ',
|
100 |
+
'Management of Kawasaki disease. ',
|
101 |
+
]
|
102 |
+
embeddings = model.encode(sentences)
|
103 |
+
print(embeddings.shape)
|
104 |
+
# [3, 768]
|
105 |
+
|
106 |
+
# Get the similarity scores for the embeddings
|
107 |
+
similarities = model.similarity(embeddings, embeddings)
|
108 |
+
print(similarities.shape)
|
109 |
+
# [3, 3]
|
110 |
+
```
|
111 |
+
|
112 |
+
<!--
|
113 |
+
### Direct Usage (Transformers)
|
114 |
+
|
115 |
+
<details><summary>Click to see the direct usage in Transformers</summary>
|
116 |
+
|
117 |
+
</details>
|
118 |
+
-->
|
119 |
+
|
120 |
+
<!--
|
121 |
+
### Downstream Usage (Sentence Transformers)
|
122 |
+
|
123 |
+
You can finetune this model on your own dataset.
|
124 |
+
|
125 |
+
<details><summary>Click to expand</summary>
|
126 |
+
|
127 |
+
</details>
|
128 |
+
-->
|
129 |
+
|
130 |
+
<!--
|
131 |
+
### Out-of-Scope Use
|
132 |
+
|
133 |
+
*List how the model may foreseeably be misused and address what users ought not to do with the model.*
|
134 |
+
-->
|
135 |
+
|
136 |
+
<!--
|
137 |
+
## Bias, Risks and Limitations
|
138 |
+
|
139 |
+
*What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
|
140 |
+
-->
|
141 |
+
|
142 |
+
<!--
|
143 |
+
### Recommendations
|
144 |
+
|
145 |
+
*What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
|
146 |
+
-->
|
147 |
+
|
148 |
+
## Training Details
|
149 |
+
|
150 |
+
### Training Dataset
|
151 |
+
|
152 |
+
#### json
|
153 |
+
|
154 |
+
* Dataset: json
|
155 |
+
* Size: 8,705 training samples
|
156 |
+
* Columns: <code>anchor</code>, <code>positive</code>, and <code>negative</code>
|
157 |
+
* Approximate statistics based on the first 1000 samples:
|
158 |
+
| | anchor | positive | negative |
|
159 |
+
|:--------|:--------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|
|
160 |
+
| type | string | string | string |
|
161 |
+
| details | <ul><li>min: 4 tokens</li><li>mean: 7.6 tokens</li><li>max: 18 tokens</li></ul> | <ul><li>min: 6 tokens</li><li>mean: 19.26 tokens</li><li>max: 42 tokens</li></ul> | <ul><li>min: 4 tokens</li><li>mean: 11.72 tokens</li><li>max: 46 tokens</li></ul> |
|
162 |
+
* Samples:
|
163 |
+
| anchor | positive | negative |
|
164 |
+
|:-------------------------------------------------------------------------------------|:------------------------------------------------------------------------------------------------------------------------------------------------------------------|:--------------------------------------------------------------------|
|
165 |
+
| <code>Telehealth challenges</code> | <code>[Technological transformations and evolution of the medical practice: current status, issues and perspectives for the development of telemedicine]. </code> | <code>The untapped potential of Telehealth. </code> |
|
166 |
+
| <code>Racial disparities in mental health treatment</code> | <code>Relationships between stigma, depression, and treatment in white and African American primary care patients. </code> | <code>Mental Health Care Disparities Now and in the Future. </code> |
|
167 |
+
| <code>Iatrogenic hyperkalemia in elderly patients with cardiovascular disease</code> | <code>Iatrogenic hyperkalemia as a serious problem in therapy of cardiovascular diseases in elderly patients. </code> | <code>The cardiovascular implications of hypokalemia. </code> |
|
168 |
+
* Loss: [<code>MultipleNegativesRankingLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#multiplenegativesrankingloss) with these parameters:
|
169 |
+
```json
|
170 |
+
{
|
171 |
+
"scale": 20.0,
|
172 |
+
"similarity_fct": "cos_sim"
|
173 |
+
}
|
174 |
+
```
|
175 |
+
|
176 |
+
### Training Hyperparameters
|
177 |
+
#### Non-Default Hyperparameters
|
178 |
+
|
179 |
+
- `per_device_train_batch_size`: 32
|
180 |
+
- `per_device_eval_batch_size`: 32
|
181 |
+
- `learning_rate`: 2e-05
|
182 |
+
- `num_train_epochs`: 1
|
183 |
+
- `lr_scheduler_type`: cosine_with_restarts
|
184 |
+
- `warmup_ratio`: 0.1
|
185 |
+
- `bf16`: True
|
186 |
+
- `batch_sampler`: no_duplicates
|
187 |
+
|
188 |
+
#### All Hyperparameters
|
189 |
+
<details><summary>Click to expand</summary>
|
190 |
+
|
191 |
+
- `overwrite_output_dir`: False
|
192 |
+
- `do_predict`: False
|
193 |
+
- `eval_strategy`: no
|
194 |
+
- `prediction_loss_only`: True
|
195 |
+
- `per_device_train_batch_size`: 32
|
196 |
+
- `per_device_eval_batch_size`: 32
|
197 |
+
- `per_gpu_train_batch_size`: None
|
198 |
+
- `per_gpu_eval_batch_size`: None
|
199 |
+
- `gradient_accumulation_steps`: 1
|
200 |
+
- `eval_accumulation_steps`: None
|
201 |
+
- `torch_empty_cache_steps`: None
|
202 |
+
- `learning_rate`: 2e-05
|
203 |
+
- `weight_decay`: 0.0
|
204 |
+
- `adam_beta1`: 0.9
|
205 |
+
- `adam_beta2`: 0.999
|
206 |
+
- `adam_epsilon`: 1e-08
|
207 |
+
- `max_grad_norm`: 1.0
|
208 |
+
- `num_train_epochs`: 1
|
209 |
+
- `max_steps`: -1
|
210 |
+
- `lr_scheduler_type`: cosine_with_restarts
|
211 |
+
- `lr_scheduler_kwargs`: {}
|
212 |
+
- `warmup_ratio`: 0.1
|
213 |
+
- `warmup_steps`: 0
|
214 |
+
- `log_level`: passive
|
215 |
+
- `log_level_replica`: warning
|
216 |
+
- `log_on_each_node`: True
|
217 |
+
- `logging_nan_inf_filter`: True
|
218 |
+
- `save_safetensors`: True
|
219 |
+
- `save_on_each_node`: False
|
220 |
+
- `save_only_model`: False
|
221 |
+
- `restore_callback_states_from_checkpoint`: False
|
222 |
+
- `no_cuda`: False
|
223 |
+
- `use_cpu`: False
|
224 |
+
- `use_mps_device`: False
|
225 |
+
- `seed`: 42
|
226 |
+
- `data_seed`: None
|
227 |
+
- `jit_mode_eval`: False
|
228 |
+
- `use_ipex`: False
|
229 |
+
- `bf16`: True
|
230 |
+
- `fp16`: False
|
231 |
+
- `fp16_opt_level`: O1
|
232 |
+
- `half_precision_backend`: auto
|
233 |
+
- `bf16_full_eval`: False
|
234 |
+
- `fp16_full_eval`: False
|
235 |
+
- `tf32`: None
|
236 |
+
- `local_rank`: 0
|
237 |
+
- `ddp_backend`: None
|
238 |
+
- `tpu_num_cores`: None
|
239 |
+
- `tpu_metrics_debug`: False
|
240 |
+
- `debug`: []
|
241 |
+
- `dataloader_drop_last`: False
|
242 |
+
- `dataloader_num_workers`: 0
|
243 |
+
- `dataloader_prefetch_factor`: None
|
244 |
+
- `past_index`: -1
|
245 |
+
- `disable_tqdm`: False
|
246 |
+
- `remove_unused_columns`: True
|
247 |
+
- `label_names`: None
|
248 |
+
- `load_best_model_at_end`: False
|
249 |
+
- `ignore_data_skip`: False
|
250 |
+
- `fsdp`: []
|
251 |
+
- `fsdp_min_num_params`: 0
|
252 |
+
- `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
|
253 |
+
- `fsdp_transformer_layer_cls_to_wrap`: None
|
254 |
+
- `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
|
255 |
+
- `deepspeed`: None
|
256 |
+
- `label_smoothing_factor`: 0.0
|
257 |
+
- `optim`: adamw_torch
|
258 |
+
- `optim_args`: None
|
259 |
+
- `adafactor`: False
|
260 |
+
- `group_by_length`: False
|
261 |
+
- `length_column_name`: length
|
262 |
+
- `ddp_find_unused_parameters`: None
|
263 |
+
- `ddp_bucket_cap_mb`: None
|
264 |
+
- `ddp_broadcast_buffers`: False
|
265 |
+
- `dataloader_pin_memory`: True
|
266 |
+
- `dataloader_persistent_workers`: False
|
267 |
+
- `skip_memory_metrics`: True
|
268 |
+
- `use_legacy_prediction_loop`: False
|
269 |
+
- `push_to_hub`: False
|
270 |
+
- `resume_from_checkpoint`: None
|
271 |
+
- `hub_model_id`: None
|
272 |
+
- `hub_strategy`: every_save
|
273 |
+
- `hub_private_repo`: False
|
274 |
+
- `hub_always_push`: False
|
275 |
+
- `gradient_checkpointing`: False
|
276 |
+
- `gradient_checkpointing_kwargs`: None
|
277 |
+
- `include_inputs_for_metrics`: False
|
278 |
+
- `eval_do_concat_batches`: True
|
279 |
+
- `fp16_backend`: auto
|
280 |
+
- `push_to_hub_model_id`: None
|
281 |
+
- `push_to_hub_organization`: None
|
282 |
+
- `mp_parameters`:
|
283 |
+
- `auto_find_batch_size`: False
|
284 |
+
- `full_determinism`: False
|
285 |
+
- `torchdynamo`: None
|
286 |
+
- `ray_scope`: last
|
287 |
+
- `ddp_timeout`: 1800
|
288 |
+
- `torch_compile`: False
|
289 |
+
- `torch_compile_backend`: None
|
290 |
+
- `torch_compile_mode`: None
|
291 |
+
- `dispatch_batches`: None
|
292 |
+
- `split_batches`: None
|
293 |
+
- `include_tokens_per_second`: False
|
294 |
+
- `include_num_input_tokens_seen`: False
|
295 |
+
- `neftune_noise_alpha`: None
|
296 |
+
- `optim_target_modules`: None
|
297 |
+
- `batch_eval_metrics`: False
|
298 |
+
- `eval_on_start`: False
|
299 |
+
- `use_liger_kernel`: False
|
300 |
+
- `eval_use_gather_object`: False
|
301 |
+
- `batch_sampler`: no_duplicates
|
302 |
+
- `multi_dataset_batch_sampler`: proportional
|
303 |
+
|
304 |
+
</details>
|
305 |
+
|
306 |
+
### Training Logs
|
307 |
+
| Epoch | Step | Training Loss |
|
308 |
+
|:------:|:----:|:-------------:|
|
309 |
+
| 0.0110 | 1 | 2.9861 |
|
310 |
+
| 0.0220 | 2 | 2.9379 |
|
311 |
+
| 0.0330 | 3 | 3.0613 |
|
312 |
+
| 0.0440 | 4 | 2.8081 |
|
313 |
+
| 0.0549 | 5 | 2.6516 |
|
314 |
+
| 0.0659 | 6 | 2.3688 |
|
315 |
+
| 0.0769 | 7 | 2.0502 |
|
316 |
+
| 0.0879 | 8 | 1.7557 |
|
317 |
+
| 0.0989 | 9 | 1.5316 |
|
318 |
+
| 0.1099 | 10 | 1.2476 |
|
319 |
+
| 0.1209 | 11 | 1.1529 |
|
320 |
+
| 0.1319 | 12 | 0.9483 |
|
321 |
+
| 0.1429 | 13 | 0.7187 |
|
322 |
+
| 0.1538 | 14 | 0.6824 |
|
323 |
+
| 0.1648 | 15 | 0.593 |
|
324 |
+
| 0.1758 | 16 | 0.4593 |
|
325 |
+
| 0.1868 | 17 | 0.3737 |
|
326 |
+
| 0.1978 | 18 | 0.5082 |
|
327 |
+
| 0.2088 | 19 | 0.4232 |
|
328 |
+
| 0.2198 | 20 | 0.3089 |
|
329 |
+
| 0.2308 | 21 | 0.2057 |
|
330 |
+
| 0.2418 | 22 | 0.2358 |
|
331 |
+
| 0.2527 | 23 | 0.2291 |
|
332 |
+
| 0.2637 | 24 | 0.2707 |
|
333 |
+
| 0.2747 | 25 | 0.1359 |
|
334 |
+
| 0.2857 | 26 | 0.2294 |
|
335 |
+
| 0.2967 | 27 | 0.157 |
|
336 |
+
| 0.3077 | 28 | 0.0678 |
|
337 |
+
| 0.3187 | 29 | 0.1022 |
|
338 |
+
| 0.3297 | 30 | 0.0713 |
|
339 |
+
| 0.3407 | 31 | 0.0899 |
|
340 |
+
| 0.3516 | 32 | 0.1385 |
|
341 |
+
| 0.3626 | 33 | 0.0809 |
|
342 |
+
| 0.3736 | 34 | 0.1053 |
|
343 |
+
| 0.3846 | 35 | 0.0925 |
|
344 |
+
| 0.3956 | 36 | 0.0675 |
|
345 |
+
| 0.4066 | 37 | 0.0841 |
|
346 |
+
| 0.4176 | 38 | 0.0366 |
|
347 |
+
| 0.4286 | 39 | 0.0768 |
|
348 |
+
| 0.4396 | 40 | 0.0529 |
|
349 |
+
| 0.4505 | 41 | 0.0516 |
|
350 |
+
| 0.4615 | 42 | 0.0342 |
|
351 |
+
| 0.4725 | 43 | 0.0456 |
|
352 |
+
| 0.4835 | 44 | 0.0344 |
|
353 |
+
| 0.4945 | 45 | 0.1337 |
|
354 |
+
| 0.5055 | 46 | 0.0883 |
|
355 |
+
| 0.5165 | 47 | 0.0691 |
|
356 |
+
| 0.5275 | 48 | 0.0322 |
|
357 |
+
| 0.5385 | 49 | 0.0731 |
|
358 |
+
| 0.5495 | 50 | 0.0376 |
|
359 |
+
| 0.5604 | 51 | 0.0464 |
|
360 |
+
| 0.5714 | 52 | 0.0173 |
|
361 |
+
| 0.5824 | 53 | 0.0516 |
|
362 |
+
| 0.5934 | 54 | 0.0703 |
|
363 |
+
| 0.6044 | 55 | 0.0273 |
|
364 |
+
| 0.6154 | 56 | 0.0374 |
|
365 |
+
| 0.6264 | 57 | 0.0292 |
|
366 |
+
| 0.6374 | 58 | 0.1195 |
|
367 |
+
| 0.6484 | 59 | 0.0852 |
|
368 |
+
| 0.6593 | 60 | 0.0697 |
|
369 |
+
| 0.6703 | 61 | 0.0653 |
|
370 |
+
| 0.6813 | 62 | 0.0426 |
|
371 |
+
| 0.6923 | 63 | 0.0288 |
|
372 |
+
| 0.7033 | 64 | 0.0344 |
|
373 |
+
| 0.7143 | 65 | 0.104 |
|
374 |
+
| 0.7253 | 66 | 0.0251 |
|
375 |
+
| 0.7363 | 67 | 0.0095 |
|
376 |
+
| 0.7473 | 68 | 0.0208 |
|
377 |
+
| 0.7582 | 69 | 0.0814 |
|
378 |
+
| 0.7692 | 70 | 0.0813 |
|
379 |
+
| 0.7802 | 71 | 0.0508 |
|
380 |
+
| 0.7912 | 72 | 0.032 |
|
381 |
+
| 0.8022 | 73 | 0.0879 |
|
382 |
+
| 0.8132 | 74 | 0.095 |
|
383 |
+
| 0.8242 | 75 | 0.0932 |
|
384 |
+
| 0.8352 | 76 | 0.0868 |
|
385 |
+
| 0.8462 | 77 | 0.0231 |
|
386 |
+
| 0.8571 | 78 | 0.0144 |
|
387 |
+
| 0.8681 | 79 | 0.0179 |
|
388 |
+
| 0.8791 | 80 | 0.0457 |
|
389 |
+
| 0.8901 | 81 | 0.0935 |
|
390 |
+
| 0.9011 | 82 | 0.0658 |
|
391 |
+
| 0.9121 | 83 | 0.0553 |
|
392 |
+
| 0.9231 | 84 | 0.003 |
|
393 |
+
| 0.9341 | 85 | 0.0036 |
|
394 |
+
| 0.9451 | 86 | 0.0034 |
|
395 |
+
| 0.9560 | 87 | 0.0032 |
|
396 |
+
| 0.9670 | 88 | 0.0026 |
|
397 |
+
| 0.9780 | 89 | 0.0042 |
|
398 |
+
| 0.9890 | 90 | 0.0024 |
|
399 |
+
| 1.0 | 91 | 0.0022 |
|
400 |
+
|
401 |
+
|
402 |
+
### Framework Versions
|
403 |
+
- Python: 3.9.19
|
404 |
+
- Sentence Transformers: 3.1.1
|
405 |
+
- Transformers: 4.45.2
|
406 |
+
- PyTorch: 2.5.0
|
407 |
+
- Accelerate: 1.0.1
|
408 |
+
- Datasets: 2.19.0
|
409 |
+
- Tokenizers: 0.20.3
|
410 |
+
|
411 |
+
## Citation
|
412 |
+
|
413 |
+
### BibTeX
|
414 |
+
|
415 |
+
#### Sentence Transformers
|
416 |
+
```bibtex
|
417 |
+
@inproceedings{reimers-2019-sentence-bert,
|
418 |
+
title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
|
419 |
+
author = "Reimers, Nils and Gurevych, Iryna",
|
420 |
+
booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
|
421 |
+
month = "11",
|
422 |
+
year = "2019",
|
423 |
+
publisher = "Association for Computational Linguistics",
|
424 |
+
url = "https://arxiv.org/abs/1908.10084",
|
425 |
+
}
|
426 |
+
```
|
427 |
+
|
428 |
+
#### MultipleNegativesRankingLoss
|
429 |
+
```bibtex
|
430 |
+
@misc{henderson2017efficient,
|
431 |
+
title={Efficient Natural Language Response Suggestion for Smart Reply},
|
432 |
+
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},
|
433 |
+
year={2017},
|
434 |
+
eprint={1705.00652},
|
435 |
+
archivePrefix={arXiv},
|
436 |
+
primaryClass={cs.CL}
|
437 |
+
}
|
438 |
+
```
|
439 |
+
|
440 |
+
<!--
|
441 |
+
## Glossary
|
442 |
+
|
443 |
+
*Clearly define terms in order to be accessible across audiences.*
|
444 |
+
-->
|
445 |
+
|
446 |
+
<!--
|
447 |
+
## Model Card Authors
|
448 |
+
|
449 |
+
*Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
|
450 |
+
-->
|
451 |
+
|
452 |
+
<!--
|
453 |
+
## Model Card Contact
|
454 |
+
|
455 |
+
*Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
|
456 |
+
-->
|
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:947aaf825081d24a38f3bf7dfa0d2427cc62a2c776f90deeb9d5f72ed95d6a3e
|
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
|
|