Commit
ยท
b68aff5
1
Parent(s):
96e9516
Update README.md
Browse files
README.md
CHANGED
@@ -5,51 +5,40 @@ license: mit
|
|
5 |
---
|
6 |
|
7 |
## What is DeBERTa?
|
8 |
-
|
9 |
- [DeBERTa](https://arxiv.org/abs/2006.03654)๋ `Disentangled Attention` + `Enhanced Mask Decoder` ๋ฅผ ์ ์ฉํ์ฌ ๋จ์ด์ positional information์ ํจ๊ณผ์ ์ผ๋ก ํ์ตํฉ๋๋ค. ์ด์ ๊ฐ์ ์์ด๋์ด๋ฅผ ํตํด, ๊ธฐ์กด์ BERT, RoBERTa์์ ์ฌ์ฉํ๋ absolute position embedding๊ณผ๋ ๋ฌ๋ฆฌ DeBERTa๋ ๋จ์ด์ ์๋์ ์ธ ์์น ์ ๋ณด๋ฅผ ํ์ต ๊ฐ๋ฅํ ๋ฒกํฐ๋ก ํํํ์ฌ ๋ชจ๋ธ์ ํ์ตํ๊ฒ ๋ฉ๋๋ค. ๊ฒฐ๊ณผ์ ์ผ๋ก, BERT, RoBERTA ์ ๋น๊ตํ์ ๋ ๋ ์ค์ํ ์ฑ๋ฅ์ ๋ณด์ฌ์ฃผ์์ต๋๋ค.
|
10 |
- [DeBERTa-v3](https://arxiv.org/abs/2111.09543)์์๋, ์ด์ ๋ฒ์ ์์ ์ฌ์ฉํ๋ MLM (Masked Language Model) ์ RTD (Replaced Token Detection) Task ๋ก ๋์ฒดํ ELECTRA ์คํ์ผ์ ์ฌ์ ํ์ต ๋ฐฉ๋ฒ๊ณผ, Gradient-Disentangled Embedding Sharing ์ ์ ์ฉํ์ฌ ๋ชจ๋ธ ํ์ต์ ํจ์จ์ฑ์ ๊ฐ์ ํ์์ต๋๋ค.
|
11 |
- DeBERTa์ ์ํคํ
์ฒ๋ก ํ๋ถํ ํ๊ตญ์ด ๋ฐ์ดํฐ๋ฅผ ํ์ตํ๊ธฐ ์ํด์, `mDeBERTa-v3-base-kor-further` ๋ microsoft ๊ฐ ๋ฐํํ `mDeBERTa-v3-base` ๋ฅผ ์ฝ 40GB์ ํ๊ตญ์ด ๋ฐ์ดํฐ์ ๋ํด์ **์ถ๊ฐ์ ์ธ ์ฌ์ ํ์ต**์ ์งํํ ์ธ์ด ๋ชจ๋ธ์
๋๋ค.
|
12 |
-
|
13 |
## How to Use
|
14 |
-
|
15 |
- Requirements
|
16 |
-
|
17 |
```
|
18 |
pip install transformers
|
19 |
pip install sentencepiece
|
20 |
-
```
|
21 |
-
|
22 |
- Huggingface Hub
|
23 |
-
|
24 |
```python
|
25 |
from transformers import AutoModel, AutoTokenizer
|
26 |
|
27 |
model = AutoModel.from_pretrained("lighthouse/mdeberta-v3-base-kor-further") # DebertaV2ForModel
|
28 |
tokenizer = AutoTokenizer.from_pretrained("lighthouse/mdeberta-v3-base-kor-further") # DebertaV2Tokenizer (SentencePiece)
|
29 |
```
|
30 |
-
|
31 |
|
32 |
## Pre-trained Models
|
33 |
-
|
34 |
- ๋ชจ๋ธ์ ์ํคํ
์ฒ๋ ๊ธฐ์กด microsoft์์ ๋ฐํํ `mdeberta-v3-base`์ ๋์ผํ ๊ตฌ์กฐ์
๋๋ค.
|
35 |
|
36 |
-
|
37 |
| | Vocabulary(K) | Backbone Parameters(M) | Hidden Size | Layers | Note |
|
38 |
| --- | --- | --- | --- | --- | --- |
|
39 |
| mdeberta-v3-base-kor-further (mdeberta-v3-base์ ๋์ผ) | 250 | 86 | 768 | 12 | 250K new SPM vocab |
|
40 |
|
41 |
## Further Pretraing Details (MLM Task)
|
42 |
-
|
43 |
- `KPMG-mDeBERTa-v3-base-kor-further` ๋ `microsoft/mDeBERTa-v3-base` ๋ฅผ ์ฝ 40GB์ ํ๊ตญ์ด ๋ฐ์ดํฐ์ ๋ํด์ MLM Task๋ฅผ ์ ์ฉํ์ฌ ์ถ๊ฐ์ ์ธ ์ฌ์ ํ์ต์ ์งํํ์์ต๋๋ค.
|
44 |
|
45 |
-
|
46 |
| | Max length | Learning Rate | Batch Size | Train Steps | Warm-up Steps |
|
47 |
| --- | --- | --- | --- | --- | --- |
|
48 |
| mdeberta-v3-base-kor-further | 512 | 2e-5 | 8 | 5M | 50k |
|
49 |
|
50 |
|
51 |
## Datasets
|
52 |
-
|
53 |
- ๋ชจ๋์ ๋ง๋ญ์น(์ ๋ฌธ, ๊ตฌ์ด, ๋ฌธ์ด), ํ๊ตญ์ด Wiki, ๊ตญ๋ฏผ์ฒญ์ ๋ฑ ์ฝ 40 GB ์ ํ๊ตญ์ด ๋ฐ์ดํฐ์
์ด ์ถ๊ฐ์ ์ธ ์ฌ์ ํ์ต์ ์ฌ์ฉ๋์์ต๋๋ค.
|
54 |
- Train: 10M lines, 5B tokens
|
55 |
- Valid: 2M lines, 1B tokens
|
@@ -57,15 +46,13 @@ license: mit
|
|
57 |
|
58 |
|
59 |
## Fine-tuning on NLU Tasks - Base Model
|
60 |
-
|
61 |
| Model | Size | NSMC(acc) | Naver NER(F1) | PAWS (acc) | KorNLI (acc) | KorSTS (spearman) | Question Pair (acc) | KorQuaD (Dev) (EM/F1) | Korean-Hate-Speech (Dev) (F1) |
|
62 |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
|
63 |
| XLM-Roberta-Base | 1.03G | 89.03 | 86.65 | 82.80 | 80.23 | 78.45 | 93.80 | 64.70 / 88.94 | 64.06 |
|
64 |
| mdeberta-base | 534M | 90.01 | 87.43 | 85.55 | 80.41 | **82.65** | 94.06 | 65.48 / 89.74 | 62.91 |
|
65 |
| mdeberta-base-kor-further (Ours) | 534M | **90.52** | **87.87** | **85.85** | **80.65** | 81.90 | **94.98** | **66.07 / 90.35** | **68.16** |
|
66 |
|
67 |
-
|
68 |
-
|
69 |
```
|
70 |
@misc{he2021debertav3,
|
71 |
title={DeBERTaV3: Improving DeBERTa using ELECTRA-Style Pre-Training with Gradient-Disentangled Embedding Sharing},
|
@@ -89,7 +76,6 @@ url={https://openreview.net/forum?id=XPZIaotutsD}
|
|
89 |
```
|
90 |
|
91 |
## Reference
|
92 |
-
|
93 |
- [DeBERTa](https://github.com/microsoft/DeBERTa)
|
94 |
- [Huggingface Transformers](https://github.com/huggingface/transformers)
|
95 |
- [๋ชจ๋์ ๋ง๋ญ์น](https://corpus.korean.go.kr/)
|
|
|
5 |
---
|
6 |
|
7 |
## What is DeBERTa?
|
|
|
8 |
- [DeBERTa](https://arxiv.org/abs/2006.03654)๋ `Disentangled Attention` + `Enhanced Mask Decoder` ๋ฅผ ์ ์ฉํ์ฌ ๋จ์ด์ positional information์ ํจ๊ณผ์ ์ผ๋ก ํ์ตํฉ๋๋ค. ์ด์ ๊ฐ์ ์์ด๋์ด๋ฅผ ํตํด, ๊ธฐ์กด์ BERT, RoBERTa์์ ์ฌ์ฉํ๋ absolute position embedding๊ณผ๋ ๋ฌ๋ฆฌ DeBERTa๋ ๋จ์ด์ ์๋์ ์ธ ์์น ์ ๋ณด๋ฅผ ํ์ต ๊ฐ๋ฅํ ๋ฒกํฐ๋ก ํํํ์ฌ ๋ชจ๋ธ์ ํ์ตํ๊ฒ ๋ฉ๋๋ค. ๊ฒฐ๊ณผ์ ์ผ๋ก, BERT, RoBERTA ์ ๋น๊ตํ์ ๋ ๋ ์ค์ํ ์ฑ๋ฅ์ ๋ณด์ฌ์ฃผ์์ต๋๋ค.
|
9 |
- [DeBERTa-v3](https://arxiv.org/abs/2111.09543)์์๋, ์ด์ ๋ฒ์ ์์ ์ฌ์ฉํ๋ MLM (Masked Language Model) ์ RTD (Replaced Token Detection) Task ๋ก ๋์ฒดํ ELECTRA ์คํ์ผ์ ์ฌ์ ํ์ต ๋ฐฉ๋ฒ๊ณผ, Gradient-Disentangled Embedding Sharing ์ ์ ์ฉํ์ฌ ๋ชจ๋ธ ํ์ต์ ํจ์จ์ฑ์ ๊ฐ์ ํ์์ต๋๋ค.
|
10 |
- DeBERTa์ ์ํคํ
์ฒ๋ก ํ๋ถํ ํ๊ตญ์ด ๋ฐ์ดํฐ๋ฅผ ํ์ตํ๊ธฐ ์ํด์, `mDeBERTa-v3-base-kor-further` ๋ microsoft ๊ฐ ๋ฐํํ `mDeBERTa-v3-base` ๋ฅผ ์ฝ 40GB์ ํ๊ตญ์ด ๋ฐ์ดํฐ์ ๋ํด์ **์ถ๊ฐ์ ์ธ ์ฌ์ ํ์ต**์ ์งํํ ์ธ์ด ๋ชจ๋ธ์
๋๋ค.
|
11 |
+
|
12 |
## How to Use
|
|
|
13 |
- Requirements
|
|
|
14 |
```
|
15 |
pip install transformers
|
16 |
pip install sentencepiece
|
17 |
+
```
|
|
|
18 |
- Huggingface Hub
|
|
|
19 |
```python
|
20 |
from transformers import AutoModel, AutoTokenizer
|
21 |
|
22 |
model = AutoModel.from_pretrained("lighthouse/mdeberta-v3-base-kor-further") # DebertaV2ForModel
|
23 |
tokenizer = AutoTokenizer.from_pretrained("lighthouse/mdeberta-v3-base-kor-further") # DebertaV2Tokenizer (SentencePiece)
|
24 |
```
|
|
|
25 |
|
26 |
## Pre-trained Models
|
|
|
27 |
- ๋ชจ๋ธ์ ์ํคํ
์ฒ๋ ๊ธฐ์กด microsoft์์ ๋ฐํํ `mdeberta-v3-base`์ ๋์ผํ ๊ตฌ์กฐ์
๋๋ค.
|
28 |
|
|
|
29 |
| | Vocabulary(K) | Backbone Parameters(M) | Hidden Size | Layers | Note |
|
30 |
| --- | --- | --- | --- | --- | --- |
|
31 |
| mdeberta-v3-base-kor-further (mdeberta-v3-base์ ๋์ผ) | 250 | 86 | 768 | 12 | 250K new SPM vocab |
|
32 |
|
33 |
## Further Pretraing Details (MLM Task)
|
|
|
34 |
- `KPMG-mDeBERTa-v3-base-kor-further` ๋ `microsoft/mDeBERTa-v3-base` ๋ฅผ ์ฝ 40GB์ ํ๊ตญ์ด ๋ฐ์ดํฐ์ ๋ํด์ MLM Task๋ฅผ ์ ์ฉํ์ฌ ์ถ๊ฐ์ ์ธ ์ฌ์ ํ์ต์ ์งํํ์์ต๋๋ค.
|
35 |
|
|
|
36 |
| | Max length | Learning Rate | Batch Size | Train Steps | Warm-up Steps |
|
37 |
| --- | --- | --- | --- | --- | --- |
|
38 |
| mdeberta-v3-base-kor-further | 512 | 2e-5 | 8 | 5M | 50k |
|
39 |
|
40 |
|
41 |
## Datasets
|
|
|
42 |
- ๋ชจ๋์ ๋ง๋ญ์น(์ ๋ฌธ, ๊ตฌ์ด, ๋ฌธ์ด), ํ๊ตญ์ด Wiki, ๊ตญ๋ฏผ์ฒญ์ ๋ฑ ์ฝ 40 GB ์ ํ๊ตญ์ด ๋ฐ์ดํฐ์
์ด ์ถ๊ฐ์ ์ธ ์ฌ์ ํ์ต์ ์ฌ์ฉ๋์์ต๋๋ค.
|
43 |
- Train: 10M lines, 5B tokens
|
44 |
- Valid: 2M lines, 1B tokens
|
|
|
46 |
|
47 |
|
48 |
## Fine-tuning on NLU Tasks - Base Model
|
|
|
49 |
| Model | Size | NSMC(acc) | Naver NER(F1) | PAWS (acc) | KorNLI (acc) | KorSTS (spearman) | Question Pair (acc) | KorQuaD (Dev) (EM/F1) | Korean-Hate-Speech (Dev) (F1) |
|
50 |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
|
51 |
| XLM-Roberta-Base | 1.03G | 89.03 | 86.65 | 82.80 | 80.23 | 78.45 | 93.80 | 64.70 / 88.94 | 64.06 |
|
52 |
| mdeberta-base | 534M | 90.01 | 87.43 | 85.55 | 80.41 | **82.65** | 94.06 | 65.48 / 89.74 | 62.91 |
|
53 |
| mdeberta-base-kor-further (Ours) | 534M | **90.52** | **87.87** | **85.85** | **80.65** | 81.90 | **94.98** | **66.07 / 90.35** | **68.16** |
|
54 |
|
55 |
+
## Citation
|
|
|
56 |
```
|
57 |
@misc{he2021debertav3,
|
58 |
title={DeBERTaV3: Improving DeBERTa using ELECTRA-Style Pre-Training with Gradient-Disentangled Embedding Sharing},
|
|
|
76 |
```
|
77 |
|
78 |
## Reference
|
|
|
79 |
- [DeBERTa](https://github.com/microsoft/DeBERTa)
|
80 |
- [Huggingface Transformers](https://github.com/huggingface/transformers)
|
81 |
- [๋ชจ๋์ ๋ง๋ญ์น](https://corpus.korean.go.kr/)
|