🚀 二郎神-RoBERTa-330M-情感分析模型
二郎神-RoBERTa-330M-情感分析模型是中文的RoBERTa-wwm-ext-large在數個情感分析任務微調後的版本,可用於自然語言理解領域的情感分析任務。
🚀 快速開始
本模型可用於中文情感分析任務。你可以按照以下步驟使用該模型:
from transformers import BertForSequenceClassification
from transformers import BertTokenizer
import torch
tokenizer=BertTokenizer.from_pretrained('IDEA-CCNL/Erlangshen-Roberta-330M-Sentiment')
model=BertForSequenceClassification.from_pretrained('IDEA-CCNL/Erlangshen-Roberta-330M-Sentiment')
text='今天心情不好'
output=model(torch.tensor([tokenizer.encode(text)]))
print(torch.nn.functional.softmax(output.logits,dim=-1))
✨ 主要特性
- 基於中文的RoBERTa-wwm-ext-large模型進行微調,適用於中文情感分析任務。
- 在多箇中文情感分析數據集上進行微調,具有較好的下游任務效果。
📦 安裝指南
文檔未提及安裝步驟,可參考Hugging Face Transformers庫的安裝方式來安裝依賴。
📚 詳細文檔
模型分類
需求 |
任務 |
系列 |
模型 |
參數 |
額外 |
通用 |
自然語言理解 |
二郎神 |
Roberta |
330M |
中文 - 情感分析 |
模型信息
基於chinese-roberta-wwm-ext-large,我們在收集的8箇中文領域的情感分析數據集,總計227347個樣本上微調了一個情感分析版本。
下游效果
模型 |
ASAP - SENT |
ASAP - ASPECT |
ChnSentiCorp |
Erlangshen - Roberta - 110M - Sentiment |
97.77 |
97.31 |
96.61 |
Erlangshen - Roberta - 330M - Sentiment |
97.9 |
97.51 |
96.66 |
Erlangshen - MegatronBert - 1.3B - Sentiment |
98.1 |
97.8 |
97 |
📄 許可證
本項目採用Apache-2.0許可證。
🔗 相關鏈接
📄 引用
如果您在您的工作中使用了我們的模型,可以引用我們的論文:
@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}
}
也可以引用我們的網站:
@misc{Fengshenbang-LM,
title={Fengshenbang-LM},
author={IDEA-CCNL},
year={2021},
howpublished={\url{https://github.com/IDEA-CCNL/Fengshenbang-LM}},
}