greatakela commited on
Commit
25b27e5
·
verified ·
1 Parent(s): e246c89

Add new SentenceTransformer model

Browse files
Files changed (2) hide show
  1. README.md +75 -76
  2. model.safetensors +1 -1
README.md CHANGED
@@ -8,59 +8,58 @@ tags:
8
  - loss:TripletLoss
9
  base_model: distilbert/distilroberta-base
10
  widget:
11
- - source_sentence: Indeed. Allow me to rephrase. Will you join me for dinner? I am
12
- honoured, Commander. Are the guards also invited? Mister Spock. That corridor
13
- is forbidden to all but loyal Romulans. Of course. I shall obey your restrictions.[SEP]I
14
- hope that one day there will be no need for you to observe any restrictions.
15
  sentences:
16
- - ' EKG showed arrhythmia, pRobably just a mild heart attack.'
17
- - It would be illogical to assume that all conditions remain stable.
18
- - Your very presence will destroy the people you seek. Surely you know that.
19
- - source_sentence: Mudd. And he has Christine. She's in danger. My love. He's going
20
- planet side. No. Not with my Christine. Relax, darling. I'll set you down somewhere
21
- safe and then I'll be off discreetly. We must go after them, Captain. I'll lead
22
- a landing party.[SEP]Spock, you're obviously not yourself. Maybe some rest.
 
 
 
 
 
23
  sentences:
24
- - ' If it''s meningococcus, half the passengers on this plane could get infected
25
- and die before we reach New York.'
26
- - Tactically well planned. When the Federation investigates, we'll be recorded as
27
- just another mysterious starship disappearance.
28
- - Captain, I insist upon going. Christine. I can't stand the thought of any danger
29
- to her, to the woman I love.
30
- - source_sentence: That is precisely why we should not fight. My ship is at stake.
31
- I will not harm others, Captain. His convictions are most profound in this matter,
32
- Captain. So are mine, Spock. If I believed that there was a peaceful way out of
33
- this[SEP]The risk will be mine alone. If I fail, you lose nothing. After all,
34
- I'm no warrior.
 
 
 
35
  sentences:
36
- - The captain knows that I have fought at his side before and will do so now, if
37
- need be. However, I too, am a Vulcan, bred to peace. Let him attempt it.
38
- - ' A torch test could "�'
39
- - I have retained more strength than any of you. My internal structure is different,
40
- Captain, my life span longer. It is wiser if I go to the temple to try and find
41
- the communicators and contact the ship.
42
- - source_sentence: So now it has virtually unlimited power. Captain, what'll we do?
43
- Spock, Scotty, come with me. Report, Spock. The multitronic unit is drawing more
44
- and more power directly from the warp engines. The computer now controls all helm,
45
- navigation, and engineering functions. And communications and fire control.[SEP]We'll
46
- reach the rendezvous point for the war games within an hour. We must regain control
47
- of the ship by then.
48
  sentences:
49
- - There is one possibility. The automatic helm navigation circuit relays might be
50
- disrupted from engineering level three.
51
- - Nothing there.
52
- - ' Wow, you remember where our first date was? I didn''t think you were paying
53
- attention.'
54
- - source_sentence: I want facts, not poetry. I have given you the facts, Captain.
55
- The entire magnetic field in this solar system simply blinked. The planet below,
56
- the mass of which we're measuring, attained zero gravity. That's impossible. What
57
- you're describing Is non-existence. Standard General Alert signal from Starfleet
58
- Command, Captain.[SEP]All stations to immediate alert status. Stand by.
59
  sentences:
60
- - As you may recall from your histories, this conflict was fought,
61
- - ' Mm hmm. [Quick wink to the parents.] Okay, lean forwards. Now hold very still,
62
- okay? [He picks at Clancy''s neck with some tweezers.] Got it!'
63
- - Captain, scanners now report a life object on the planet surface below.
64
  pipeline_tag: sentence-similarity
65
  library_name: sentence-transformers
66
  metrics:
@@ -76,7 +75,7 @@ model-index:
76
  type: evaluator_enc
77
  metrics:
78
  - type: cosine_accuracy
79
- value: 0.9995912313461304
80
  name: Cosine Accuracy
81
  - task:
82
  type: triplet
@@ -86,7 +85,7 @@ model-index:
86
  type: evaluator_val
87
  metrics:
88
  - type: cosine_accuracy
89
- value: 0.9861111044883728
90
  name: Cosine Accuracy
91
  ---
92
 
@@ -139,9 +138,9 @@ from sentence_transformers import SentenceTransformer
139
  model = SentenceTransformer("greatakela/gnlp_hw1_encoder")
