ColeH0415 commited on
Commit
e64c6b0
·
verified ·
1 Parent(s): 4db7167

CE fine-tuned epoch 1/3 best_val=0.5285

Browse files
Files changed (2) hide show
  1. README.md +38 -38
  2. model.safetensors +1 -1
README.md CHANGED
@@ -21,32 +21,32 @@ model-index:
21
  - name: CrossEncoder based on cross-encoder/ms-marco-MiniLM-L6-v2
22
  results:
23
  - task:
24
- type: cross-encoder-binary-classification
25
- name: Cross Encoder Binary Classification
26
  dataset:
27
  name: ce val
28
  type: ce-val
29
  metrics:
30
  - type: accuracy
31
- value: 0.8448484848484848
32
  name: Accuracy
33
  - type: accuracy_threshold
34
- value: -2.50508451461792
35
  name: Accuracy Threshold
36
  - type: f1
37
- value: 0.8505214368482039
38
  name: F1
39
  - type: f1_threshold
40
- value: -2.667440176010132
41
  name: F1 Threshold
42
  - type: precision
43
- value: 0.8155555555555556
44
  name: Precision
45
  - type: recall
46
- value: 0.8886198547215496
47
  name: Recall
48
  - type: average_precision
49
- value: 0.9152025768340708
50
  name: Average Precision
51
  ---
52
 
@@ -99,25 +99,25 @@ from sentence_transformers import CrossEncoder
99
  model = CrossEncoder("cross_encoder_model_id")
100
  # Get scores for pairs of inputs
101
  pairs = [
102
- ['The last time the planet was even four degrees warmer, Peter Brannen points out in The Ends of the World, his new history of the planet’s major extinction events, the oceans were hundreds of feet higher.', 'It was designed by Jung Brannen Associates.'],
103
- ['[S]unspot activity on the surface of our star has dropped to a new low.', 'This surface activity produces starspots, which are regions of strong magnetic fields and lower than normal surface temperatures.'],
104
- ['More money is dedicated within the Department of Homeland Security to climate change than what\'s spent combating "Islamist terrorists radicalizing over the Internet in the United States of America."', 'According to The Washington Post, "Online recruiting has exponentially increased, with Facebook, YouTube and the increasing sophistication of people online".'],
105
- ['Worst-case global heating scenarios may need to be revised upwards in light of a better understanding of the role of clouds, scientists have said.', 'Climate change is more accurate scientifically to describe the various effects of greenhouse gases on the world because it includes extreme weather, storms and changes in rainfall patterns, ocean acidification and sea level.".'],
106
- ['Prof Adam Scaife, a climate modelling expert at the UK’s Met Office, said the evidence for a link to shrinking Arctic ice was now good: ‘The consensus points towards that being a real effect.”', 'Category : Ceremonial officers in the United Kingdom'],
107
  ]
108
  scores = model.predict(pairs)
109
  print(scores)
110
- # [ -9.1708 2.7075 3.8609 8.2862 -10.5857]
111
 
112
  # Or rank different texts based on similarity to a single text
113
  ranks = model.rank(
114
- 'The last time the planet was even four degrees warmer, Peter Brannen points out in The Ends of the World, his new history of the planet’s major extinction events, the oceans were hundreds of feet higher.',
115
  [
116
- 'It was designed by Jung Brannen Associates.',
117
- 'This surface activity produces starspots, which are regions of strong magnetic fields and lower than normal surface temperatures.',
118
- 'According to The Washington Post, "Online recruiting has exponentially increased, with Facebook, YouTube and the increasing sophistication of people online".',
119
- 'Climate change is more accurate scientifically to describe the various effects of greenhouse gases on the world because it includes extreme weather, storms and changes in rainfall patterns, ocean acidification and sea level.".',
120
- 'Category : Ceremonial officers in the United Kingdom',
121
  ]
122
  )
123
  # [{'corpus_id': ..., 'score': ...}, {'corpus_id': ..., 'score': ...}, ...]
@@ -151,20 +151,20 @@ You can finetune this model on your own dataset.
151
 
152
  ### Metrics
153
 
154
- #### Cross Encoder Binary Classification
155
 
156
  * Dataset: `ce-val`
