aps6992 commited on
Commit
5f42533
·
1 Parent(s): f0f0e98

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +8 -7
README.md CHANGED
@@ -10,21 +10,21 @@ datasets:
10
 
11
  An [adapter](https://adapterhub.ml) for the `None` 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
 
15
  ## Usage
16
 
17
- First, install `adapter-transformers`:
18
 
19
  ```
20
- pip install -U adapter-transformers
21
  ```
22
- _Note: adapter-transformers is a fork of transformers that acts as a drop-in replacement with adapter support. [More](https://docs.adapterhub.ml/installation.html)_
23
 
24
  Now, the adapter can be loaded and activated like this:
25
 
26
  ```python
27
- from transformers import AutoAdapterModel
28
 
29
  model = AutoAdapterModel.from_pretrained("allenai/specter2_aug2023refresh_base")
30
  adapter_name = model.load_adapter("allenai/specter2_aug2023refresh_regression", source="hf", set_active=True)
@@ -92,13 +92,14 @@ It builds on the work done in [SciRepEval: A Multi-Format Benchmark for Scientif
92
  *Retrieval model should suffice for downstream task types not mentioned above
93
 
94
  ```python
95
- from transformers import AutoTokenizer, AutoModel
 
96
 
97
  # load model and tokenizer
98
  tokenizer = AutoTokenizer.from_pretrained('allenai/specter2_aug2023refresh_base')
99
 
100
  #load base model
101
- model = AutoModel.from_pretrained('allenai/specter2_aug2023refresh_base')
102
 
103
  #load the adapter(s) as per the required task, provide an identifier for the adapter in load_as argument and activate it
104
  model.load_adapter("allenai/specter2_aug2023refresh_regression", source="hf", load_as="specter2_regression", set_active=True)
 
10
 
11
  An [adapter](https://adapterhub.ml) for the `None` 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 **[adapters](https://github.com/adapter-hub/adapters)** library.
14
 
15
  ## Usage
16
 
17
+ First, install `adapters`:
18
 
19
  ```
20
+ pip install -U adapters
21
  ```
22
+ _Note: adapters is built as an add-on to transformers that acts as a drop-in replacement with adapter support. [More](https://docs.adapterhub.ml)_
23
 
24
  Now, the adapter can be loaded and activated like this:
25
 
26
  ```python
27
+ from adapters import AutoAdapterModel
28
 
29
  model = AutoAdapterModel.from_pretrained("allenai/specter2_aug2023refresh_base")
30
  adapter_name = model.load_adapter("allenai/specter2_aug2023refresh_regression", source="hf", set_active=True)
 
92
  *Retrieval model should suffice for downstream task types not mentioned above
93
 
94
  ```python
95
+ from transformers import AutoTokenizer
96
+ from adapters import AutoAdapterModel
97
 
98
  # load model and tokenizer
99
  tokenizer = AutoTokenizer.from_pretrained('allenai/specter2_aug2023refresh_base')
100
 
101
  #load base model
102
+ model = AutoAdapterModel.from_pretrained('allenai/specter2_aug2023refresh_base')
103
 
104
  #load the adapter(s) as per the required task, provide an identifier for the adapter in load_as argument and activate it
105
  model.load_adapter("allenai/specter2_aug2023refresh_regression", source="hf", load_as="specter2_regression", set_active=True)