Downloads · 30 days
16
2% of all-time downloads
OpenMOSS-Team/elasticbert-chinese-base
elasticbert-chinese-base is a fill-mask model from OpenMOSS-Team. Use it when you need the model to fill a missing word. It is set up for transformers.
This is an implementation of the base version of ElasticBERT-Chinese.
Downloads · 30 days
16
2% of all-time downloads
All-time downloads
653
Public
Repo size
517 MB
Likes
1
Public
Click a slice to open those files.
.bin517 MB · 100%
From the Hugging Face model README
This is an implementation of the base version of ElasticBERT-Chinese.
Towards Efficient NLP: A Standard Evaluation and A Strong Baseline
Xiangyang Liu, Tianxiang Sun, Junliang He, Lingling Wu, Xinyu Zhang, Hao Jiang, Zhao Cao, Xuanjing Huang, Xipeng Qiu
>>> from transformers import BertTokenizer as ElasticBertTokenizer
>>> from models.configuration_elasticbert import ElasticBertConfig
>>> from models.modeling_elasticbert import ElasticBertForSequenceClassification
>>> num_output_layers = 1
>>> config = ElasticBertConfig.from_pretrained('fnlp/elasticbert-chinese-base', num_output_layers=num_output_layers )
>>> tokenizer = ElasticBertTokenizer.from_pretrained('fnlp/elasticbert-chinese-base')
>>> model = ElasticBertForSequenceClassification.from_pretrained('fnlp/elasticbert-chinese-base', config=config)
>>> input_ids = tokenizer.encode('我爱中国!', return_tensors='pt')
>>> outputs = model(input_ids)
@article{liu2021elasticbert,
author = {Xiangyang Liu and
Tianxiang Sun and
Junliang He and
Lingling Wu and
Xinyu Zhang and
Hao Jiang and
Zhao Cao and
Xuanjing Huang and
Xipeng Qiu},
title = {Towards Efficient {NLP:} {A} Standard Evaluation and {A} Strong Baseline},
journal = {CoRR},
volume = {abs/2110.07038},
year = {2021},
url = {https://arxiv.org/abs/2110.07038},
eprinttype = {arXiv},
eprint = {2110.07038},
timestamp = {Fri, 22 Oct 2021 13:33:09 +0200},
biburl = {https://dblp.org/rec/journals/corr/abs-2110-07038.bib},
bibsource = {dblp computer science bibliography, https://dblp.org}
}