Downloads · 30 days
9.1K
8% of all-time downloads
sijunhe/nezha-cn-base
nezha-cn-base is a fill-mask model from sijunhe. Use it when you need the model to fill a missing word. It is set up for transformers. The card lists the license as afl-3.0.
Please use 'Bert' related tokenizer classes and 'Nezha' related model classes
Downloads · 30 days
9.1K
8% of all-time downloads
All-time downloads
119K
Public
Repo size
1.2 GB
Likes
12
Public
Click a slice to open those files.
.bin410 MB · 100%
From the Hugging Face model README
Please use 'Bert' related tokenizer classes and 'Nezha' related model classes
NEZHA: Neural Contextualized Representation for Chinese Language Understanding Junqiu Wei, Xiaozhe Ren, Xiaoguang Li, Wenyong Huang, Yi Liao, Yasheng Wang, Jiashu Lin, Xin Jiang, Xiao Chen and Qun Liu.
The original checkpoints can be found here
from transformers import BertTokenizer, NezhaModel
tokenizer = BertTokenizer.from_pretrained('sijunhe/nezha-cn-base')
model = NezhaModel.from_pretrained("sijunhe/nezha-cn-base")
text = "我爱北京天安门"
encoded_input = tokenizer(text, return_tensors='pt')
output = model(**encoded_input)