Update README.md
Browse files
README.md
CHANGED
@@ -2,6 +2,31 @@
|
|
2 |
language: en
|
3 |
---
|
4 |
# CPT
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
You can easily import our continually post-trained model with HuggingFace's `transformers`:
|
6 |
|
7 |
```python
|
@@ -34,6 +59,4 @@ Note: The post-trained weights you load contain un-trained classification heads.
|
|
34 |
|
35 |
| | Restaurant | AI | ACL | AGNews | Avg. |
|
36 |
| --------------- | ------------- | ------------- | ------------- | ------------- | ------------- |
|
37 |
-
| UIC-Liu-Lab/CPT | 53.90 / 75.13 | 30.42 / 30.89 | 37.56 / 38.53 | 63.77 / 65.79 | 46.41 / 52.59 |
|
38 |
-
|
39 |
-
##
|
|
|
2 |
language: en
|
3 |
---
|
4 |
# CPT
|
5 |
+
|
6 |
+
## Requirements
|
7 |
+
|
8 |
+
First, install PyTorch by following the instructions from [the official website](https://pytorch.org). To faithfully reproduce our results, please use the correct `1.7.0` version corresponding to your platforms/CUDA versions. PyTorch version higher than `1.7.0` should also work. For example, if you use Linux and **CUDA11** ([how to check CUDA version](https://varhowto.com/check-cuda-version/)), install PyTorch by the following command,
|
9 |
+
|
10 |
+
```bash
|
11 |
+
pip install torch==1.7.0+cu110 -f https://download.pytorch.org/whl/torch_stable.html
|
12 |
+
```
|
13 |
+
|
14 |
+
If you instead use **CUDA** `<11` or **CPU**, install PyTorch by the following command,
|
15 |
+
|
16 |
+
```bash
|
17 |
+
pip install torch==1.7.0
|
18 |
+
```
|
19 |
+
|
20 |
+
Then run the following script to install the remaining dependencies,
|
21 |
+
|
22 |
+
```bash
|
23 |
+
pip install -r requirements.txt
|
24 |
+
```
|
25 |
+
|
26 |
+
**Attention**: Our model is based on `transformers==4.11.3` and `adapter-transformers==2.2.0`. Using them from other versions may cause some unexpected bugs.
|
27 |
+
|
28 |
+
## Use CPT with Huggingface
|
29 |
+
|
30 |
You can easily import our continually post-trained model with HuggingFace's `transformers`:
|
31 |
|
32 |
```python
|
|
|
59 |
|
60 |
| | Restaurant | AI | ACL | AGNews | Avg. |
|
61 |
| --------------- | ------------- | ------------- | ------------- | ------------- | ------------- |
|
62 |
+
| UIC-Liu-Lab/CPT | 53.90 / 75.13 | 30.42 / 30.89 | 37.56 / 38.53 | 63.77 / 65.79 | 46.41 / 52.59 |
|
|
|
|