Muthukumaran
commited on
Commit
•
4f34e68
1
Parent(s):
c1306eb
Update README.md
Browse files
README.md
CHANGED
@@ -23,7 +23,7 @@ pipeline_tag: sentence-similarity
|
|
23 |
## Training Data
|
24 |
|
25 |
![image/png](https://cdn-uploads.huggingface.co/production/uploads/61099e5d86580d4580767226/ZjcHW24iKsvUYBhoL7eMM.png)
|
26 |
-
Figure:Open dataset sources for sentence transformers (271M in total)
|
27 |
|
28 |
Additionally, 2.6M abstract + title pairs collected from NASA SMD documents.
|
29 |
|
@@ -43,6 +43,9 @@ Following models are evaluated:
|
|
43 |
5. nasa-smd-ibm-rtvr_v0.1
|
44 |
|
45 |
![image/png](https://cdn-uploads.huggingface.co/production/uploads/61099e5d86580d4580767226/zbeBb8mh0wgdTu1Gc-j1I.png)
|
|
|
|
|
|
|
46 |
|
47 |
## Uses
|
48 |
- Information Retreival
|
@@ -50,6 +53,21 @@ Following models are evaluated:
|
|
50 |
|
51 |
For NASA SMD related, scientific usecases.
|
52 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
53 |
## Citation
|
54 |
If you find this work useful, please cite using the following bibtex citation:
|
55 |
|
|
|
23 |
## Training Data
|
24 |
|
25 |
![image/png](https://cdn-uploads.huggingface.co/production/uploads/61099e5d86580d4580767226/ZjcHW24iKsvUYBhoL7eMM.png)
|
26 |
+
Figure: Open dataset sources for sentence transformers (271M in total)
|
27 |
|
28 |
Additionally, 2.6M abstract + title pairs collected from NASA SMD documents.
|
29 |
|
|
|
43 |
5. nasa-smd-ibm-rtvr_v0.1
|
44 |
|
45 |
![image/png](https://cdn-uploads.huggingface.co/production/uploads/61099e5d86580d4580767226/zbeBb8mh0wgdTu1Gc-j1I.png)
|
46 |
+
Figure: BEIR Evaluation Metrics
|
47 |
+
|
48 |
+
|
49 |
|
50 |
## Uses
|
51 |
- Information Retreival
|
|
|
53 |
|
54 |
For NASA SMD related, scientific usecases.
|
55 |
|
56 |
+
### Usage
|
57 |
+
|
58 |
+
```python
|
59 |
+
|
60 |
+
from sentence_transformers import SentenceTransformer, util
|
61 |
+
model = SentenceTransformer('path_to_slate_model')
|
62 |
+
input_queries = [
|
63 |
+
'query: how much protein should a female eat', 'query: summit define']
|
64 |
+
input_passages = [
|
65 |
+
"As a general guideline, the CDC's average requirement of protein for women ages 19 to 70 is 46 grams per day.
|
66 |
+
But, as you can see from this chart, you'll need to increase that if you're expecting or training for a marathon. Check out the chart below to see how much protein you should be eating each day.",
|
67 |
+
"Definition of summit for English Language Learners. : 1 the highest point of a mountain : the top of a mountain. : 2 the highest level. : 3 a meeting or series of meetings between the leaders of two or more governments."]
|
68 |
+
query_embeddings = model.encode(input_queries) passage_embeddings = model.encode(input_passages) print(util.cos_sim(query_embeddings, passage_embeddings))
|
69 |
+
```
|
70 |
+
|
71 |
## Citation
|
72 |
If you find this work useful, please cite using the following bibtex citation:
|
73 |
|