🚀 Erlangshen-Roberta-330M-NLI
This is a fine-tuned version of the Chinese RoBERTa model for Natural Language Inference (NLI) tasks, offering high performance in multiple NLI datasets.
🚀 Quick Start
This model is a fine-tuned version of the Chinese RoBERTa-wwm-ext-large model on several NLI datasets. It is designed to handle natural language inference tasks effectively.
✨ Features
- Based on the powerful chinese-roberta-wwm-ext-large architecture.
- Fine-tuned on 4 Chinese Natural Language Inference (NLI) datasets, with a total of 1,014,787 samples.
- Demonstrates excellent performance in multiple NLI benchmarks.
📦 Installation
No specific installation steps are provided in the original document.
📚 Documentation
Model Taxonomy
Property |
Details |
Demand |
General |
Task |
Natural Language Understanding (NLU) |
Series |
Erlangshen |
Model |
Roberta |
Parameter |
330M |
Extra |
Chinese - Natural Language Inference (Chinese-NLI) |
Model Information
Based on chinese-roberta-wwm-ext-large, we fine-tuned an NLI version on 4 Chinese Natural Language Inference (NLI) datasets, with totaling 1,014,787 samples.
Performance
Model |
cmnli |
ocnli |
snli |
Erlangshen-Roberta-110M-NLI |
80.83 |
78.56 |
88.01 |
Erlangshen-Roberta-330M-NLI |
82.25 |
79.82 |
88 |
Erlangshen-MegatronBert-1.3B-NLI |
84.52 |
84.17 |
88.67 |
💻 Usage Examples
Basic Usage
from transformers import BertForSequenceClassification
from transformers import BertTokenizer
import torch
tokenizer=BertTokenizer.from_pretrained('IDEA-CCNL/Erlangshen-Roberta-330M-NLI')
model=BertForSequenceClassification.from_pretrained('IDEA-CCNL/Erlangshen-Roberta-330M-NLI')
texta='今天的饭不好吃'
textb='今天心情不好'
output=model(torch.tensor([tokenizer.encode(texta,textb)]))
print(torch.nn.functional.softmax(output.logits,dim=-1))
📄 License
This project is licensed under the Apache-2.0 license.
📚 Citation
If you are using the resource for your work, please cite the our paper:
@article{fengshenbang,
author = {Jiaxing Zhang and Ruyi Gan and Junjie Wang and Yuxiang Zhang and Lin Zhang and Ping Yang and Xinyu Gao and Ziwei Wu and Xiaoqun Dong and Junqing He and Jianheng Zhuo and Qi Yang and Yongfeng Huang and Xiayu Li and Yanghan Wu and Junyu Lu and Xinyu Zhu and Weifeng Chen and Ting Han and Kunhao Pan and Rui Wang and Hao Wang and Xiaojun Wu and Zhongshen Zeng and Chongpei Chen},
title = {Fengshenbang 1.0: Being the Foundation of Chinese Cognitive Intelligence},
journal = {CoRR},
volume = {abs/2209.02970},
year = {2022}
}
You can also cite our website:
@misc{Fengshenbang-LM,
title={Fengshenbang-LM},
author={IDEA-CCNL},
year={2021},
howpublished={\url{https://github.com/IDEA-CCNL/Fengshenbang-LM}},
}