Instructions to use junnyu/roformer_small_generator with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use junnyu/roformer_small_generator with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("fill-mask", model="junnyu/roformer_small_generator")# Load model directly from transformers import AutoTokenizer, AutoModelForMaskedLM tokenizer = AutoTokenizer.from_pretrained("junnyu/roformer_small_generator") model = AutoModelForMaskedLM.from_pretrained("junnyu/roformer_small_generator", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -27,18 +27,17 @@ datasets:
|
|
| 27 |
- GPU RTX3090
|
| 28 |
- 训练时间总共耗费55h
|
| 29 |
|
| 30 |
-
#
|
| 31 |
-
[预训练日志](https://wandb.ai/junyu/electra_rotary_small_pretrain?workspace=user-junyu)
|
|
|
|
| 32 |
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
# 四、安装
|
| 36 |
```bash
|
| 37 |
pip install roformer
|
| 38 |
或
|
| 39 |
pip install git+https://github.com/JunnYu/RoFormer_pytorch.git
|
| 40 |
```
|
| 41 |
-
#
|
| 42 |
```python
|
| 43 |
import torch
|
| 44 |
from roformer import RoFormerForMaskedLM
|
|
|
|
| 27 |
- GPU RTX3090
|
| 28 |
- 训练时间总共耗费55h
|
| 29 |
|
| 30 |
+
# 四、wandb日志
|
| 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 roformer import RoFormerForMaskedLM
|