Introduction of roberta-base-finetuned-dianping-chinese
Model Details of roberta-base-finetuned-dianping-chinese
Chinese RoBERTa-Base Models for Text Classification
Model description
This is the set of 5 Chinese RoBERTa-Base classification models fine-tuned by
UER-py
, which is introduced in
this paper
. Besides, the models could also be fine-tuned by
TencentPretrain
introduced in
this paper
, which inherits UER-py to support models with parameters above one billion, and extends it to a multimodal pre-training framework.
You can download the 5 Chinese RoBERTa-Base classification models either from the
UER-py Modelzoo page
, or via HuggingFace from the links below:
You can use this model directly with a pipeline for text classification (take the case of roberta-base-finetuned-chinanews-chinese):
>>> from transformers import AutoModelForSequenceClassification,AutoTokenizer,pipeline
>>> model = AutoModelForSequenceClassification.from_pretrained('uer/roberta-base-finetuned-chinanews-chinese')
>>> tokenizer = AutoTokenizer.from_pretrained('uer/roberta-base-finetuned-chinanews-chinese')
>>> text_classification = pipeline('sentiment-analysis', model=model, tokenizer=tokenizer)
>>> text_classification("北京上个月召开了两会")
[{'label': 'mainland China politics', 'score': 0.7211663722991943}]
Training data
5 Chinese text classification datasets are used. JD full, JD binary, and Dianping datasets consist of user reviews of different sentiment polarities. Ifeng and Chinanews consist of first paragraphs of news articles of different topic classes. They are collected by
Glyph
project and more details are discussed in the corresponding
paper
.
Training procedure
Models are fine-tuned by
UER-py
on
Tencent Cloud
. We fine-tune three epochs with a sequence length of 512 on the basis of the pre-trained model
chinese_roberta_L-12_H-768
. At the end of each epoch, the model is saved when the best performance on development set is achieved. We use the same hyper-parameters on different models.
Taking the case of roberta-base-finetuned-chinanews-chinese
@article{liu2019roberta,
title={Roberta: A robustly optimized bert pretraining approach},
author={Liu, Yinhan and Ott, Myle and Goyal, Naman and Du, Jingfei and Joshi, Mandar and Chen, Danqi and Levy, Omer and Lewis, Mike and Zettlemoyer, Luke and Stoyanov, Veselin},
journal={arXiv preprint arXiv:1907.11692},
year={2019}
}
@article{zhang2017encoding,
title={Which encoding is the best for text classification in chinese, english, japanese and korean?},
author={Zhang, Xiang and LeCun, Yann},
journal={arXiv preprint arXiv:1708.02657},
year={2017}
}
@article{zhao2019uer,
title={UER: An Open-Source Toolkit for Pre-training Models},
author={Zhao, Zhe and Chen, Hui and Zhang, Jinbin and Zhao, Xin and Liu, Tao and Lu, Wei and Chen, Xi and Deng, Haotang and Ju, Qi and Du, Xiaoyong},
journal={EMNLP-IJCNLP 2019},
pages={241},
year={2019}
}
@article{zhao2023tencentpretrain,
title={TencentPretrain: A Scalable and Flexible Toolkit for Pre-training Models of Different Modalities},
author={Zhao, Zhe and Li, Yudong and Hou, Cheng and Zhao, Jing and others},
journal={ACL 2023},
pages={217},
year={2023}
Runs of uer roberta-base-finetuned-dianping-chinese on huggingface.co
3.6K
Total runs
48
24-hour runs
42
3-day runs
77
7-day runs
-2.3K
30-day runs
More Information About roberta-base-finetuned-dianping-chinese huggingface.co Model
roberta-base-finetuned-dianping-chinese huggingface.co is an AI model on huggingface.co that provides roberta-base-finetuned-dianping-chinese's model effect (), which can be used instantly with this uer roberta-base-finetuned-dianping-chinese model. huggingface.co supports a free trial of the roberta-base-finetuned-dianping-chinese model, and also provides paid use of the roberta-base-finetuned-dianping-chinese. Support call roberta-base-finetuned-dianping-chinese model through api, including Node.js, Python, http.
roberta-base-finetuned-dianping-chinese huggingface.co is an online trial and call api platform, which integrates roberta-base-finetuned-dianping-chinese's modeling effects, including api services, and provides a free online trial of roberta-base-finetuned-dianping-chinese, you can try roberta-base-finetuned-dianping-chinese online for free by clicking the link below.
uer roberta-base-finetuned-dianping-chinese online free url in huggingface.co:
roberta-base-finetuned-dianping-chinese is an open source model from GitHub that offers a free installation service, and any user can find roberta-base-finetuned-dianping-chinese on GitHub to install. At the same time, huggingface.co provides the effect of roberta-base-finetuned-dianping-chinese install, users can directly use roberta-base-finetuned-dianping-chinese installed effect in huggingface.co for debugging and trial. It also supports api for free installation.
roberta-base-finetuned-dianping-chinese install url in huggingface.co: