README.md
3.1 KB · 159 lines · markdown Raw
1 ---
2 datasets:
3 - squad_v2
4 language:
5 - multilingual
6 - af
7 - am
8 - ar
9 - as
10 - az
11 - be
12 - bg
13 - bn
14 - br
15 - bs
16 - ca
17 - cs
18 - cy
19 - da
20 - de
21 - el
22 - en
23 - eo
24 - es
25 - et
26 - eu
27 - fa
28 - fi
29 - fr
30 - fy
31 - ga
32 - gd
33 - gl
34 - gu
35 - ha
36 - he
37 - hi
38 - hr
39 - hu
40 - hy
41 - id
42 - is
43 - it
44 - ja
45 - jv
46 - ka
47 - kk
48 - km
49 - kn
50 - ko
51 - ku
52 - ky
53 - la
54 - lo
55 - lt
56 - lv
57 - mg
58 - mk
59 - ml
60 - mn
61 - mr
62 - ms
63 - my
64 - ne
65 - nl
66 - 'no'
67 - om
68 - or
69 - pa
70 - pl
71 - ps
72 - pt
73 - ro
74 - ru
75 - sa
76 - sd
77 - si
78 - sk
79 - sl
80 - so
81 - sq
82 - sr
83 - su
84 - sv
85 - sw
86 - ta
87 - te
88 - th
89 - tl
90 - tr
91 - ug
92 - uk
93 - ur
94 - uz
95 - vi
96 - xh
97 - yi
98 - zh
99 tags:
100 - deberta
101 - deberta-v3
102 - mdeberta
103 - question-answering
104 - qa
105 - multilingual
106 thumbnail: https://huggingface.co/front/thumbnails/microsoft.png
107 license: mit
108 base_model:
109 - microsoft/mdeberta-v3-base
110 ---
111 ## This model can be used for Extractive QA
112 It has been finetuned for 3 epochs on [SQuAD2.0](https://rajpurkar.github.io/SQuAD-explorer/).
113
114 ## Usage
115 ```python
116 from transformers import pipeline
117
118 qa_model = pipeline("question-answering", "timpal0l/mdeberta-v3-base-squad2")
119 question = "Where do I live?"
120 context = "My name is Tim and I live in Sweden."
121 qa_model(question = question, context = context)
122 # {'score': 0.975547730922699, 'start': 28, 'end': 36, 'answer': ' Sweden.'}
123 ```
124
125 ## Evaluation on SQuAD2.0 dev set
126 ```bash
127 {
128 "epoch": 3.0,
129 "eval_HasAns_exact": 79.65587044534414,
130 "eval_HasAns_f1": 85.91387795001529,
131 "eval_HasAns_total": 5928,
132 "eval_NoAns_exact": 82.10260723296888,
133 "eval_NoAns_f1": 82.10260723296888,
134 "eval_NoAns_total": 5945,
135 "eval_best_exact": 80.8809904826076,
136 "eval_best_exact_thresh": 0.0,
137 "eval_best_f1": 84.00551406448994,
138 "eval_best_f1_thresh": 0.0,
139 "eval_exact": 80.8809904826076,
140 "eval_f1": 84.00551406449004,
141 "eval_samples": 12508,
142 "eval_total": 11873,
143 "train_loss": 0.7729689576483615,
144 "train_runtime": 9118.953,
145 "train_samples": 134891,
146 "train_samples_per_second": 44.377,
147 "train_steps_per_second": 0.925
148 }
149 ```
150 ## DeBERTaV3: Improving DeBERTa using ELECTRA-Style Pre-Training with Gradient-Disentangled Embedding Sharing
151
152 [DeBERTa](https://arxiv.org/abs/2006.03654) improves the BERT and RoBERTa models using disentangled attention and enhanced mask decoder. With those two improvements, DeBERTa out perform RoBERTa on a majority of NLU tasks with 80GB training data.
153
154 In [DeBERTa V3](https://arxiv.org/abs/2111.09543), we further improved the efficiency of DeBERTa using ELECTRA-Style pre-training with Gradient Disentangled Embedding Sharing. Compared to DeBERTa, our V3 version significantly improves the model performance on downstream tasks. You can find more technique details about the new model from our [paper](https://arxiv.org/abs/2111.09543).
155
156 Please check the [official repository](https://github.com/microsoft/DeBERTa) for more implementation details and updates.
157
158 mDeBERTa is multilingual version of DeBERTa which use the same structure as DeBERTa and was trained with CC100 multilingual data.
159 The mDeBERTa V3 base model comes with 12 layers and a hidden size of 768. It has 86M backbone parameters with a vocabulary containing 250K tokens which introduces 190M parameters in the Embedding layer. This model was trained using the 2.5T CC100 data as XLM-R.