File size: 1,819 Bytes
f22e343
41af8ad
 
 
f22e343
41af8ad
 
 
 
 
 
 
 
f22e343
41af8ad
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
---
language: 
  - zh

license: apache-2.0

tags:
  - bert

inference: true

widget:
- text: "中国首都位于[MASK]。"
---
# Erlangshen-DeBERTa-v2-186M-Chinese-SentencePiece,one model of [Fengshenbang-LM](https://github.com/IDEA-CCNL/Fengshenbang-LM)

The 186 million parameter deberta-V2 base model, using 180G Chinese data, 8 3090TI(24G) training for 21 days,which is a encoder-only transformer structure. Consumed totally 500M samples.

We pretrained a 128000 vocab from train datasets using sentence piece. And achieve a better in downstream task.

## Task Description

Erlangshen-DeBERTa-v2-186M-Chinese-SentencePiece is pre-trained by bert like mask task from Deberta [paper](https://readpaper.com/paper/3033187248)

## Usage

```python
from transformers import AutoModelForMaskedLM, AutoTokenizer, FillMaskPipeline
import torch

tokenizer=AutoTokenizer.from_pretrained('IDEA-CCNL/Erlangshen-DeBERTa-v2-186M-Chinese-SentencePiece', use_fast=False)
model=AutoModelForMaskedLM.from_pretrained('IDEA-CCNL/Erlangshen-DeBERTa-v2-186M-Chinese-SentencePiece')
text = '中国首都位于[MASK]。'
fillmask_pipe = FillMaskPipeline(model, tokenizer)
print(fillmask_pipe(text, top_k=10))
```

## Finetune

We present the dev results on some tasks.

| Model                                                | OCNLI  | CMNLI  |
| ---------------------------------------------------- | ------ | ------ |
| RoBERTa-base                                         | 0.743  | 0.7973 |
| **Erlangshen-DeBERTa-v2-186M-Chinese-SentencePiece** | 0.7625 | 0.81   |

## Citation

If you find the resource is useful, please cite the following website in your paper.

```
@misc{Fengshenbang-LM,
  title={Fengshenbang-LM},
  author={IDEA-CCNL},
  year={2022},
  howpublished={\url{https://github.com/IDEA-CCNL/Fengshenbang-LM}},
}
```