157
- * Evaluated with [<code>CEBinaryClassificationEvaluator</code>](https://sbert.net/docs/package_reference/cross_encoder/evaluation.html#sentence_transformers.cross_encoder.evaluation.CEBinaryClassificationEvaluator)
158
 
159
  | Metric | Value |
160
  |:----------------------|:-----------|
161
- | accuracy | 0.8448 |
162
- | accuracy_threshold | -2.5051 |
163
- | f1 | 0.8505 |
164
- | f1_threshold | -2.6674 |
165
- | precision | 0.8156 |
166
- | recall | 0.8886 |
167
- | **average_precision** | **0.9152** |
168
 
169
  <!--
170
  ## Bias, Risks and Limitations
@@ -190,13 +190,13 @@ You can finetune this model on your own dataset.
190
  | | sentence_0 | sentence_1 | label |
191
  |:--------|:----------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------|:---------------------------------------------------------------|
192
  | type | string | string | float |
193
- | details | <ul><li>min: 7 tokens</li><li>mean: 27.57 tokens</li><li>max: 82 tokens</li></ul> | <ul><li>min: 6 tokens</li><li>mean: 31.56 tokens</li><li>max: 321 tokens</li></ul> | <ul><li>min: 0.0</li><li>mean: 0.52</li><li>max: 1.0</li></ul> |
194
  * Samples:
195
- | sentence_0 | sentence_1 | label |
196
- |:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:-----------------|
197
- | <code>The last time the planet was even four degrees warmer, Peter Brannen points out in The Ends of the World, his new history of the planet’s major extinction events, the oceans were hundreds of feet higher.</code> | <code>It was designed by Jung Brannen Associates.</code> | <code>0.0</code> |
198
- | <code>[S]unspot activity on the surface of our star has dropped to a new low.</code> | <code>This surface activity produces starspots, which are regions of strong magnetic fields and lower than normal surface temperatures.</code> | <code>1.0</code> |
199
- | <code>More money is dedicated within the Department of Homeland Security to climate change than what's spent combating "Islamist terrorists radicalizing over the Internet in the United States of America."</code> | <code>According to The Washington Post, "Online recruiting has exponentially increased, with Facebook, YouTube and the increasing sophistication of people online".</code> | <code>1.0</code> |
200
  * Loss: [<code>BinaryCrossEntropyLoss</code>](https://sbert.net/docs/package_reference/cross_encoder/losses.html#binarycrossentropyloss) with these parameters:
201
  ```json
202
  {
@@ -317,11 +317,11 @@ You can finetune this model on your own dataset.
317
  ### Training Logs
318
  | Epoch | Step | ce-val_average_precision |
319
  |:-----:|:----:|:------------------------:|
320
- | -1 | -1 | 0.9152 |
321
 
322
 
323
  ### Training Time
324
- - **Training**: 33.2 seconds
325
 
326
  ### Framework Versions
327
  - Python: 3.12.13
 
21
  - name: CrossEncoder based on cross-encoder/ms-marco-MiniLM-L6-v2
22
  results:
23
  - task:
24
+ type: cross-encoder-classification
25
+ name: Cross Encoder Classification
26
  dataset:
27
  name: ce val
28
  type: ce-val
29
  metrics:
30
  - type: accuracy
31
+ value: 0.5284848484848484
32
  name: Accuracy
33
  - type: accuracy_threshold
34
+ value: 3.9093470573425293
35
  name: Accuracy Threshold
36
  - type: f1
37
+ value: 0.6677471636952999
38
  name: F1
39
  - type: f1_threshold
40
+ value: -10.441707611083984
41
  name: F1 Threshold
42
  - type: precision
43
+ value: 0.5018270401948843
44
  name: Precision
45
  - type: recall
46
+ value: 0.9975786924939467
47
  name: Recall
48
  - type: average_precision
49
+ value: 0.5295137880648401
50
  name: Average Precision
51
  ---
52
 
 
99
  model = CrossEncoder("cross_encoder_model_id")
100
  # Get scores for pairs of inputs
101
  pairs = [
102
+ ['They (Clinton and Obama) have never to my knowledge been involved in legislation nor hearings nor engagement on this issue (climate change).', 'Gore has been involved with environmental issues since 1976, when as a freshman congressman, he held the "first congressional hearings on the climate change, and co-sponsor[ed] hearings on toxic waste and global warming."'],
103
+ ['This increase is the result of humans emitting more carbon dioxide into the atmosphere and hence more being absorbed into the oceans.', 'Humans have a substantial influence on the rise of sea level because we emit increasing levels of carbon dioxide into the atmosphere through automobile use and industry.'],
104
+ ["Venus doesn't have a runaway greenhouse effect", "More recent studies have suggested that several billion years ago, Venus's atmosphere was much more like Earth's than it is now and that there were probably substantial quantities of liquid water on the surface, but a runaway greenhouse effect was caused by the evaporation of that original water, which generated a critical level of greenhouse gases in its atmosphere."],
105
+ ['At four degrees, the deadly European heat wave of 2003, which killed as many as 2,000 people a day, will be a normal summer.', 'For comparison, the 2003 European heat wave killed an estimated 35,000–70,000 people, with temperatures slightly less than in India and Pakistan.'],
106
+ ['Under the most ambitious scenarios, they found a strong likelihood that Antarctica would remain fairly stable.”', 'Its remains have been found in Africa, Antarctica, Europe, and North America.'],
107
  ]
108
  scores = model.predict(pairs)
109
  print(scores)
110
+ # [ 2.0512 5.9885 7.7773 5.7437 -3.7705]
111
 
112
  # Or rank different texts based on similarity to a single text
113
  ranks = model.rank(
114
+ 'They (Clinton and Obama) have never to my knowledge been involved in legislation nor hearings nor engagement on this issue (climate change).',
115
  [
116
+ 'Gore has been involved with environmental issues since 1976, when as a freshman congressman, he held the "first congressional hearings on the climate change, and co-sponsor[ed] hearings on toxic waste and global warming."',
117
+ 'Humans have a substantial influence on the rise of sea level because we emit increasing levels of carbon dioxide into the atmosphere through automobile use and industry.',
118
+ "More recent studies have suggested that several billion years ago, Venus's atmosphere was much more like Earth's than it is now and that there were probably substantial quantities of liquid water on the surface, but a runaway greenhouse effect was caused by the evaporation of that original water, which generated a critical level of greenhouse gases in its atmosphere.",
119
+ 'For comparison, the 2003 European heat wave killed an estimated 35,000–70,000 people, with temperatures slightly less than in India and Pakistan.',
120
+ 'Its remains have been found in Africa, Antarctica, Europe, and North America.',
121
  ]
122
  )
123
  # [{'corpus_id': ..., 'score': ...}, {'corpus_id': ..., 'score': ...}, ...]
 
151
 
152
  ### Metrics
153
 
154
+ #### Cross Encoder Classification
155
 
156
  * Dataset: `ce-val`
157
+ * Evaluated with [<code>CrossEncoderClassificationEvaluator</code>](https://sbert.net/docs/package_reference/cross_encoder/evaluation.html#sentence_transformers.cross_encoder.evaluation.CrossEncoderClassificationEvaluator)
158
 
159
  | Metric | Value |
160
  |:----------------------|:-----------|
161
+ | accuracy | 0.5285 |
162
+ | accuracy_threshold | 3.9093 |
163
+ | f1 | 0.6677 |
164
+ | f1_threshold | -10.4417 |
165
+ | precision | 0.5018 |
166
+ | recall | 0.9976 |
167
+ | **average_precision** | **0.5295** |
168
 
169
  <!--
170
  ## Bias, Risks and Limitations
 
190
  | | sentence_0 | sentence_1 | label |
191
  |:--------|:----------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------|:---------------------------------------------------------------|
192
  | type | string | string | float |
193
+ | details | <ul><li>min: 7 tokens</li><li>mean: 27.81 tokens</li><li>max: 82 tokens</li></ul> | <ul><li>min: 6 tokens</li><li>mean: 32.86 tokens</li><li>max: 247 tokens</li></ul> | <ul><li>min: 0.0</li><li>mean: 0.49</li><li>max: 1.0</li></ul> |
194
  * Samples:
195
+ | sentence_0 | sentence_1 | label |
196
+ |:----------------------------------------------------------------------------------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:-----------------|
197
+ | <code>They (Clinton and Obama) have never to my knowledge been involved in legislation nor hearings nor engagement on this issue (climate change).</code> | <code>Gore has been involved with environmental issues since 1976, when as a freshman congressman, he held the "first congressional hearings on the climate change, and co-sponsor[ed] hearings on toxic waste and global warming."</code> | <code>1.0</code> |
198
+ | <code>This increase is the result of humans emitting more carbon dioxide into the atmosphere and hence more being absorbed into the oceans.</code> | <code>Humans have a substantial influence on the rise of sea level because we emit increasing levels of carbon dioxide into the atmosphere through automobile use and industry.</code> | <code>0.0</code> |
199
+ | <code>Venus doesn't have a runaway greenhouse effect</code> | <code>More recent studies have suggested that several billion years ago, Venus's atmosphere was much more like Earth's than it is now and that there were probably substantial quantities of liquid water on the surface, but a runaway greenhouse effect was caused by the evaporation of that original water, which generated a critical level of greenhouse gases in its atmosphere.</code> | <code>0.0</code> |
200
  * Loss: [<code>BinaryCrossEntropyLoss</code>](https://sbert.net/docs/package_reference/cross_encoder/losses.html#binarycrossentropyloss) with these parameters:
201
  ```json
202
  {
 
317
  ### Training Logs
318
  | Epoch | Step | ce-val_average_precision |
319
  |:-----:|:----:|:------------------------:|
320
+ | -1 | -1 | 0.5295 |
321
 
322
 
323
  ### Training Time
324
+ - **Training**: 34.4 seconds
325
 
326
  ### Framework Versions
327
  - Python: 3.12.13
model.safetensors CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:12713a6f7d4fe5f00305ca6306aa5ef44c133ae838ac265c8b0c27a3e328d81c
3
  size 90866404
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c50a517d1275313dcf63127bb3c7e7282772be50cbbe9f885894b98627ea0d19
3
  size 90866404