Update README.md
Browse files
README.md
CHANGED
|
@@ -31,17 +31,10 @@ datasets:
|
|
| 31 |
- [**预训练日志**](https://wandb.ai/junyu/electra_rotary_small_pretrain?workspace=user-junyu)
|
| 32 |
- [**GLUE微调日志**](https://wandb.ai/junyu/electra_rotary_glue_100?workspace=user-junyu)
|
| 33 |
|
| 34 |
-
#
|
| 35 |
-
```bash
|
| 36 |
-
pip install roformer
|
| 37 |
-
或
|
| 38 |
-
pip install git+https://github.com/JunnYu/RoFormer_pytorch.git
|
| 39 |
-
```
|
| 40 |
-
# 六、 使用
|
| 41 |
```python
|
| 42 |
import torch
|
| 43 |
-
from
|
| 44 |
-
from transformers import ElectraTokenizer
|
| 45 |
|
| 46 |
text = "Beijing is the capital of [MASK]."
|
| 47 |
tokenizer = ElectraTokenizer.from_pretrained("junnyu/roformer_small_generator")
|
|
|
|
| 31 |
- [**预训练日志**](https://wandb.ai/junyu/electra_rotary_small_pretrain?workspace=user-junyu)
|
| 32 |
- [**GLUE微调日志**](https://wandb.ai/junyu/electra_rotary_glue_100?workspace=user-junyu)
|
| 33 |
|
| 34 |
+
# 五、 使用
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 35 |
```python
|
| 36 |
import torch
|
| 37 |
+
from transformers import ElectraTokenizer,RoFormerForMaskedLM
|
|
|
|
| 38 |
|
| 39 |
text = "Beijing is the capital of [MASK]."
|
| 40 |
tokenizer = ElectraTokenizer.from_pretrained("junnyu/roformer_small_generator")
|