consciousAI commited on
Commit
c0c4505
·
1 Parent(s): 1c5196b

Training in progress epoch 0

Browse files
.ipynb_checkpoints/README-checkpoint.md ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ tags:
4
+ - Question Answering
5
+ metrics:
6
+ - squad
7
+ model-index:
8
+ - name: question-answering-roberta-base-s
9
+ results: []
10
+ ---
11
+
12
+ # Question Answering
13
+ The model is intended to be used for Q&A task, given the question & context, the model would attempt to infer the answer text, answer span & confidence score.<br>
14
+ Model is encoder-only (roberta-base) with QuestionAnswering LM Head, fine-tuned on SQUADx dataset with **exact_match:** 86.14 & **f1:** 92.330 performance scores.
15
+
16
+ [Live Demo: Question Answering Encoders vs Generative](https://huggingface.co/spaces/anshoomehra/question_answering)
17
+
18
+ Please follow this link for [Generative Question Answering](https://huggingface.co/anshoomehra/question-answering-generative-t5-v1-base-s-q-c/)
19
+
20
+ Example code:
21
+ ```
22
+ from transformers import pipeline
23
+
24
+ model_checkpoint = "anshoomehra/question-answering-roberta-base-s"
25
+
26
+ context = """
27
+ 🤗 Transformers is backed by the three most popular deep learning libraries — Jax, PyTorch and TensorFlow — with a seamless integration
28
+ between them. It's straightforward to train your models with one before loading them for inference with the other.
29
+ """
30
+ question = "Which deep learning libraries back 🤗 Transformers?"
31
+
32
+ question_answerer = pipeline("question-answering", model=model_checkpoint)
33
+ question_answerer(question=question, context=context)
34
+
35
+ ```
36
+
37
+ ## Training and evaluation data
38
+
39
+ SQUAD Split
40
+
41
+ ## Training procedure
42
+
43
+ Preprocessing:
44
+ 1. SQUAD Data longer chunks were sub-chunked with input context max-length 384 tokens and stride as 128 tokens.
45
+ 2. Target answers readjusted for sub-chunks, sub-chunks with no-answers or partial answers were set to target answer span as (0,0)
46
+
47
+ Metrics:
48
+ 1. Adjusted accordingly to handle sub-chunking.
49
+ 2. n best = 20
50
+ 3. skip answers with length zero or higher than max answer length (30)
51
+
52
+ ### Training hyperparameters
53
+ Custom Training Loop:
54
+ The following hyperparameters were used during training:
55
+ - learning_rate: 2e-5
56
+ - train_batch_size: 32
57
+ - eval_batch_size: 32
58
+ - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
59
+ - lr_scheduler_type: linear
60
+ - num_epochs: 2
61
+
62
+ ### Training results
63
+
64
+ | Epoch | F1 | Exact Match |
65
+ |:-----:|:--------:|:-----------:|
66
+ | 1.0 | 91.3085 | 84.5412 |
67
+ | 2.0 | 92.3304 | 86.1400 |
68
+
69
+
70
+ ### Framework versions
71
+
72
+ - Transformers 4.23.0.dev0
73
+ - Pytorch 1.12.1+cu113
74
+ - Datasets 2.5.2
75
+ - Tokenizers 0.13.0
pytorch_model.bin CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:a8514a839a8973804c295867152ab37e4eda1435cf81aa80fc2cc4fac6e231e6
3
  size 496297393
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7b09dfc116156233cf0f52b50b0a6d8b59edcc0860ec693be6e489c896701200
3
  size 496297393