Update README.md
Browse files
README.md
CHANGED
@@ -1,3 +1,48 @@
|
|
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-110M-Similarity, model (Chinese),one model of [Fengshenbang-LM](https://github.com/IDEA-CCNL/Fengshenbang-LM).
|
15 |
+
We collect 20 paraphrace datasets in the Chinese domain for finetune, with a total of 2773880 samples. Our model is mainly based on [roberta](https://huggingface.co/hfl/chinese-roberta-wwm-ext-large)
|
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-110M-Similarity')
|
24 |
+
model=BertForSequenceClassification.from_pretrained('IDEA-CCNL/Erlangshen-Roberta-110M-Similarity')
|
25 |
+
|
26 |
+
texta='今天的饭不好吃'
|
27 |
+
textb='今天心情不好'
|
28 |
+
|
29 |
+
output=model(torch.tensor([tokenizer.encode(texta,textb)]))
|
30 |
+
print(torch.nn.functional.softmax(output.logits,dim=-1))
|
31 |
+
|
32 |
+
```
|
33 |
+
## Scores on downstream chinese tasks(The dev datasets of BUSTM and AFQMC may exist in the train set)
|
34 |
+
| Model | BQ | BUSTM | AFQMC |
|
35 |
+
| :--------: | :-----: | :----: | :-----: |
|
36 |
+
| Erlangshen-Roberta-110M-Similarity | 85.41 | 95.18 | 81.72 |
|
37 |
+
| Erlangshen-Roberta-330M-Similarity | 86.21 | 99.29 | 93.89 |
|
38 |
+
|
39 |
+
## Citation
|
40 |
+
If you find the resource is useful, please cite the following website in your paper.
|
41 |
+
```
|
42 |
+
@misc{Fengshenbang-LM,
|
43 |
+
title={Fengshenbang-LM},
|
44 |
+
author={IDEA-CCNL},
|
45 |
+
year={2021},
|
46 |
+
howpublished={\url{https://github.com/IDEA-CCNL/Fengshenbang-LM}},
|
47 |
+
}
|
48 |
+
```
|