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
File size: 586 Bytes
b101fde | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | {
"init_args": [
{
"vocab_size": 50000,
"hidden_size": 768,
"num_hidden_layers": 12,
"num_attention_heads": 12,
"intermediate_size": 3072,
"hidden_act": "gelu",
"hidden_dropout_prob": 0.1,
"attention_probs_dropout_prob": 0.1,
"max_position_embeddings": 1536,
"type_vocab_size": 2,
"initializer_range": 0.02,
"pad_token_id": 0,
"init_class": "RoFormerModel"
}
],
"init_class": "RoFormerForPretraining"
} |