aps6992 commited on
Commit
b53c6b4
·
1 Parent(s): 6325ee7

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +6 -6
README.md CHANGED
@@ -8,7 +8,7 @@ datasets:
8
 
9
  # Adapter `allenai/specter2_adhoc_query` for allenai/specter2
10
 
11
- An [adapter](https://adapterhub.ml) for the `allenai/specter2` model that was trained on the [allenai/scirepeval](https://huggingface.co/datasets/allenai/scirepeval/) dataset.
12
 
13
  This adapter was created for usage with the **[adapter-transformers](https://github.com/Adapter-Hub/adapter-transformers)** library.
14
 
@@ -26,7 +26,7 @@ Now, the adapter can be loaded and activated like this:
26
  ```python
27
  from transformers import AutoAdapterModel
28
 
29
- model = AutoAdapterModel.from_pretrained("allenai/specter2")
30
  adapter_name = model.load_adapter("allenai/specter2_adhoc_query", source="hf", set_active=True)
31
  ```
32
 
@@ -50,7 +50,7 @@ Task Formats trained on:
50
  - Proximity
51
  - Adhoc Search
52
 
53
- This is the adhoc search query specific adapter. For tasks where papers have to retrieved for a short textual query, use this adapter to encode the query and [allenai/specter2_proximity](https://huggingface.co/allenai/specter2_proximity) to encode the candidates.
54
 
55
 
56
  It builds on the work done in [SciRepEval: A Multi-Format Benchmark for Scientific Document Representations](https://api.semanticscholar.org/CorpusID:254018137) and we evaluate the trained model on this benchmark as well.
@@ -79,7 +79,7 @@ It builds on the work done in [SciRepEval: A Multi-Format Benchmark for Scientif
79
 
80
  |Model|Name and HF link|Description|
81
  |--|--|--|
82
- |Retrieval*|[allenai/specter2_proximity](https://huggingface.co/allenai/specter2_proximity)|Encode papers as queries and candidates eg. Link Prediction, Nearest Neighbor Search|
83
  |Adhoc Query|[allenai/specter2_adhoc_query](https://huggingface.co/allenai/specter2_adhoc_query)|Encode short raw text queries for search tasks. (Candidate papers can be encoded with proximity)|
84
  |Classification|[allenai/specter2_classification](https://huggingface.co/allenai/specter2_classification)|Encode papers to feed into linear classifiers as features|
85
  |Regression|[allenai/specter2_regression](https://huggingface.co/allenai/specter2_regression)|Encode papers to feed into linear regressors as features|
@@ -90,10 +90,10 @@ It builds on the work done in [SciRepEval: A Multi-Format Benchmark for Scientif
90
  from transformers import AutoTokenizer, AutoModel
91
 
92
  # load model and tokenizer
93
- tokenizer = AutoTokenizer.from_pretrained('allenai/specter2')
94
 
95
  #load base model
96
- model = AutoModel.from_pretrained('allenai/specter2')
97
 
98
  #load the adapter(s) as per the required task, provide an identifier for the adapter in load_as argument and activate it
99
  model.load_adapter("allenai/specter2_adhoc_query", source="hf", load_as="specter2_adhoc_query", set_active=True)
 
8
 
9
  # Adapter `allenai/specter2_adhoc_query` for allenai/specter2
10
 
11
+ An [adapter](https://adapterhub.ml) for the [`allenai/specter2`](https://huggingface.co/allenai/specter2) model that was trained on the [allenai/scirepeval](https://huggingface.co/datasets/allenai/scirepeval/) dataset.
12
 
13
  This adapter was created for usage with the **[adapter-transformers](https://github.com/Adapter-Hub/adapter-transformers)** library.
14
 
 
26
  ```python
27
  from transformers import AutoAdapterModel
28
 
29
+ model = AutoAdapterModel.from_pretrained("allenai/specter2_base")
30
  adapter_name = model.load_adapter("allenai/specter2_adhoc_query", source="hf", set_active=True)
31
  ```
32
 
 
50
  - Proximity
51
  - Adhoc Search
52
 
53
+ **This is the adhoc search query specific adapter. For tasks where papers have to retrieved for a short textual query, use this adapter to encode the query and [allenai/specter2_proximity](https://huggingface.co/allenai/specter2_proximity) to encode the candidates.**
54
 
55
 
56
  It builds on the work done in [SciRepEval: A Multi-Format Benchmark for Scientific Document Representations](https://api.semanticscholar.org/CorpusID:254018137) and we evaluate the trained model on this benchmark as well.
 
79
 
80
  |Model|Name and HF link|Description|
81
  |--|--|--|
82
+ |Retrieval*|[allenai/specter2_proximity](https://huggingface.co/allenai/specter2)|Encode papers as queries and candidates eg. Link Prediction, Nearest Neighbor Search|
83
  |Adhoc Query|[allenai/specter2_adhoc_query](https://huggingface.co/allenai/specter2_adhoc_query)|Encode short raw text queries for search tasks. (Candidate papers can be encoded with proximity)|
84
  |Classification|[allenai/specter2_classification](https://huggingface.co/allenai/specter2_classification)|Encode papers to feed into linear classifiers as features|
85
  |Regression|[allenai/specter2_regression](https://huggingface.co/allenai/specter2_regression)|Encode papers to feed into linear regressors as features|
 
90
  from transformers import AutoTokenizer, AutoModel
91
 
92
  # load model and tokenizer
93
+ tokenizer = AutoTokenizer.from_pretrained('allenai/specter2_base')
94
 
95
  #load base model
96
+ model = AutoModel.from_pretrained('allenai/specter2_base')
97
 
98
  #load the adapter(s) as per the required task, provide an identifier for the adapter in load_as argument and activate it
99
  model.load_adapter("allenai/specter2_adhoc_query", source="hf", load_as="specter2_adhoc_query", set_active=True)