jonathanagustin
commited on
Commit
•
edda752
1
Parent(s):
21a1acb
Model save
Browse files- README.md +128 -277
- config.json +1 -1
- metrics.json +13 -13
- pytorch_model.bin +1 -1
- training_args.bin +1 -1
README.md
CHANGED
@@ -1,281 +1,132 @@
|
|
1 |
---
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
\ in building conversational AI using recent advances in natural language processing.\
|
7 |
-
\ It utilizes a BERT model fine-tuned for extractive question answering.\n\n \
|
8 |
-
\ ## Data Collection and Preprocessing\n The model was trained on the\
|
9 |
-
\ Stanford Question Answering Dataset (SQuAD), which contains over 100,000 question-answer\
|
10 |
-
\ pairs based on Wikipedia articles. The data preprocessing involved tokenizing\
|
11 |
-
\ context paragraphs and questions, truncating sequences to fit BERT's max length,\
|
12 |
-
\ and adding special tokens to mark question and paragraph segments.\n\n \
|
13 |
-
\ ## Model Architecture and Training\n The architecture is based on the BERT\
|
14 |
-
\ transformer model, which was pretrained on large unlabeled text corpora. For this\
|
15 |
-
\ project, the BERT base model was fine-tuned on SQuAD for extractive question answering,\
|
16 |
-
\ with additional output layers for predicting the start and end indices of the\
|
17 |
-
\ answer span.\n\n ## SQuAD 2.0 Dataset\n SQuAD 2.0 combines the existing\
|
18 |
-
\ SQuAD data with over 50,000 unanswerable questions written adversarially by crowdworkers\
|
19 |
-
\ to look similar to answerable ones. This version of the dataset challenges models\
|
20 |
-
\ to not only produce answers when possible but also determine when no answer is\
|
21 |
-
\ supported by the paragraph and abstain from answering.\n "
|
22 |
-
intended_use: "\n - Answering questions from the squad_v2 dataset.\n \
|
23 |
-
\ - Developing question-answering systems within the scope of the aai520-project.\n\
|
24 |
-
\ - Research and experimentation in the NLP question-answering domain.\n\
|
25 |
-
\ "
|
26 |
-
limitations_and_bias: "\n The model inherits limitations and biases from the\
|
27 |
-
\ 'distilbert-base-uncased' model, as it was trained on the same foundational data.\
|
28 |
-
\ \n It may underperform on questions that are ambiguous or too far outside\
|
29 |
-
\ the scope of the topics covered in the squad_v2 dataset. \n Additionally,\
|
30 |
-
\ the model may reflect societal biases present in its training data.\n "
|
31 |
-
ethical_considerations: "\n This model should not be used for making critical\
|
32 |
-
\ decisions without human oversight, \n as it can generate incorrect or biased\
|
33 |
-
\ answers, especially for topics not covered in the training data. \n Users\
|
34 |
-
\ should also consider the ethical implications of using AI in decision-making processes\
|
35 |
-
\ and the potential for perpetuating biases.\n "
|
36 |
-
evaluation: "\n The model was evaluated on the squad_v2 dataset using various\
|
37 |
-
\ metrics. These metrics, along with their corresponding scores, \n are detailed\
|
38 |
-
\ in the 'eval_results' section. The evaluation process ensured a comprehensive\
|
39 |
-
\ assessment of the model's performance \n in question-answering scenarios.\n\
|
40 |
-
\ "
|
41 |
-
training: "\n The model was trained over 4 epochs with a learning rate of 2e-05,\
|
42 |
-
\ using a batch size of 128. \n The training utilized a cross-entropy loss\
|
43 |
-
\ function and the AdamW optimizer, with gradient accumulation over 4 steps.\n \
|
44 |
-
\ "
|
45 |
-
tips_and_tricks: "\n For optimal performance, questions should be clear, concise,\
|
46 |
-
\ and grammatically correct. \n The model performs best on questions related\
|
47 |
-
\ to topics covered in the squad_v2 dataset. \n It is advisable to pre-process\
|
48 |
-
\ text for consistency in encoding and punctuation, and to manage expectations for\
|
49 |
-
\ questions on topics outside the training data.\n "
|
50 |
model-index:
|
51 |
-
- name: distilbert-finetuned-uncased
|
52 |
-
results:
|
53 |
-
- task:
|
54 |
-
type: question-answering
|
55 |
-
dataset:
|
56 |
-
name: SQuAD v2
|
57 |
-
type: squad_v2
|
58 |
-
metrics:
|
59 |
-
- type: Exact
|
60 |
-
value: 100.0
|
61 |
-
- type: F1
|
62 |
-
value: 100.0
|
63 |
-
- type: Total
|
64 |
-
value: 2
|
65 |
-
- type: Hasans Exact
|
66 |
-
value: 100.0
|
67 |
-
- type: Hasans F1
|
68 |
-
value: 100.0
|
69 |
-
- type: Hasans Total
|
70 |
-
value: 2
|
71 |
-
- type: Best Exact
|
72 |
-
value: 100.0
|
73 |
-
- type: Best Exact Thresh
|
74 |
-
value: 0.7474104762077332
|
75 |
-
- type: Best F1
|
76 |
-
value: 100.0
|
77 |
-
- type: Best F1 Thresh
|
78 |
-
value: 0.7474104762077332
|
79 |
-
- type: Total Time In Seconds
|
80 |
-
value: 0.022410528003092622
|
81 |
-
- type: Samples Per Second
|
82 |
-
value: 89.24376970163321
|
83 |
-
- type: Latency In Seconds
|
84 |
-
value: 0.011205264001546311
|
85 |
---
|
86 |
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
-
|
114 |
-
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
[More Information Needed]
|
210 |
-
|
211 |
-
#### Summary
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
## Model Examination [optional]
|
216 |
-
|
217 |
-
<!-- Relevant interpretability work for the model goes here -->
|
218 |
-
|
219 |
-
[More Information Needed]
|
220 |
-
|
221 |
-
## Environmental Impact
|
222 |
-
|
223 |
-
<!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
|
224 |
-
|
225 |
-
Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700).
|
226 |
-
|
227 |
-
- **Hardware Type:** [More Information Needed]
|
228 |
-
- **Hours used:** [More Information Needed]
|
229 |
-
- **Cloud Provider:** [More Information Needed]
|
230 |
-
- **Compute Region:** [More Information Needed]
|
231 |
-
- **Carbon Emitted:** [More Information Needed]
|
232 |
-
|
233 |
-
## Technical Specifications [optional]
|
234 |
-
|
235 |
-
### Model Architecture and Objective
|
236 |
-
|
237 |
-
[More Information Needed]
|
238 |
-
|
239 |
-
### Compute Infrastructure
|
240 |
-
|
241 |
-
[More Information Needed]
|
242 |
-
|
243 |
-
#### Hardware
|
244 |
-
|
245 |
-
[More Information Needed]
|
246 |
-
|
247 |
-
#### Software
|
248 |
-
|
249 |
-
[More Information Needed]
|
250 |
-
|
251 |
-
## Citation [optional]
|
252 |
-
|
253 |
-
<!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
|
254 |
-
|
255 |
-
**BibTeX:**
|
256 |
-
|
257 |
-
[More Information Needed]
|
258 |
-
|
259 |
-
**APA:**
|
260 |
-
|
261 |
-
[More Information Needed]
|
262 |
-
|
263 |
-
## Glossary [optional]
|
264 |
-
|
265 |
-
<!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
|
266 |
-
|
267 |
-
[More Information Needed]
|
268 |
-
|
269 |
-
## More Information [optional]
|
270 |
-
|
271 |
-
[More Information Needed]
|
272 |
-
|
273 |
-
## Model Card Authors [optional]
|
274 |
-
|
275 |
-
[More Information Needed]
|
276 |
-
|
277 |
-
## Model Card Contact
|
278 |
-
|
279 |
-
[More Information Needed]
|
280 |
-
|
281 |
-
|
|
|
1 |
---
|
2 |
+
tags:
|
3 |
+
- generated_from_trainer
|
4 |
+
datasets:
|
5 |
+
- squad_v2
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6 |
model-index:
|
7 |
+
- name: distilbert-finetuned-uncased-squad_v2
|
8 |
+
results: []
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9 |
---
|
10 |
|
11 |
+
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
12 |
+
should probably proofread and complete it, then remove this comment. -->
|
13 |
+
|
14 |
+
# distilbert-finetuned-uncased-squad_v2
|
15 |
+
|
16 |
+
This model was trained from scratch on the squad_v2 dataset.
|
17 |
+
It achieves the following results on the evaluation set:
|
18 |
+
- Loss: 1.2617
|
19 |
+
|
20 |
+
## Model description
|
21 |
+
|
22 |
+
More information needed
|
23 |
+
|
24 |
+
## Intended uses & limitations
|
25 |
+
|
26 |
+
More information needed
|
27 |
+
|
28 |
+
## Training and evaluation data
|
29 |
+
|
30 |
+
More information needed
|
31 |
+
|
32 |
+
## Training procedure
|
33 |
+
|
34 |
+
### Training hyperparameters
|
35 |
+
|
36 |
+
The following hyperparameters were used during training:
|
37 |
+
- learning_rate: 2e-05
|
38 |
+
- train_batch_size: 128
|
39 |
+
- eval_batch_size: 128
|
40 |
+
- seed: 42
|
41 |
+
- gradient_accumulation_steps: 4
|
42 |
+
- total_train_batch_size: 512
|
43 |
+
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
|
44 |
+
- lr_scheduler_type: linear
|
45 |
+
- num_epochs: 10
|
46 |
+
|
47 |
+
### Training results
|
48 |
+
|
49 |
+
| Training Loss | Epoch | Step | Validation Loss |
|
50 |
+
|:-------------:|:-----:|:----:|:---------------:|
|
51 |
+
| 3.6437 | 0.39 | 100 | 2.1780 |
|
52 |
+
| 2.1596 | 0.78 | 200 | 1.6557 |
|
53 |
+
| 1.8138 | 1.18 | 300 | 1.5683 |
|
54 |
+
| 1.6987 | 1.57 | 400 | 1.5076 |
|
55 |
+
| 1.6586 | 1.96 | 500 | 1.5350 |
|
56 |
+
| 1.5957 | 1.18 | 600 | 1.4431 |
|
57 |
+
| 1.5825 | 1.37 | 700 | 1.4955 |
|
58 |
+
| 1.5523 | 1.57 | 800 | 1.4444 |
|
59 |
+
| 1.5346 | 1.76 | 900 | 1.3930 |
|
60 |
+
| 1.5098 | 1.96 | 1000 | 1.4285 |
|
61 |
+
| 1.4632 | 2.16 | 1100 | 1.3630 |
|
62 |
+
| 1.4468 | 2.35 | 1200 | 1.3710 |
|
63 |
+
| 1.4343 | 2.55 | 1300 | 1.3422 |
|
64 |
+
| 1.4225 | 2.75 | 1400 | 1.3971 |
|
65 |
+
| 1.408 | 2.94 | 1500 | 1.4355 |
|
66 |
+
| 1.3609 | 3.14 | 1600 | 1.3332 |
|
67 |
+
| 1.3398 | 3.33 | 1700 | 1.3792 |
|
68 |
+
| 1.3224 | 3.53 | 1800 | 1.4172 |
|
69 |
+
| 1.3152 | 3.73 | 1900 | 1.3956 |
|
70 |
+
| 1.3141 | 3.92 | 2000 | 1.3748 |
|
71 |
+
| 1.3085 | 2.06 | 2100 | 1.3949 |
|
72 |
+
| 1.3325 | 2.16 | 2200 | 1.4870 |
|
73 |
+
| 1.3162 | 2.26 | 2300 | 1.4565 |
|
74 |
+
| 1.2936 | 2.35 | 2400 | 1.4496 |
|
75 |
+
| 1.2648 | 2.45 | 2500 | 1.2868 |
|
76 |
+
| 1.2531 | 2.55 | 2600 | 1.5094 |
|
77 |
+
| 1.2599 | 2.65 | 2700 | 1.3451 |
|
78 |
+
| 1.2545 | 2.75 | 2800 | 1.4071 |
|
79 |
+
| 1.2461 | 2.84 | 2900 | 1.3378 |
|
80 |
+
| 1.2038 | 2.94 | 3000 | 1.2946 |
|
81 |
+
| 1.1677 | 3.04 | 3100 | 1.4802 |
|
82 |
+
| 1.103 | 3.14 | 3200 | 1.3580 |
|
83 |
+
| 1.1205 | 3.24 | 3300 | 1.3819 |
|
84 |
+
| 1.095 | 3.33 | 3400 | 1.4336 |
|
85 |
+
| 1.0896 | 3.43 | 3500 | 1.4963 |
|
86 |
+
| 1.0856 | 3.53 | 3600 | 1.3384 |
|
87 |
+
| 1.0652 | 3.63 | 3700 | 1.3583 |
|
88 |
+
| 1.0859 | 3.73 | 3800 | 1.4140 |
|
89 |
+
| 1.058 | 3.83 | 3900 | 1.2617 |
|
90 |
+
| 1.0724 | 3.92 | 4000 | 1.3552 |
|
91 |
+
| 1.0509 | 4.02 | 4100 | 1.2971 |
|
92 |
+
| 0.97 | 4.12 | 4200 | 1.3268 |
|
93 |
+
| 0.95 | 4.22 | 4300 | 1.3754 |
|
94 |
+
| 0.9337 | 4.32 | 4400 | 1.3687 |
|
95 |
+
| 0.977 | 4.41 | 4500 | 1.3613 |
|
96 |
+
| 0.9484 | 4.51 | 4600 | 1.5139 |
|
97 |
+
| 0.9739 | 4.61 | 4700 | 1.2861 |
|
98 |
+
| 0.955 | 4.71 | 4800 | 1.3667 |
|
99 |
+
| 0.9536 | 4.81 | 4900 | 1.3180 |
|
100 |
+
| 0.9541 | 4.9 | 5000 | 1.4611 |
|
101 |
+
| 0.9462 | 5.0 | 5100 | 1.4067 |
|
102 |
+
| 0.8728 | 5.1 | 5200 | 1.3490 |
|
103 |
+
| 0.8646 | 5.2 | 5300 | 1.4631 |
|
104 |
+
| 0.8683 | 5.3 | 5400 | 1.4978 |
|
105 |
+
| 0.8571 | 5.39 | 5500 | 1.5814 |
|
106 |
+
| 0.8475 | 5.49 | 5600 | 1.5535 |
|
107 |
+
| 0.8653 | 5.59 | 5700 | 1.4938 |
|
108 |
+
| 0.8664 | 5.69 | 5800 | 1.4141 |
|
109 |
+
| 0.889 | 5.79 | 5900 | 1.4487 |
|
110 |
+
| 0.8601 | 5.88 | 6000 | 1.4722 |
|
111 |
+
| 0.8645 | 5.98 | 6100 | 1.5843 |
|
112 |
+
| 0.785 | 6.08 | 6200 | 1.6028 |
|
113 |
+
| 0.7711 | 6.18 | 6300 | 1.6271 |
|
114 |
+
| 0.8056 | 6.28 | 6400 | 1.5399 |
|
115 |
+
| 0.8087 | 6.37 | 6500 | 1.4927 |
|
116 |
+
| 0.7859 | 6.47 | 6600 | 1.4677 |
|
117 |
+
| 0.7896 | 6.57 | 6700 | 1.4780 |
|
118 |
+
| 0.7971 | 6.67 | 6800 | 1.5110 |
|
119 |
+
| 0.7952 | 6.77 | 6900 | 1.5459 |
|
120 |
+
| 0.7971 | 6.87 | 7000 | 1.5282 |
|
121 |
+
| 0.7908 | 6.96 | 7100 | 1.4799 |
|
122 |
+
| 0.7456 | 7.06 | 7200 | 1.6487 |
|
123 |
+
| 0.7236 | 7.16 | 7300 | 1.6543 |
|
124 |
+
| 0.7484 | 7.26 | 7400 | 1.6202 |
|
125 |
+
|
126 |
+
|
127 |
+
### Framework versions
|
128 |
+
|
129 |
+
- Transformers 4.34.1
|
130 |
+
- Pytorch 2.1.0+cu118
|
131 |
+
- Datasets 2.14.6
|
132 |
+
- Tokenizers 0.14.1
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
config.json
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
{
|
2 |
-
"_name_or_path": "/content/drive/My Drive/Colab Notebooks/aai520-project/checkpoints/distilbert-finetuned-uncased/checkpoint-
|
3 |
"activation": "gelu",
|
4 |
"architectures": [
|
5 |
"DistilBertForQuestionAnswering"
|
|
|
1 |
{
|
2 |
+
"_name_or_path": "/content/drive/My Drive/Colab Notebooks/aai520-project/checkpoints/distilbert-finetuned-uncased/checkpoint-7400",
|
3 |
"activation": "gelu",
|
4 |
"architectures": [
|
5 |
"DistilBertForQuestionAnswering"
|
metrics.json
CHANGED
@@ -1,15 +1,15 @@
|
|
1 |
{
|
2 |
-
"exact":
|
3 |
-
"f1":
|
4 |
-
"total":
|
5 |
-
"HasAns_exact":
|
6 |
-
"HasAns_f1":
|
7 |
-
"HasAns_total":
|
8 |
-
"
|
9 |
-
"
|
10 |
-
"
|
11 |
-
"
|
12 |
-
"
|
13 |
-
"
|
14 |
-
"
|
15 |
}
|
|
|
1 |
{
|
2 |
+
"exact": 100.0,
|
3 |
+
"f1": 100.0,
|
4 |
+
"total": 2,
|
5 |
+
"HasAns_exact": 100.0,
|
6 |
+
"HasAns_f1": 100.0,
|
7 |
+
"HasAns_total": 2,
|
8 |
+
"best_exact": 100.0,
|
9 |
+
"best_exact_thresh": 0.7474104762077332,
|
10 |
+
"best_f1": 100.0,
|
11 |
+
"best_f1_thresh": 0.7474104762077332,
|
12 |
+
"total_time_in_seconds": 0.022410528003092622,
|
13 |
+
"samples_per_second": 89.24376970163321,
|
14 |
+
"latency_in_seconds": 0.011205264001546311
|
15 |
}
|
pytorch_model.bin
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
size 265493026
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:50244d54cf117f749dd93cfde9f2dd68d4bf0f0d86784128288d872e6d489488
|
3 |
size 265493026
|
training_args.bin
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
size 4664
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:fec995f22a550259b8395d0763625d078960b524379b4835c2d7be674d0fe65a
|
3 |
size 4664
|