Spaces:
Running
Running
Shashwat2528
commited on
Commit
·
c6cab21
1
Parent(s):
46af362
Update README.md
Browse files
README.md
CHANGED
@@ -8,4 +8,146 @@ pinned: false
|
|
8 |
license: cc-by-4.0
|
9 |
---
|
10 |
|
11 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8 |
license: cc-by-4.0
|
9 |
---
|
10 |
|
11 |
+
---
|
12 |
+
language: en
|
13 |
+
license: cc-by-4.0
|
14 |
+
datasets:
|
15 |
+
- squad_v2
|
16 |
+
model-index:
|
17 |
+
- name: Aviskaaram-ekta
|
18 |
+
results:
|
19 |
+
- task:
|
20 |
+
type: Question-Answering
|
21 |
+
name: Question Answering
|
22 |
+
dataset:
|
23 |
+
name: squad_v2
|
24 |
+
type: squad_v2
|
25 |
+
config: squad_v2
|
26 |
+
split: validation
|
27 |
+
metrics:
|
28 |
+
- type: exact_match
|
29 |
+
value: -
|
30 |
+
name: Exact Match
|
31 |
+
verified: true
|
32 |
+
verifyToken: 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
|
33 |
+
|
34 |
+
- type: f1
|
35 |
+
value: -
|
36 |
+
name: F1
|
37 |
+
verified: true
|
38 |
+
verifyToken: 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
|
39 |
+
|
40 |
+
- type: total
|
41 |
+
value: 11869
|
42 |
+
name: total
|
43 |
+
verified: true
|
44 |
+
verifyToken: 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
|
45 |
+
|
46 |
+
---
|
47 |
+
|
48 |
+
# Aviskaaram-ekta for QA
|
49 |
+
|
50 |
+
This is the [Aviskaaram-ekta](https://huggingface.co/) model, fine-tuned using the [SQuAD2.0](https://huggingface.co/datasets/squad_v2) dataset. It's been trained on question-answer pairs, including unanswerable questions, for the task of Question Answering.
|
51 |
+
|
52 |
+
|
53 |
+
## Overview
|
54 |
+
**Language model:**Aviskaaram-ekta
|
55 |
+
**Language:** English
|
56 |
+
**Downstream-task:** Extractive QA
|
57 |
+
**Training data:** SQuAD 2.0
|
58 |
+
**Eval data:** SQuAD 2.0
|
59 |
+
**Code:** See [an example QA pipeline on Haystack](https://haystack.deepset.ai/tutorials/first-qa-system)
|
60 |
+
**Infrastructure**: 4x Tesla v100
|
61 |
+
|
62 |
+
## Hyperparameters
|
63 |
+
|
64 |
+
```
|
65 |
+
batch_size = 4
|
66 |
+
n_epochs = 50
|
67 |
+
base_LM_model = "roberta-base"
|
68 |
+
max_seq_len = 512
|
69 |
+
learning_rate = 9e-5
|
70 |
+
lr_schedule = LinearWarmup
|
71 |
+
warmup_proportion = 0.2
|
72 |
+
doc_stride=128
|
73 |
+
max_query_length=64
|
74 |
+
```
|
75 |
+
|
76 |
+
|
77 |
+
## Usage
|
78 |
+
|
79 |
+
### In Haystack
|
80 |
+
Haystack is an NLP framework by deepset. You can use this model in a Haystack pipeline to do question answering at scale (over many documents). To load the model in [Haystack](https://github.com/deepset-ai/haystack/):
|
81 |
+
```python
|
82 |
+
reader = FARMReader(model_name_or_path="AVISHKAARAM/avishkaarak-ekta-hindi")
|
83 |
+
# or
|
84 |
+
reader = TransformersReader(model_name_or_path="AVISHKAARAM/avishkaarak-ekta-hindi",tokenizer="deepset/roberta-base-squad2")
|
85 |
+
```
|
86 |
+
For a complete example of ``avishkaarak-ekta-hindi`` being used for Question Answering, check out the [Tutorials in Haystack Documentation](https://haystack.deepset.ai/tutorials/first-qa-system)
|
87 |
+
|
88 |
+
### In Transformers
|
89 |
+
```python
|
90 |
+
from transformers import AutoModelForQuestionAnswering, AutoTokenizer, pipeline
|
91 |
+
|
92 |
+
model_name = "AVISHKAARAM/avishkaarak-ekta-hindi"
|
93 |
+
|
94 |
+
# a) Get predictions
|
95 |
+
nlp = pipeline('question-answering', model=model_name, tokenizer=model_name)
|
96 |
+
QA_input = {
|
97 |
+
'question': 'Why is model conversion important?',
|
98 |
+
'context': 'The option to convert models between FARM and transformers gives freedom to the user and let people easily switch between frameworks.'
|
99 |
+
}
|
100 |
+
res = nlp(QA_input)
|
101 |
+
|
102 |
+
# b) Load model & tokenizer
|
103 |
+
model = AutoModelForQuestionAnswering.from_pretrained(model_name)
|
104 |
+
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
105 |
+
```
|
106 |
+
|
107 |
+
## Performance
|
108 |
+
Evaluated on the SQuAD 2.0 dev set with the [official eval script](https://worksheets.codalab.org/rest/bundles/0x6b567e1cf2e041ec80d7098f031c5c9e/contents/blob/).
|
109 |
+
|
110 |
+
```
|
111 |
+
"exact": ,
|
112 |
+
"f1": ,
|
113 |
+
|
114 |
+
"total": ,
|
115 |
+
"HasAns_exact": ,
|
116 |
+
"HasAns_f1": ,
|
117 |
+
"HasAns_total": ,
|
118 |
+
"NoAns_exact": ,
|
119 |
+
"NoAns_f1": ,
|
120 |
+
"NoAns_total":
|
121 |
+
```
|
122 |
+
|
123 |
+
## Authors
|
124 |
+
**Branden Chan:** [email protected]
|
125 |
+
**Timo Möller:** [email protected]
|
126 |
+
**Malte Pietsch:** [email protected]
|
127 |
+
**Tanay Soni:** [email protected]
|
128 |
+
|
129 |
+
## About us
|
130 |
+
|
131 |
+
<div class="grid lg:grid-cols-2 gap-x-4 gap-y-3">
|
132 |
+
<div class="w-full h-40 object-cover mb-2 rounded-lg flex items-center justify-center">
|
133 |
+
<img alt="" src="https://raw.githubusercontent.com/deepset-ai/.github/main/deepset-logo-colored.png" class="w-40"/>
|
134 |
+
</div>
|
135 |
+
<div class="w-full h-40 object-cover mb-2 rounded-lg flex items-center justify-center">
|
136 |
+
<img alt="" src="https://raw.githubusercontent.com/deepset-ai/.github/main/haystack-logo-colored.png" class="w-40"/>
|
137 |
+
</div>
|
138 |
+
</div>
|
139 |
+
|
140 |
+
[deepset](http://deepset.ai/) is the company behind the open-source NLP framework [Haystack](https://haystack.deepset.ai/) which is designed to help you build production ready NLP systems that use: Question answering, summarization, ranking etc.
|
141 |
+
|
142 |
+
|
143 |
+
|
144 |
+
## Get in touch and join the Haystack community
|
145 |
+
|
146 |
+
<p>For more info on Haystack, visit our <strong><a href="https://github.com/deepset-ai/haystack">GitHub</a></strong> repo and <strong><a href="https://docs.haystack.deepset.ai">Documentation</a></strong>.
|
147 |
+
|
148 |
+
We also have a <strong><a class="h-7" href="https://haystack.deepset.ai/community">Discord community open to everyone!</a></strong></p>
|
149 |
+
|
150 |
+
[Twitter](https://twitter.com/deepset_ai) | [LinkedIn](https://www.linkedin.com/company/deepset-ai/) | [Discord](https://haystack.deepset.ai/community) | [GitHub Discussions](https://github.com/deepset-ai/haystack/discussions) | [Website](https://deepset.ai)
|
151 |
+
|
152 |
+
By the way: [we're hiring!](http://www.deepset.ai/jobs)
|
153 |
+
|