Update README.md
Browse files
README.md
CHANGED
@@ -11,12 +11,15 @@ https://github.com/ZhuiyiTechnology/roformer
|
|
11 |
### pytorch版本
|
12 |
https://github.com/JunnYu/RoFormer_pytorch
|
13 |
|
|
|
|
|
|
|
|
|
|
|
14 |
## 使用
|
15 |
```python
|
16 |
-
git clone https://github.com/JunnYu/RoFormer_pytorch
|
17 |
-
cd RoFormer_pytorch
|
18 |
import torch
|
19 |
-
from
|
20 |
|
21 |
text = "今天[MASK]很好,我[MASK]去公园玩。"
|
22 |
tokenizer = RoFormerTokenizer.from_pretrained("junnyu/roformer_chinese_base")
|
|
|
11 |
### pytorch版本
|
12 |
https://github.com/JunnYu/RoFormer_pytorch
|
13 |
|
14 |
+
## 安装
|
15 |
+
```bash
|
16 |
+
pip install git+https://github.com/JunnYu/RoFormer_pytorch.git
|
17 |
+
```
|
18 |
+
|
19 |
## 使用
|
20 |
```python
|
|
|
|
|
21 |
import torch
|
22 |
+
from roformer import RoFormerForMaskedLM, RoFormerTokenizer
|
23 |
|
24 |
text = "今天[MASK]很好,我[MASK]去公园玩。"
|
25 |
tokenizer = RoFormerTokenizer.from_pretrained("junnyu/roformer_chinese_base")
|