suolyer commited on
Commit
6232cd0
1 Parent(s): 784f182

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +45 -0
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-330M-NLI, model (Chinese),one model of [Fengshenbang-LM](https://github.com/IDEA-CCNL/Fengshenbang-LM).
15
+ We collect 4 NLI(Natural Language Inference) datasets in the Chinese domain for finetune, with a total of 1014787 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-NLI')
24
+ model=BertForSequenceClassification.from_pretrained('IDEA-CCNL/Erlangshen-Roberta-330M-NLI')
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 (without any data augmentation)
34
+ | Model | cmnli | ocnli | snli |
35
+ | :--------: | :-----: | :----: | :-----: |
36
+ | Erlangshen-Roberta-110M-NLI | 80.83 | 78.56 | 88.01 |
37
+ | Erlangshen-Roberta-330M-NLI | 82.25 | 79.82 | 88 |
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
+ ```