julianrisch
commited on
Commit
•
870b228
1
Parent(s):
ce2db4c
Update README.md
Browse files
README.md
CHANGED
@@ -147,7 +147,7 @@ This is the [flan-t5-xl](https://huggingface.co/google/flan-t5-xl) model, fine-t
|
|
147 |
**Downstream-task:** Extractive QA
|
148 |
**Training data:** SQuAD 2.0
|
149 |
**Eval data:** SQuAD 2.0
|
150 |
-
**Code:** See [an example QA pipeline
|
151 |
|
152 |
## Hyperparameters
|
153 |
|
@@ -167,11 +167,27 @@ num_epochs: 4.0
|
|
167 |
## Usage
|
168 |
|
169 |
### In Haystack
|
170 |
-
Haystack is an
|
|
|
171 |
```python
|
172 |
-
#
|
173 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
174 |
```
|
|
|
175 |
|
176 |
### In Transformers
|
177 |
```python
|
@@ -195,24 +211,30 @@ tokenizer = AutoTokenizer.from_pretrained(model_name)
|
|
195 |
## Authors
|
196 |
**Sebastian Husch Lee:** sebastian.huschlee [at] deepset.ai
|
197 |
|
198 |
-
|
199 |
## About us
|
|
|
200 |
<div class="grid lg:grid-cols-2 gap-x-4 gap-y-3">
|
201 |
<div class="w-full h-40 object-cover mb-2 rounded-lg flex items-center justify-center">
|
202 |
-
<img alt="" src="https://
|
203 |
</div>
|
204 |
-
|
205 |
-
<img alt="" src="https://
|
206 |
</div>
|
207 |
</div>
|
208 |
|
209 |
-
[deepset](http://deepset.ai/) is the company behind the open-source
|
210 |
|
|
|
|
|
|
|
|
|
211 |
|
212 |
## Get in touch and join the Haystack community
|
213 |
|
214 |
-
<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>.
|
|
|
|
|
215 |
|
216 |
-
|
217 |
|
218 |
-
|
|
|
147 |
**Downstream-task:** Extractive QA
|
148 |
**Training data:** SQuAD 2.0
|
149 |
**Eval data:** SQuAD 2.0
|
150 |
+
**Code:** See [an example extractive QA pipeline built with Haystack](https://haystack.deepset.ai/tutorials/34_extractive_qa_pipeline)
|
151 |
|
152 |
## Hyperparameters
|
153 |
|
|
|
167 |
## Usage
|
168 |
|
169 |
### In Haystack
|
170 |
+
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.
|
171 |
+
To load and run the model with [Haystack](https://github.com/deepset-ai/haystack/):
|
172 |
```python
|
173 |
+
# After running pip install haystack-ai "transformers[torch,sentencepiece]"
|
174 |
+
|
175 |
+
from haystack import Document
|
176 |
+
from haystack.components.readers import ExtractiveReader
|
177 |
+
|
178 |
+
docs = [
|
179 |
+
Document(content="Python is a popular programming language"),
|
180 |
+
Document(content="python ist eine beliebte Programmiersprache"),
|
181 |
+
]
|
182 |
+
|
183 |
+
reader = ExtractiveReader(model="deepset/flan-t5-xl-squad2")
|
184 |
+
reader.warm_up()
|
185 |
+
|
186 |
+
question = "What is a popular programming language?"
|
187 |
+
result = reader.run(query=question, documents=docs)
|
188 |
+
# {'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),...)]}
|
189 |
```
|
190 |
+
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).
|
191 |
|
192 |
### In Transformers
|
193 |
```python
|
|
|
211 |
## Authors
|
212 |
**Sebastian Husch Lee:** sebastian.huschlee [at] deepset.ai
|
213 |
|
|
|
214 |
## About us
|
215 |
+
|
216 |
<div class="grid lg:grid-cols-2 gap-x-4 gap-y-3">
|
217 |
<div class="w-full h-40 object-cover mb-2 rounded-lg flex items-center justify-center">
|
218 |
+
<img alt="" src="https://raw.githubusercontent.com/deepset-ai/.github/main/deepset-logo-colored.png" class="w-40"/>
|
219 |
</div>
|
220 |
+
<div class="w-full h-40 object-cover mb-2 rounded-lg flex items-center justify-center">
|
221 |
+
<img alt="" src="https://raw.githubusercontent.com/deepset-ai/.github/main/haystack-logo-colored.png" class="w-40"/>
|
222 |
</div>
|
223 |
</div>
|
224 |
|
225 |
+
[deepset](http://deepset.ai/) is the company behind the production-ready open-source AI framework [Haystack](https://haystack.deepset.ai/).
|
226 |
|
227 |
+
Some of our other work:
|
228 |
+
- [Distilled roberta-base-squad2 (aka "tinyroberta-squad2")](https://huggingface.co/deepset/tinyroberta-squad2)
|
229 |
+
- [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)
|
230 |
+
- [deepset Cloud](https://www.deepset.ai/deepset-cloud-product), [deepset Studio](https://www.deepset.ai/deepset-studio)
|
231 |
|
232 |
## Get in touch and join the Haystack community
|
233 |
|
234 |
+
<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>.
|
235 |
+
|
236 |
+
We also have a <strong><a class="h-7" href="https://haystack.deepset.ai/community">Discord community open to everyone!</a></strong></p>
|
237 |
|
238 |
+
[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)
|
239 |
|
240 |
+
By the way: [we're hiring!](http://www.deepset.ai/jobs)
|