>>> 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-base', num_output_layers=num_output_layers )
>>> tokenizer = ElasticBertTokenizer.from_pretrained('fnlp/elasticbert-base')
>>> model = ElasticBertForSequenceClassification.from_pretrained('fnlp/elasticbert-base', config=config)
>>> input_ids = tokenizer.encode('The actors are fantastic .', return_tensors='pt')
>>> outputs = model(input_ids)
Citation
@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}
}
Runs of fnlp elasticbert-base on huggingface.co
5
Total runs
0
24-hour runs
0
3-day runs
0
7-day runs
-5
30-day runs
More Information About elasticbert-base huggingface.co Model
elasticbert-base huggingface.co
elasticbert-base huggingface.co is an AI model on huggingface.co that provides elasticbert-base's model effect (), which can be used instantly with this fnlp elasticbert-base model. huggingface.co supports a free trial of the elasticbert-base model, and also provides paid use of the elasticbert-base. Support call elasticbert-base model through api, including Node.js, Python, http.
elasticbert-base huggingface.co is an online trial and call api platform, which integrates elasticbert-base's modeling effects, including api services, and provides a free online trial of elasticbert-base, you can try elasticbert-base online for free by clicking the link below.
fnlp elasticbert-base online free url in huggingface.co:
elasticbert-base is an open source model from GitHub that offers a free installation service, and any user can find elasticbert-base on GitHub to install. At the same time, huggingface.co provides the effect of elasticbert-base install, users can directly use elasticbert-base installed effect in huggingface.co for debugging and trial. It also supports api for free installation.