Instructions to use weiweishi/roc-bert-base-zh with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use weiweishi/roc-bert-base-zh with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("fill-mask", model="weiweishi/roc-bert-base-zh")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForPreTraining tokenizer = AutoTokenizer.from_pretrained("weiweishi/roc-bert-base-zh") model = AutoModelForPreTraining.from_pretrained("weiweishi/roc-bert-base-zh", device_map="auto") - Inference
- Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -21,6 +21,8 @@ Pretrained code: https://github.com/sww9370/RoCBert
|
|
| 21 |
|
| 22 |
## How to use
|
| 23 |
```Python
|
|
|
|
|
|
|
| 24 |
from transformers import AutoTokenizer, AutoModel
|
| 25 |
tokenizer = AutoTokenizer.from_pretrained("weiweishi/roc-bert-base-zh")
|
| 26 |
model = AutoModel.from_pretrained("weiweishi/roc-bert-base-zh")
|
|
|
|
| 21 |
|
| 22 |
## How to use
|
| 23 |
```Python
|
| 24 |
+
# pip install transformers>=4.25.1
|
| 25 |
+
|
| 26 |
from transformers import AutoTokenizer, AutoModel
|
| 27 |
tokenizer = AutoTokenizer.from_pretrained("weiweishi/roc-bert-base-zh")
|
| 28 |
model = AutoModel.from_pretrained("weiweishi/roc-bert-base-zh")
|