Update README.md
Browse files
README.md
CHANGED
@@ -11,15 +11,14 @@ https://github.com/ZhuiyiTechnology/WoBERT
|
|
11 |
https://github.com/JunnYu/WoBERT_pytorch
|
12 |
|
13 |
## 安装(主要为了安装WoBertTokenizer)
|
14 |
-
|
15 |
-
|
16 |
-
```
|
17 |
|
18 |
## 使用
|
19 |
```python
|
20 |
import torch
|
21 |
from transformers import BertForMaskedLM as WoBertForMaskedLM
|
22 |
-
from
|
23 |
|
24 |
pretrained_model_or_path_list = [
|
25 |
"junnyu/wobert_chinese_plus_base", "junnyu/wobert_chinese_base"
|
|
|
11 |
https://github.com/JunnYu/WoBERT_pytorch
|
12 |
|
13 |
## 安装(主要为了安装WoBertTokenizer)
|
14 |
+
注意:transformers版本需要>=4.7.0
|
15 |
+
WoBertTokenizer的实现与RoFormerTokenizer是一样的,因此使用RoFormerTokenizer就可以了
|
|
|
16 |
|
17 |
## 使用
|
18 |
```python
|
19 |
import torch
|
20 |
from transformers import BertForMaskedLM as WoBertForMaskedLM
|
21 |
+
from transformers import RoFormerTokenizer as WoBertTokenizer
|
22 |
|
23 |
pretrained_model_or_path_list = [
|
24 |
"junnyu/wobert_chinese_plus_base", "junnyu/wobert_chinese_base"
|