140
  # Run inference
141
  sentences = [
142
- "I want facts, not poetry. I have given you the facts, Captain. The entire magnetic field in this solar system simply blinked. The planet below, the mass of which we're measuring, attained zero gravity. That's impossible. What you're describing Is non-existence. Standard General Alert signal from Starfleet Command, Captain.[SEP]All stations to immediate alert status. Stand by.",
143
- 'Captain, scanners now report a life object on the planet surface below.',
144
- " Mm hmm. [Quick wink to the parents.] Okay, lean forwards. Now hold very still, okay? [He picks at Clancy's neck with some tweezers.] Got it!",
145
  ]
146
  embeddings = model.encode(sentences)
147
  print(embeddings.shape)
@@ -188,7 +187,7 @@ You can finetune this model on your own dataset.
188
 
189
  | Metric | evaluator_enc | evaluator_val |
190
  |:--------------------|:--------------|:--------------|
191
- | **cosine_accuracy** | **0.9996** | **0.9861** |
192
 
193
  <!--
194
  ## Bias, Risks and Limitations
@@ -211,16 +210,16 @@ You can finetune this model on your own dataset.
211
  * Size: 4,893 training samples
212
  * Columns: <code>sentence_0</code>, <code>sentence_1</code>, and <code>sentence_2</code>
213
  * Approximate statistics based on the first 1000 samples:
214
- | | sentence_0 | sentence_1 | sentence_2 |
215
- |:--------|:-----------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------|
216
- | type | string | string | string |
217
- | details | <ul><li>min: 2 tokens</li><li>mean: 83.72 tokens</li><li>max: 128 tokens</li></ul> | <ul><li>min: 4 tokens</li><li>mean: 19.05 tokens</li><li>max: 128 tokens</li></ul> | <ul><li>min: 4 tokens</li><li>mean: 19.47 tokens</li><li>max: 128 tokens</li></ul> |
218
  * Samples:
