RichardErkhov commited on
Commit
5f0c925
•
1 Parent(s): 32aef02

uploaded readme

Browse files
Files changed (1) hide show
  1. README.md +90 -0
README.md ADDED
@@ -0,0 +1,90 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Quantization made by Richard Erkhov.
2
+
3
+ [Github](https://github.com/RichardErkhov)
4
+
5
+ [Discord](https://discord.gg/pvy7H8DZMG)
6
+
7
+ [Request more models](https://github.com/RichardErkhov/quant_request)
8
+
9
+
10
+ question-answering-roberta-base-s-v2 - bnb 4bits
11
+ - Model creator: https://huggingface.co/consciousAI/
12
+ - Original model: https://huggingface.co/consciousAI/question-answering-roberta-base-s-v2/
13
+
14
+
15
+
16
+
17
+ Original model description:
18
+ ---
19
+ license: apache-2.0
20
+ tags:
21
+ - Question Answering
22
+ metrics:
23
+ - squad
24
+ model-index:
25
+ - name: consciousAI/question-answering-roberta-base-s-v2
26
+ results: []
27
+ ---
28
+
29
+ # Question Answering
30
+ 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>
31
+ Model is encoder-only (deepset/roberta-base-squad2) with QuestionAnswering LM Head, fine-tuned on SQUADx dataset with **exact_match:** 84.83 & **f1:** 91.80 performance scores.
32
+
33
+ [Live Demo: Question Answering Encoders vs Generative](https://huggingface.co/spaces/consciousAI/question_answering)
34
+
35
+ Please follow this link for [Encoder based Question Answering V1](https://huggingface.co/consciousAI/question-answering-roberta-base-s/)
36
+ <br>Please follow this link for [Generative Question Answering](https://huggingface.co/consciousAI/question-answering-generative-t5-v1-base-s-q-c/)
37
+
38
+ Example code:
39
+ ```
40
+ from transformers import pipeline
41
+
42
+ model_checkpoint = "consciousAI/question-answering-roberta-base-s-v2"
43
+
44
+ context = """
45
+ 🤗 Transformers is backed by the three most popular deep learning libraries — Jax, PyTorch and TensorFlow — with a seamless integration
46
+ between them. It's straightforward to train your models with one before loading them for inference with the other.
47
+ """
48
+ question = "Which deep learning libraries back 🤗 Transformers?"
49
+
50
+ question_answerer = pipeline("question-answering", model=model_checkpoint)
51
+ question_answerer(question=question, context=context)
52
+
53
+ ```
54
+
55
+ ## Training and evaluation data
56
+
57
+ SQUAD Split
58
+
59
+ ## Training procedure
60
+
61
+ Preprocessing:
62
+ 1. SQUAD Data longer chunks were sub-chunked with input context max-length 384 tokens and stride as 128 tokens.
63
+ 2. Target answers readjusted for sub-chunks, sub-chunks with no-answers or partial answers were set to target answer span as (0,0)
64
+
65
+ Metrics:
66
+ 1. Adjusted accordingly to handle sub-chunking.
67
+ 2. n best = 20
68
+ 3. skip answers with length zero or higher than max answer length (30)
69
+
70
+ ### Training hyperparameters
71
+ Custom Training Loop:
72
+ The following hyperparameters were used during training:
73
+ - learning_rate: 2e-5
74
+ - train_batch_size: 32
75
+ - eval_batch_size: 32
76
+ - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
77
+ - lr_scheduler_type: linear
78
+ - num_epochs: 2
79
+
80
+ ### Training results
81
+ {'exact_match': 84.83443708609272, 'f1': 91.79987545811638}
82
+
83
+ ### Framework versions
84
+
85
+ - Transformers 4.23.0.dev0
86
+ - Pytorch 1.12.1+cu113
87
+ - Datasets 2.5.2
88
+ - Tokenizers 0.13.0
89
+
90
+