julianrisch
commited on
Commit
•
ff971b7
1
Parent(s):
40530bc
Update README.md
Browse files
README.md
CHANGED
@@ -139,9 +139,9 @@ model-index:
|
|
139 |
value: 85.307
|
140 |
name: F1
|
141 |
---
|
142 |
-
# deberta-v3-large for QA
|
143 |
|
144 |
-
This is the [deberta-v3-large](https://huggingface.co/microsoft/deberta-v3-large) 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.
|
145 |
|
146 |
|
147 |
## Overview
|
@@ -150,7 +150,7 @@ This is the [deberta-v3-large](https://huggingface.co/microsoft/deberta-v3-large
|
|
150 |
**Downstream-task:** Extractive QA
|
151 |
**Training data:** SQuAD 2.0
|
152 |
**Eval data:** SQuAD 2.0
|
153 |
-
**Code:** See [an example QA pipeline
|
154 |
**Infrastructure**: 1x NVIDIA A10G
|
155 |
|
156 |
## Hyperparameters
|
@@ -171,12 +171,27 @@ max_query_length=64
|
|
171 |
## Usage
|
172 |
|
173 |
### In Haystack
|
174 |
-
Haystack is an
|
|
|
175 |
```python
|
176 |
-
|
177 |
-
|
178 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
179 |
```
|
|
|
180 |
|
181 |
### In Transformers
|
182 |
```python
|
@@ -214,29 +229,29 @@ Evaluated on the SQuAD 2.0 dev set with the [official eval script](https://works
|
|
214 |
```
|
215 |
|
216 |
## About us
|
|
|
217 |
<div class="grid lg:grid-cols-2 gap-x-4 gap-y-3">
|
218 |
<div class="w-full h-40 object-cover mb-2 rounded-lg flex items-center justify-center">
|
219 |
-
<img alt="" src="https://
|
220 |
</div>
|
221 |
-
|
222 |
-
<img alt="" src="https://
|
223 |
</div>
|
224 |
</div>
|
225 |
|
226 |
-
[deepset](http://deepset.ai/) is the company behind the open-source
|
227 |
-
|
228 |
|
229 |
Some of our other work:
|
230 |
-
- [Distilled roberta-base-squad2 (aka "tinyroberta-squad2")](
|
231 |
-
- [German BERT
|
232 |
-
- [
|
233 |
|
234 |
## Get in touch and join the Haystack community
|
235 |
|
236 |
-
<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://haystack.deepset.ai">Documentation</a></strong>.
|
237 |
|
238 |
-
We also have a <strong><a class="h-7" href="https://haystack.deepset.ai/community
|
239 |
|
240 |
-
[Twitter](https://twitter.com/
|
241 |
|
242 |
-
By the way: [we're hiring!](http://www.deepset.ai/jobs)
|
|
|
139 |
value: 85.307
|
140 |
name: F1
|
141 |
---
|
142 |
+
# deberta-v3-large for Extractive QA
|
143 |
|
144 |
+
This is the [deberta-v3-large](https://huggingface.co/microsoft/deberta-v3-large) 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 Extractive Question Answering.
|
145 |
|
146 |
|
147 |
## Overview
|
|
|
150 |
**Downstream-task:** Extractive QA
|
151 |
**Training data:** SQuAD 2.0
|
152 |
**Eval data:** SQuAD 2.0
|
153 |
+
**Code:** See [an example extractive QA pipeline built with Haystack](https://haystack.deepset.ai/tutorials/34_extractive_qa_pipeline)
|
154 |
**Infrastructure**: 1x NVIDIA A10G
|
155 |
|
156 |
## Hyperparameters
|
|
|
171 |
## Usage
|
172 |
|
173 |
### In Haystack
|
174 |
+
Haystack is an AI orchestration framework to build customizable, production-ready LLM applications. You can use this model in Haystack to do extractive question answering on documents.
|
175 |
+
To load and run the model with [Haystack](https://github.com/deepset-ai/haystack/):
|
176 |
```python
|
177 |
+
# After running pip install haystack-ai "transformers[torch,sentencepiece]"
|
178 |
+
|
179 |
+
from haystack import Document
|
180 |
+
from haystack.components.readers import ExtractiveReader
|
181 |
+
|
182 |
+
docs = [
|
183 |
+
Document(content="Python is a popular programming language"),
|
184 |
+
Document(content="python ist eine beliebte Programmiersprache"),
|
185 |
+
]
|
186 |
+
|
187 |
+
reader = ExtractiveReader(model="deepset/deberta-v3-large-squad2")
|
188 |
+
reader.warm_up()
|
189 |
+
|
190 |
+
question = "What is a popular programming language?"
|
191 |
+
result = reader.run(query=question, documents=docs)
|
192 |
+
# {'answers': [ExtractedAnswer(query='What is a popular programming language?', score=0.5740374326705933, data='python', document=Document(id=..., content: '...'), context=None, document_offset=ExtractedAnswer.Span(start=0, end=6),...)]}
|
193 |
```
|
194 |
+
For a complete example with an extractive question answering pipeline that scales over many documents, check out the [corresponding Haystack tutorial](https://haystack.deepset.ai/tutorials/34_extractive_qa_pipeline).
|
195 |
|
196 |
### In Transformers
|
197 |
```python
|
|
|
229 |
```
|
230 |
|
231 |
## About us
|
232 |
+
|
233 |
<div class="grid lg:grid-cols-2 gap-x-4 gap-y-3">
|
234 |
<div class="w-full h-40 object-cover mb-2 rounded-lg flex items-center justify-center">
|
235 |
+
<img alt="" src="https://raw.githubusercontent.com/deepset-ai/.github/main/deepset-logo-colored.png" class="w-40"/>
|
236 |
</div>
|
237 |
+
<div class="w-full h-40 object-cover mb-2 rounded-lg flex items-center justify-center">
|
238 |
+
<img alt="" src="https://raw.githubusercontent.com/deepset-ai/.github/main/haystack-logo-colored.png" class="w-40"/>
|
239 |
</div>
|
240 |
</div>
|
241 |
|
242 |
+
[deepset](http://deepset.ai/) is the company behind the production-ready open-source AI framework [Haystack](https://haystack.deepset.ai/).
|
|
|
243 |
|
244 |
Some of our other work:
|
245 |
+
- [Distilled roberta-base-squad2 (aka "tinyroberta-squad2")](https://huggingface.co/deepset/tinyroberta-squad2)
|
246 |
+
- [German BERT](https://deepset.ai/german-bert), [GermanQuAD and GermanDPR](https://deepset.ai/germanquad), [German embedding model](https://huggingface.co/mixedbread-ai/deepset-mxbai-embed-de-large-v1)
|
247 |
+
- [deepset Cloud](https://www.deepset.ai/deepset-cloud-product), [deepset Studio](https://www.deepset.ai/deepset-studio)
|
248 |
|
249 |
## Get in touch and join the Haystack community
|
250 |
|
251 |
+
<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>.
|
252 |
|
253 |
+
We also have a <strong><a class="h-7" href="https://haystack.deepset.ai/community">Discord community open to everyone!</a></strong></p>
|
254 |
|
255 |
+
[Twitter](https://twitter.com/Haystack_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://haystack.deepset.ai/) | [YouTube](https://www.youtube.com/@deepset_ai)
|
256 |
|
257 |
+
By the way: [we're hiring!](http://www.deepset.ai/jobs)
|