219
- | sentence_0 | sentence_1 | sentence_2 |
220
- |:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:------------------------------------------------------------------------------------------------------------|:----------------------------------------------------------------------------------------------------------------------------------|
221
- | <code>I'm not a plebe. This is today, fifteen years later. What are you doing here? I'm being exactly what you expect me to be, Jimmy boy. Did you enjoy it, Captain? Yes, I enjoyed it. After all these years. I did enjoy it. The one thing I wanted to do after all these years was to beat the tar out of Finnegan. Which supports a theory I've been formulating.[SEP]That we're all meeting people and things that we happen to be thinking about at the moment.</code> | <code>Yes. Somehow our thoughts are read, these things are quickly manufactured and provided for us.</code> | <code> You did not suddenly fall in love with me. You were looking for something, and I happened to be st "�</code> |
222
- | <code>McCoy here. Received and understood. But we still have some doubts up here, Captain. Can you tell us any more? Not really. When do you plan to beam back up, Captain? I think we'll spend the night here, Mister Spock.[SEP]No! No, no, no.</code> | <code>And you will continue to check in every four hours?</code> | <code> Is Everything ok?</code> |
223
- | <code>Do you think it would cause a complete breakdown of discipline if a lowly lieutenant kissed a Starship Captain on the bridge of his ship? Let's try. See? No change. Discipline goes on. And so must the Enterprise. Goodbye, Jim. Goodbye, Areel. Better luck next time. I had pretty good luck this time. I lost, didn't l?[SEP]She's a very good lawyer.</code> | <code>Obviously.</code> | <code> [over PA system, somberly] Ladies and gentlemen, we have a passenger with a confirmed case of bacterial meningitis.</code> |
224
  * Loss: [<code>TripletLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#tripletloss) with these parameters:
225
  ```json
226
  {
@@ -359,19 +358,19 @@ You can finetune this model on your own dataset.
359
  ### Training Logs
360
  | Epoch | Step | Training Loss | evaluator_enc_cosine_accuracy | evaluator_val_cosine_accuracy |
361
  |:------:|:----:|:-------------:|:-----------------------------:|:-----------------------------:|
362
- | -1 | -1 | - | 0.5931 | - |
363
- | 0.4902 | 300 | - | 0.9832 | - |
364
- | 0.8170 | 500 | 1.0694 | - | - |
365
- | 0.9804 | 600 | - | 0.9926 | - |
366
- | 1.0 | 612 | - | 0.9939 | - |
367
- | 1.4706 | 900 | - | 0.9965 | - |
368
- | 1.6340 | 1000 | 0.1834 | - | - |
369
- | 1.9608 | 1200 | - | 0.9988 | - |
370
- | 2.0 | 1224 | - | 0.9988 | - |
371
- | 2.4510 | 1500 | 0.0539 | 0.9992 | - |
372
- | 2.9412 | 1800 | - | 0.9996 | - |
373
- | 3.0 | 1836 | - | 0.9996 | - |
374
- | -1 | -1 | - | - | 0.9861 |
375
 
376
 
377
  ### Framework Versions
 
8
  - loss:TripletLoss
9
  base_model: distilbert/distilroberta-base
10
  widget:
11
+ - source_sentence: Leave me alone! Have you gone daft? Mister Spock needs me! Let
12
+ go! That will be quite enough. Thank you, doctor.; Please, release her.[SEP]What's
13
+ this all about?
 
14
  sentences:
15
+ - ' You know, the lab here, they have a paid intern position. It''s usually given
16
+ to one of the kids from the universities but, if you want, I could pRobably get
17
+ you an interview. There''s some entry lEvel stuff, some gofer work. But you''d
18
+ also have access to a lot of cool things.'
19
+ - She was doing as I requested, Mister Scott. A Vulcan form of self-healing.
20
+ - Thasians have been referred to in our records as having the power to transmute
21
+ objects or render substances invisible. It has generally been regarded as legend,
22
+ but Charlie does seems to possess this same power.
23
+ - source_sentence: Why would you do this? Because the needs of the one ...outweigh
24
+ the needs of the many. I have been ...and ever shall be ...your friend. Yes! Yes,
25
+ Spock. The ship. ...Out of danger?[SEP]You saved the ship, ...You saved us all.
26
+ Don't you remember?
27
  sentences:
28
+ - ' My wife had taken a sleeping pill and gone to bed. It was Christmas Eve. Kyle
29
+ popped corn in the fireplace. He Managed to knock loose some tinder. Wrapping
30
+ paper caught on fire. Spread so fast. I got Kyle outta there. When I went back
31
+ in for... [Chokes, takes a beat, then.]'
32
+ - In two days, you'll have your own hands, Thalassa. Mechanically efficient and
33
+ quite human-looking. Android robot hands, of course. Hands without feeling. Enjoy
34
+ the taste of life while you can.
35
+ - Jim, ...your name is Jim.
36
+ - source_sentence: Captain, if something hasn't worked out and therefore has no scientific
37
+ fact Shall we leave it up to the doctor? Since you brought me down here for advice,
38
+ Captain One of the advantages of being a Captain, Doctor, is being able to ask
39
+ for advice without necessarily having to take it. I think I'll have to award that
40
+ round to the Captain, Helen. You're fighting over your weight. All right, let's
41
+ take a look.[SEP]I'm not a criminal! I do not require neural neutraliser.
42
  sentences:
43
+ - Neural neutraliser. Can you explain that, Doctor Van Gelder?
44
+ - ' And the disorientation?'
45
+ - I'm aware of these facts. Please get on with the job. Computer.
46
+ - source_sentence: We're picking up an object, sir. Much larger, coming toward us.
47
+ Coming. Exceptionally strong contact. Not visual yet. Distant spectrograph. Metallic,
48
+ similar to cube. Much greater energy reading. There, sir. Half speed. Prepare
49
+ for evasive action.[SEP]Reducing to warp two, sir.
 
 
 
 
 
50
  sentences:
51
+ - Tractor beam, Captain. Something's grabbed us, hard.
52
+ - Exactly.
53
+ - ' There''s a blockage in the urinary tract. Simple terms, your baby can''t pee.
54
+ His bladder is swollen and it''s crushing his lungs.'
55
+ - source_sentence: My father says you have been my friend. ...You came back for me.
56
+ You would have done the same for me. Why would you do this? Because the needs
57
+ of the one ...outweigh the needs of the many. I have been ...and ever shall be
58
+ ...your friend.[SEP]Yes! Yes, Spock.
 
 
59
  sentences:
60
+ - But a defensible entrance, Captain.
61
+ - ' No, blood tests were all normal. And he clotted in six minutes.'
62
+ - The ship. ...Out of danger?
 
63
  pipeline_tag: sentence-similarity
64
  library_name: sentence-transformers
65
  metrics:
 
75
  type: evaluator_enc
76
  metrics:
77
  - type: cosine_accuracy
78
+ value: 0.9989781379699707
79
  name: Cosine Accuracy
80
  - task:
81
  type: triplet
 
85
  type: evaluator_val
86
  metrics:
87
  - type: cosine_accuracy
88
+ value: 0.9872685074806213
89
  name: Cosine Accuracy
90
  ---
91
 
 
138
  model = SentenceTransformer("greatakela/gnlp_hw1_encoder")
139
  # Run inference
140
  sentences = [
141
+ 'My father says you have been my friend. ...You came back for me. You would have done the same for me. Why would you do this? Because the needs of the one ...outweigh the needs of the many. I have been ...and ever shall be ...your friend.[SEP]Yes! Yes, Spock.',
142
+ 'The ship. ...Out of danger?',
143
+ ' No, blood tests were all normal. And he clotted in six minutes.',
144
  ]
145
  embeddings = model.encode(sentences)
146
  print(embeddings.shape)
 
187
 
188
  | Metric | evaluator_enc | evaluator_val |
189
  |:--------------------|:--------------|:--------------|
190
+ | **cosine_accuracy** | **0.999** | **0.9873** |
191
 
192
  <!--
193
  ## Bias, Risks and Limitations
 
210
  * Size: 4,893 training samples
211
  * Columns: <code>sentence_0</code>, <code>sentence_1</code>, and <code>sentence_2</code>
212
  * Approximate statistics based on the first 1000 samples:
213
+ | | sentence_0 | sentence_1 | sentence_2 |
214
+ |:--------|:-----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------|
215
+ | type | string | string | string |
216
+ | details | <ul><li>min: 2 tokens</li><li>mean: 83.38 tokens</li><li>max: 128 tokens</li></ul> | <ul><li>min: 4 tokens</li><li>mean: 18.38 tokens</li><li>max: 91 tokens</li></ul> | <ul><li>min: 4 tokens</li><li>mean: 18.48 tokens</li><li>max: 102 tokens</li></ul> |
217
  * Samples:
218
+ | sentence_0 | sentence_1 | sentence_2 |
219
+ |:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:----------------------------------------------------------------------------------------------------------------------------------------|:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
220
+ | <code>The usage is correct. The creator was simply testing your memory banks. There was much damage in the accident. Mister Singh. Come here a moment. This unit will see to your needs. Sir? I'll be back in a moment. Gentlemen, come with me.[SEP]You're on to something, Spock. What is it?</code> | <code>I've correlated all the available information on the Nomad probe, and I'm convinced that this object is indeed that probe.</code> | <code> DIC would explain both the!</code> |
221
+ | <code>Mister Spock, how many people are on Memory Alpha? It varies with the number of scholars, researchers, and scientists from the various Federation planets who are using the computer complex. Captain, we are within orbit range. Lock into orbit. Aye, sir.[SEP]It is leaving Memory Alpha, Captain.</code> | <code>Sensors give no readings of generated energy from Memory Alpha, Captain.</code> | <code> Weird huh?</code> |
222
+ | <code>We're guiding around most of the time ripples now. Mister Spock? All plotted but one, Captain. Coming up on it now. Seems to be fairly heavy displacement. Bones! Get back to your positions. The hypo, Captain.[SEP]It was set for cordrazine.</code> | <code>Empty.</code> | <code> Actually he's only in the Navy when they sang, In The Navy. The rest of the time he's just in generic fatigues. [House stares at him.] What? You brought it up! [House starts to walk out.] You didn't flush.</code> |
223
  * Loss: [<code>TripletLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#tripletloss) with these parameters:
224
  ```json
225
  {
 
358
  ### Training Logs
359
  | Epoch | Step | Training Loss | evaluator_enc_cosine_accuracy | evaluator_val_cosine_accuracy |
360
  |:------:|:----:|:-------------:|:-----------------------------:|:-----------------------------:|
361
+ | -1 | -1 | - | 0.5866 | - |
362
+ | 0.4902 | 300 | - | 0.9875 | - |
363
+ | 0.8170 | 500 | 1.085 | - | - |
364
+ | 0.9804 | 600 | - | 0.9935 | - |
365
+ | 1.0 | 612 | - | 0.9937 | - |
366
+ | 1.4706 | 900 | - | 0.9967 | - |
367
+ | 1.6340 | 1000 | 0.1573 | - | - |
368
+ | 1.9608 | 1200 | - | 0.9980 | - |
369
+ | 2.0 | 1224 | - | 0.9980 | - |
370
+ | 2.4510 | 1500 | 0.0733 | 0.9990 | - |
371
+ | 2.9412 | 1800 | - | 0.9990 | - |
372
+ | 3.0 | 1836 | - | 0.9990 | - |
373
+ | -1 | -1 | - | - | 0.9873 |
374
 
375
 
376
  ### Framework Versions
model.safetensors CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:f0502135f9f964ae538e564593524e73ba2fbe10f4e311f1ba3be445c87d2844
3
  size 328485128
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2cfe9d7893779dae3c9a4037e4fa4707d7024e9f932525e38aca6809f3070856
3
  size 328485128