Instructions to use junnyu/roformer_chinese_base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- paddlenlp
How to use junnyu/roformer_chinese_base with paddlenlp:
from paddlenlp.transformers import AutoTokenizer, RoFormerForMaskedLM tokenizer = AutoTokenizer.from_pretrained("junnyu/roformer_chinese_base", from_hf_hub=True) model = RoFormerForMaskedLM.from_pretrained("junnyu/roformer_chinese_base", from_hf_hub=True) - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -23,4 +23,16 @@ inputs = tokenizer(text, return_tensors="pt")
|
|
| 23 |
with torch.no_grad():
|
| 24 |
outputs = model(**inputs).last_hidden_state
|
| 25 |
print(outputs.shape)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 26 |
```
|
|
|
|
| 23 |
with torch.no_grad():
|
| 24 |
outputs = model(**inputs).last_hidden_state
|
| 25 |
print(outputs.shape)
|
| 26 |
+
```
|
| 27 |
+
## 引用
|
| 28 |
+
|
| 29 |
+
Bibtex:
|
| 30 |
+
|
| 31 |
+
```tex
|
| 32 |
+
@techreport{zhuiyiroformer,
|
| 33 |
+
title={RoFormer: Transformer with Rotary Position Embeddings - ZhuiyiAI},
|
| 34 |
+
author={Jianlin Su},
|
| 35 |
+
year={2021},
|
| 36 |
+
url="https://github.com/ZhuiyiTechnology/roformer",
|
| 37 |
+
}
|
| 38 |
```
|