wwydmanski
commited on
Commit
•
7bf3502
1
Parent(s):
cb09e22
Upload folder using huggingface_hub
Browse files- README.md +131 -114
- model.safetensors +1 -1
README.md
CHANGED
@@ -1,49 +1,81 @@
|
|
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:
|
11 |
- loss:MultipleNegativesRankingLoss
|
12 |
widget:
|
13 |
-
- source_sentence:
|
14 |
sentences:
|
15 |
-
- '
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
-
|
|
|
|
|
21 |
sentences:
|
22 |
-
- '
|
23 |
-
- '
|
24 |
-
|
25 |
-
|
26 |
-
- source_sentence: Diurnal lipid metabolism in lactating sheep
|
27 |
sentences:
|
28 |
-
- '
|
29 |
-
|
30 |
-
- '
|
31 |
-
|
32 |
-
|
33 |
-
- 'Diurnal regulation of milk lipid production and milk secretion in the rat: effect
|
34 |
-
of dietary protein and energy restriction. '
|
35 |
-
- source_sentence: Ectopic gastric mucosa
|
36 |
sentences:
|
37 |
-
- '
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
-
|
|
|
42 |
sentences:
|
43 |
-
- '
|
44 |
-
|
45 |
-
|
46 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
47 |
---
|
48 |
|
49 |
# SentenceTransformer based on allenai/specter2_base
|
@@ -96,9 +128,9 @@ from sentence_transformers import SentenceTransformer
|
|
96 |
model = SentenceTransformer("sentence_transformers_model_id")
|
97 |
# Run inference
|
98 |
sentences = [
|
99 |
-
'
|
100 |
-
'
|
101 |
-
'
|
102 |
]
|
103 |
embeddings = model.encode(sentences)
|
104 |
print(embeddings.shape)
|
@@ -134,6 +166,22 @@ You can finetune this model on your own dataset.
|
|
134 |
*List how the model may foreseeably be misused and address what users ought not to do with the model.*
|
135 |
-->
|
136 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
137 |
<!--
|
138 |
## Bias, Risks and Limitations
|
139 |
|
@@ -153,19 +201,19 @@ You can finetune this model on your own dataset.
|
|
153 |
#### json
|
154 |
|
155 |
* Dataset: json
|
156 |
-
* Size:
|
157 |
* Columns: <code>anchor</code>, <code>positive</code>, and <code>negative</code>
|
158 |
* Approximate statistics based on the first 1000 samples:
|
159 |
| | anchor | positive | negative |
|
160 |
|:--------|:---------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|
|
161 |
| type | string | string | string |
|
162 |
-
| details | <ul><li>min:
|
163 |
* Samples:
|
164 |
-
| anchor
|
165 |
-
|
166 |
-
| <code
|
167 |
-
| <code>
|
168 |
-
| <code>
|
169 |
* Loss: [<code>MultipleNegativesRankingLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#multiplenegativesrankingloss) with these parameters:
|
170 |
```json
|
171 |
{
|
@@ -177,10 +225,11 @@ You can finetune this model on your own dataset.
|
|
177 |
### Training Hyperparameters
|
178 |
#### Non-Default Hyperparameters
|
179 |
|
|
|
180 |
- `per_device_train_batch_size`: 32
|
181 |
- `per_device_eval_batch_size`: 32
|
182 |
- `learning_rate`: 2e-05
|
183 |
-
- `num_train_epochs`:
|
184 |
- `lr_scheduler_type`: cosine_with_restarts
|
185 |
- `warmup_ratio`: 0.1
|
186 |
- `bf16`: True
|
@@ -191,7 +240,7 @@ You can finetune this model on your own dataset.
|
|
191 |
|
192 |
- `overwrite_output_dir`: False
|
193 |
- `do_predict`: False
|
194 |
-
- `eval_strategy`:
|
195 |
- `prediction_loss_only`: True
|
196 |
- `per_device_train_batch_size`: 32
|
197 |
- `per_device_eval_batch_size`: 32
|
@@ -206,7 +255,7 @@ You can finetune this model on your own dataset.
|
|
206 |
- `adam_beta2`: 0.999
|
207 |
- `adam_epsilon`: 1e-08
|
208 |
- `max_grad_norm`: 1.0
|
209 |
-
- `num_train_epochs`:
|
210 |
- `max_steps`: -1
|
211 |
- `lr_scheduler_type`: cosine_with_restarts
|
212 |
- `lr_scheduler_kwargs`: {}
|
@@ -305,77 +354,45 @@ You can finetune this model on your own dataset.
|
|
305 |
</details>
|
306 |
|
307 |
### Training Logs
|
308 |
-
| Epoch | Step | Training Loss |
|
309 |
-
|
310 |
-
| 0
|
311 |
-
| 0.
|
312 |
-
| 0.
|
313 |
-
| 0.
|
314 |
-
| 0.
|
315 |
-
| 0.
|
316 |
-
| 0
|
317 |
-
|
|
318 |
-
|
|
319 |
-
|
|
320 |
-
|
|
321 |
-
|
|
322 |
-
| 0
|
323 |
-
|
|
324 |
-
|
|
325 |
-
|
|
326 |
-
|
|
327 |
-
|
|
328 |
-
| 0
|
329 |
-
|
|
330 |
-
|
|
331 |
-
|
|
332 |
-
|
|
333 |
-
|
|
334 |
-
| 0
|
335 |
-
|
|
336 |
-
|
|
337 |
-
|
|
338 |
-
|
|
339 |
-
|
|
340 |
-
| 0
|
341 |
-
|
|
342 |
-
|
|
343 |
-
|
|
344 |
-
|
|
345 |
-
|
|
346 |
-
| 0
|
347 |
-
| 0.5507 | 38 | 0.965 |
|
348 |
-
| 0.5652 | 39 | 0.7222 |
|
349 |
-
| 0.5797 | 40 | 0.6682 |
|
350 |
-
| 0.5942 | 41 | 0.8562 |
|
351 |
-
| 0.6087 | 42 | 0.9248 |
|
352 |
-
| 0.6232 | 43 | 0.9867 |
|
353 |
-
| 0.6377 | 44 | 0.7328 |
|
354 |
-
| 0.6522 | 45 | 0.7506 |
|
355 |
-
| 0.6667 | 46 | 0.7952 |
|
356 |
-
| 0.6812 | 47 | 0.7979 |
|
357 |
-
| 0.6957 | 48 | 1.0043 |
|
358 |
-
| 0.7101 | 49 | 1.0428 |
|
359 |
-
| 0.7246 | 50 | 0.8772 |
|
360 |
-
| 0.7391 | 51 | 0.6598 |
|
361 |
-
| 0.7536 | 52 | 0.7804 |
|
362 |
-
| 0.7681 | 53 | 0.599 |
|
363 |
-
| 0.7826 | 54 | 0.7974 |
|
364 |
-
| 0.7971 | 55 | 0.7489 |
|
365 |
-
| 0.8116 | 56 | 0.8701 |
|
366 |
-
| 0.8261 | 57 | 0.8903 |
|
367 |
-
| 0.8406 | 58 | 0.7223 |
|
368 |
-
| 0.8551 | 59 | 0.925 |
|
369 |
-
| 0.8696 | 60 | 1.0247 |
|
370 |
-
| 0.8841 | 61 | 0.7531 |
|
371 |
-
| 0.8986 | 62 | 0.9684 |
|
372 |
-
| 0.9130 | 63 | 0.7462 |
|
373 |
-
| 0.9275 | 64 | 0.8555 |
|
374 |
-
| 0.9420 | 65 | 0.8016 |
|
375 |
-
| 0.9565 | 66 | 0.7603 |
|
376 |
-
| 0.9710 | 67 | 1.1052 |
|
377 |
-
| 0.9855 | 68 | 0.9505 |
|
378 |
-
| 1.0 | 69 | 0.6259 |
|
379 |
|
380 |
|
381 |
### Framework Versions
|
|
|
1 |
---
|
2 |
base_model: allenai/specter2_base
|
3 |
library_name: sentence-transformers
|
4 |
+
metrics:
|
5 |
+
- cosine_accuracy
|
6 |
+
- dot_accuracy
|
7 |
+
- manhattan_accuracy
|
8 |
+
- euclidean_accuracy
|
9 |
+
- max_accuracy
|
10 |
pipeline_tag: sentence-similarity
|
11 |
tags:
|
12 |
- sentence-transformers
|
13 |
- sentence-similarity
|
14 |
- feature-extraction
|
15 |
- generated_from_trainer
|
16 |
+
- dataset_size:10053
|
17 |
- loss:MultipleNegativesRankingLoss
|
18 |
widget:
|
19 |
+
- source_sentence: HBV-endemic area diagnostic criteria comparison
|
20 |
sentences:
|
21 |
+
- 'Comparison of usefulness of clinical diagnostic criteria for hepatocellular carcinoma
|
22 |
+
in a hepatitis B endemic area. '
|
23 |
+
- 'The validation of the 2010 American Association for the Study of Liver Diseases
|
24 |
+
guideline for the diagnosis of hepatocellular carcinoma in an endemic area. '
|
25 |
+
- 'Which admission electrocardiographic parameter is more powerful predictor of
|
26 |
+
no-reflow in patients with acute anterior myocardial infarction who underwent
|
27 |
+
primary percutaneous intervention? '
|
28 |
+
- source_sentence: Family history of alcoholism classification schemes
|
29 |
sentences:
|
30 |
+
- 'Developing the mentor/protege relationship. '
|
31 |
+
- 'Family history of alcoholism in schizophrenia. '
|
32 |
+
- 'Family history models of alcoholism: age of onset, consequences and dependence. '
|
33 |
+
- source_sentence: Intellectual Property Commercialization
|
|
|
34 |
sentences:
|
35 |
+
- 'ALEPH-2, a suspected anxiolytic and putative hallucinogenic phenylisopropylamine
|
36 |
+
derivative, is a 5-HT2a and 5-HT2c receptor agonist. '
|
37 |
+
- 'Technology transfer and monitoring practices. '
|
38 |
+
- '[From intellectual property to commercial property]. '
|
39 |
+
- source_sentence: Transmembrane domain mutants
|
|
|
|
|
|
|
40 |
sentences:
|
41 |
+
- 'Dysgerminoma; case with pulmonary metastases; result of treatment with irradiation
|
42 |
+
and male sex hormone. '
|
43 |
+
- 'Toward a high-resolution structure of phospholamban: design of soluble transmembrane
|
44 |
+
domain mutants. '
|
45 |
+
- 'Scanning N-glycosylation mutagenesis of membrane proteins. '
|
46 |
+
- source_sentence: Six-coordinate low-spin iron(III) porphyrinate complexes
|
47 |
sentences:
|
48 |
+
- 'Molecular structures and magnetic resonance spectroscopic investigations of highly
|
49 |
+
distorted six-coordinate low-spin iron(III) porphyrinate complexes. '
|
50 |
+
- 'Saddle-shaped six-coordinate iron(iii) porphyrin complex with unusual intermediate-spin
|
51 |
+
electronic structure. '
|
52 |
+
- 'Performing Economic Evaluation of Integrated Care: Highway to Hell or Stairway
|
53 |
+
to Heaven? '
|
54 |
+
model-index:
|
55 |
+
- name: SentenceTransformer based on allenai/specter2_base
|
56 |
+
results:
|
57 |
+
- task:
|
58 |
+
type: triplet
|
59 |
+
name: Triplet
|
60 |
+
dataset:
|
61 |
+
name: triplet dev
|
62 |
+
type: triplet-dev
|
63 |
+
metrics:
|
64 |
+
- type: cosine_accuracy
|
65 |
+
value: 0.606
|
66 |
+
name: Cosine Accuracy
|
67 |
+
- type: dot_accuracy
|
68 |
+
value: 0.395
|
69 |
+
name: Dot Accuracy
|
70 |
+
- type: manhattan_accuracy
|
71 |
+
value: 0.603
|
72 |
+
name: Manhattan Accuracy
|
73 |
+
- type: euclidean_accuracy
|
74 |
+
value: 0.615
|
75 |
+
name: Euclidean Accuracy
|
76 |
+
- type: max_accuracy
|
77 |
+
value: 0.615
|
78 |
+
name: Max Accuracy
|
79 |
---
|
80 |
|
81 |
# SentenceTransformer based on allenai/specter2_base
|
|
|
128 |
model = SentenceTransformer("sentence_transformers_model_id")
|
129 |
# Run inference
|
130 |
sentences = [
|
131 |
+
'Six-coordinate low-spin iron(III) porphyrinate complexes',
|
132 |
+
'Molecular structures and magnetic resonance spectroscopic investigations of highly distorted six-coordinate low-spin iron(III) porphyrinate complexes. ',
|
133 |
+
'Saddle-shaped six-coordinate iron(iii) porphyrin complex with unusual intermediate-spin electronic structure. ',
|
134 |
]
|
135 |
embeddings = model.encode(sentences)
|
136 |
print(embeddings.shape)
|
|
|
166 |
*List how the model may foreseeably be misused and address what users ought not to do with the model.*
|
167 |
-->
|
168 |
|
169 |
+
## Evaluation
|
170 |
+
|
171 |
+
### Metrics
|
172 |
+
|
173 |
+
#### Triplet
|
174 |
+
* Dataset: `triplet-dev`
|
175 |
+
* Evaluated with [<code>TripletEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.TripletEvaluator)
|
176 |
+
|
177 |
+
| Metric | Value |
|
178 |
+
|:--------------------|:----------|
|
179 |
+
| **cosine_accuracy** | **0.606** |
|
180 |
+
| dot_accuracy | 0.395 |
|
181 |
+
| manhattan_accuracy | 0.603 |
|
182 |
+
| euclidean_accuracy | 0.615 |
|
183 |
+
| max_accuracy | 0.615 |
|
184 |
+
|
185 |
<!--
|
186 |
## Bias, Risks and Limitations
|
187 |
|
|
|
201 |
#### json
|
202 |
|
203 |
* Dataset: json
|
204 |
+
* Size: 10,053 training samples
|
205 |
* Columns: <code>anchor</code>, <code>positive</code>, and <code>negative</code>
|
206 |
* Approximate statistics based on the first 1000 samples:
|
207 |
| | anchor | positive | negative |
|
208 |
|:--------|:---------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|
|
209 |
| type | string | string | string |
|
210 |
+
| details | <ul><li>min: 4 tokens</li><li>mean: 7.49 tokens</li><li>max: 18 tokens</li></ul> | <ul><li>min: 4 tokens</li><li>mean: 20.08 tokens</li><li>max: 48 tokens</li></ul> | <ul><li>min: 4 tokens</li><li>mean: 12.46 tokens</li><li>max: 48 tokens</li></ul> |
|
211 |
* Samples:
|
212 |
+
| anchor | positive | negative |
|
213 |
+
|:-------------------------------------------------------------|:--------------------------------------------------------------------------------------------------------------------|:-------------------------------------------------------------|
|
214 |
+
| <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> |
|
215 |
+
| <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> |
|
216 |
+
| <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> |
|
217 |
* Loss: [<code>MultipleNegativesRankingLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#multiplenegativesrankingloss) with these parameters:
|
218 |
```json
|
219 |
{
|
|
|
225 |
### Training Hyperparameters
|
226 |
#### Non-Default Hyperparameters
|
227 |
|
228 |
+
- `eval_strategy`: steps
|
229 |
- `per_device_train_batch_size`: 32
|
230 |
- `per_device_eval_batch_size`: 32
|
231 |
- `learning_rate`: 2e-05
|
232 |
+
- `num_train_epochs`: 6
|
233 |
- `lr_scheduler_type`: cosine_with_restarts
|
234 |
- `warmup_ratio`: 0.1
|
235 |
- `bf16`: True
|
|
|
240 |
|
241 |
- `overwrite_output_dir`: False
|
242 |
- `do_predict`: False
|
243 |
+
- `eval_strategy`: steps
|
244 |
- `prediction_loss_only`: True
|
245 |
- `per_device_train_batch_size`: 32
|
246 |
- `per_device_eval_batch_size`: 32
|
|
|
255 |
- `adam_beta2`: 0.999
|
256 |
- `adam_epsilon`: 1e-08
|
257 |
- `max_grad_norm`: 1.0
|
258 |
+
- `num_train_epochs`: 6
|
259 |
- `max_steps`: -1
|
260 |
- `lr_scheduler_type`: cosine_with_restarts
|
261 |
- `lr_scheduler_kwargs`: {}
|
|
|
354 |
</details>
|
355 |
|
356 |
### Training Logs
|
357 |
+
| Epoch | Step | Training Loss | triplet-dev_cosine_accuracy |
|
358 |
+
|:------:|:----:|:-------------:|:---------------------------:|
|
359 |
+
| 0 | 0 | - | 0.373 |
|
360 |
+
| 0.1667 | 1 | 3.138 | - |
|
361 |
+
| 0.3333 | 2 | 2.9761 | - |
|
362 |
+
| 0.5 | 3 | 2.7135 | - |
|
363 |
+
| 0.6667 | 4 | 2.5144 | - |
|
364 |
+
| 0.8333 | 5 | 1.9797 | - |
|
365 |
+
| 1.0 | 6 | 1.2683 | - |
|
366 |
+
| 1.1667 | 7 | 1.6058 | - |
|
367 |
+
| 1.3333 | 8 | 1.3236 | - |
|
368 |
+
| 1.5 | 9 | 1.1134 | - |
|
369 |
+
| 1.6667 | 10 | 1.1205 | - |
|
370 |
+
| 1.8333 | 11 | 0.9369 | - |
|
371 |
+
| 2.0 | 12 | 0.6215 | - |
|
372 |
+
| 2.1667 | 13 | 1.0374 | - |
|
373 |
+
| 2.3333 | 14 | 0.9355 | - |
|
374 |
+
| 2.5 | 15 | 0.7118 | - |
|
375 |
+
| 2.6667 | 16 | 0.7967 | - |
|
376 |
+
| 2.8333 | 17 | 0.5739 | - |
|
377 |
+
| 3.0 | 18 | 0.4515 | - |
|
378 |
+
| 3.1667 | 19 | 0.8018 | - |
|
379 |
+
| 3.3333 | 20 | 0.6557 | - |
|
380 |
+
| 3.5 | 21 | 0.6027 | - |
|
381 |
+
| 3.6667 | 22 | 0.6747 | - |
|
382 |
+
| 3.8333 | 23 | 0.5013 | - |
|
383 |
+
| 4.0 | 24 | 0.1428 | - |
|
384 |
+
| 4.1667 | 25 | 0.5889 | 0.596 |
|
385 |
+
| 4.3333 | 26 | 0.5439 | - |
|
386 |
+
| 4.5 | 27 | 0.4742 | - |
|
387 |
+
| 4.6667 | 28 | 0.5734 | - |
|
388 |
+
| 4.8333 | 29 | 0.3966 | - |
|
389 |
+
| 5.0 | 30 | 0.1793 | - |
|
390 |
+
| 5.1667 | 31 | 0.5408 | - |
|
391 |
+
| 5.3333 | 32 | 0.5174 | - |
|
392 |
+
| 5.5 | 33 | 0.4179 | - |
|
393 |
+
| 5.6667 | 34 | 0.4589 | - |
|
394 |
+
| 5.8333 | 35 | 0.3683 | - |
|
395 |
+
| 6.0 | 36 | 0.1442 | 0.606 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
396 |
|
397 |
|
398 |
### Framework Versions
|
model.safetensors
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
size 439696224
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:08d5e8be928eb50a2410dc88bc791f5b18353249539d816ed452827e06ed169a
|
3 |
size 439696224
|