Update README.md
Browse files
README.md
CHANGED
@@ -1,3 +1,47 @@
|
|
1 |
---
|
|
|
|
|
2 |
license: apache-2.0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
---
|
2 |
+
language:
|
3 |
+
- zh
|
4 |
license: apache-2.0
|
5 |
+
|
6 |
+
tags:
|
7 |
+
- bert
|
8 |
+
- NLU
|
9 |
+
- NLI
|
10 |
+
|
11 |
+
inference: false
|
12 |
+
|
13 |
---
|
14 |
+
# Erlangshen-Roberta-330M-Semtiment, model (Chinese),one model of [Fengshenbang-LM](https://github.com/IDEA-CCNL/Fengshenbang-LM).
|
15 |
+
We collect 8 paraphrace datasets in the Chinese domain for finetune, with a total of 227347 samples. Our model is mainly based on [roberta](https://huggingface.co/hfl/chinese-roberta-wwm-ext)
|
16 |
+
|
17 |
+
## Usage
|
18 |
+
```python
|
19 |
+
from transformers import BertForSequenceClassification
|
20 |
+
from transformers import BertTokenizer
|
21 |
+
import torch
|
22 |
+
|
23 |
+
tokenizer=BertTokenizer.from_pretrained('IDEA-CCNL/Erlangshen-Roberta-330M-Sentiment')
|
24 |
+
model=BertForSequenceClassification.from_pretrained('IDEA-CCNL/Erlangshen-Roberta-330M-Sentiment')
|
25 |
+
|
26 |
+
text='今天心情不好'
|
27 |
+
|
28 |
+
output=model(torch.tensor([tokenizer.encode(text)]))
|
29 |
+
print(torch.nn.functional.softmax(output.logits,dim=-1))
|
30 |
+
|
31 |
+
```
|
32 |
+
## Scores on downstream chinese tasks
|
33 |
+
| Model | ASAP-SENT | ASAP-ASPECT | ChnSentiCorp |
|
34 |
+
| :--------: | :-----: | :----: | :-----: |
|
35 |
+
| Erlangshen-Roberta-110M-Sentiment | 97.77 | 97.31 | 96.61 |
|
36 |
+
| Erlangshen-Roberta-330M-Sentiment | 97.9 | 97.51 | 96.66 |
|
37 |
+
|
38 |
+
## Citation
|
39 |
+
If you find the resource is useful, please cite the following website in your paper.
|
40 |
+
```
|
41 |
+
@misc{Fengshenbang-LM,
|
42 |
+
title={Fengshenbang-LM},
|
43 |
+
author={IDEA-CCNL},
|
44 |
+
year={2021},
|
45 |
+
howpublished={\url{https://github.com/IDEA-CCNL/Fengshenbang-LM}},
|
46 |
+
}
|
47 |
+
```
|