Sheshera Mysore
commited on
Commit
•
0bde922
1
Parent(s):
a83a9b4
Usage instructions update.
Browse files
README.md
CHANGED
@@ -39,21 +39,7 @@ This model is trained for document similarity tasks in **biomedical** scientific
|
|
39 |
|
40 |
### How to use
|
41 |
|
42 |
-
|
43 |
-
|
44 |
-
```
|
45 |
-
from transformers import AutoModel, AutoTokenizer
|
46 |
-
aspire_bienc = AutoModel.from_pretrained('allenai/aspire-biencoder-biomed-spec')
|
47 |
-
aspire_tok = AutoTokenizer.from_pretrained('allenai/aspire-biencoder-biomed-spec')
|
48 |
-
title = "Multi-Vector Models with Textual Guidance for Fine-Grained Scientific Document Similarity"
|
49 |
-
abstract = "We present a new scientific document similarity model based on matching fine-grained aspects of texts."
|
50 |
-
d=[title+aspire_tok.sep_token+abstract]
|
51 |
-
inputs = aspire_tok(d, padding=True, truncation=True, return_tensors="pt", max_length=512)
|
52 |
-
result = aspire_bienc(**inputs)
|
53 |
-
clsrep = result.last_hidden_state[:,0,:]
|
54 |
-
```
|
55 |
-
|
56 |
-
**`aspire-biencoder-biomed-scib-full`**, can be used as follows: 1) Download the [`aspire-biencoder-biomed-scib-full.zip`](https://drive.google.com/file/d/1MDCv9Fc33eP015HTWKi50WYXixh72h5c/view?usp=sharing), and 2) Use it per this example usage script: [`aspire/examples/ex_aspire_bienc.py`](https://github.com/allenai/aspire/blob/main/examples/ex_aspire_bienc.py)
|
57 |
|
58 |
### Variable and metrics
|
59 |
This model is evaluated on information retrieval datasets with document level queries. Here we report performance on RELISH (biomedical/English), and TRECCOVID (biomedical/English). These are detailed on [github](https://github.com/allenai/aspire) and in our [paper](https://arxiv.org/abs/2111.08366). These datasets represent a abstract level retrieval task, where given a query scientific abstract the task requires the retrieval of relevant candidate abstracts.
|
|
|
39 |
|
40 |
### How to use
|
41 |
|
42 |
+
Follow instructions for use detailed on the model github repo: https://github.com/allenai/aspire#specter-cocite
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
43 |
|
44 |
### Variable and metrics
|
45 |
This model is evaluated on information retrieval datasets with document level queries. Here we report performance on RELISH (biomedical/English), and TRECCOVID (biomedical/English). These are detailed on [github](https://github.com/allenai/aspire) and in our [paper](https://arxiv.org/abs/2111.08366). These datasets represent a abstract level retrieval task, where given a query scientific abstract the task requires the retrieval of relevant candidate abstracts.
|