This is multi-task
t5-base
model trained for question answering and answer aware question generation tasks.
For question generation the answer spans are highlighted within the text with special highlight tokens (
<hl>
) and prefixed with 'generate question: '. For QA the input is processed like this
question: question_text context: context_text </s>
You can play with the model using the inference API. Here's how you can use it
For QG
generate question: <hl> 42 <hl> is the answer to life, the universe and everything. </s>
For QA
question: What is 42 context: 42 is the answer to life, the universe and everything. </s>
from pipelines import pipeline
nlp = pipeline("multitask-qa-qg", model="valhalla/t5-base-qa-qg-hl")
# to generate questions simply pass the text
nlp("42 is the answer to life, the universe and everything.")
=> [{'answer': '42', 'question': 'What is the answer to life, the universe and everything?'}]
# for qa pass a dict with "question" and "context"
nlp({
"question": "What is 42 ?",
"context": "42 is the answer to life, the universe and everything."
})
=> 'the answer to life, the universe and everything'
Runs of valhalla t5-base-qa-qg-hl on huggingface.co
693
Total runs
0
24-hour runs
-4
3-day runs
9
7-day runs
111
30-day runs
More Information About t5-base-qa-qg-hl huggingface.co Model
t5-base-qa-qg-hl huggingface.co is an AI model on huggingface.co that provides t5-base-qa-qg-hl's model effect (), which can be used instantly with this valhalla t5-base-qa-qg-hl model. huggingface.co supports a free trial of the t5-base-qa-qg-hl model, and also provides paid use of the t5-base-qa-qg-hl. Support call t5-base-qa-qg-hl model through api, including Node.js, Python, http.
t5-base-qa-qg-hl huggingface.co is an online trial and call api platform, which integrates t5-base-qa-qg-hl's modeling effects, including api services, and provides a free online trial of t5-base-qa-qg-hl, you can try t5-base-qa-qg-hl online for free by clicking the link below.
valhalla t5-base-qa-qg-hl online free url in huggingface.co:
t5-base-qa-qg-hl is an open source model from GitHub that offers a free installation service, and any user can find t5-base-qa-qg-hl on GitHub to install. At the same time, huggingface.co provides the effect of t5-base-qa-qg-hl install, users can directly use t5-base-qa-qg-hl installed effect in huggingface.co for debugging and trial. It also supports api for free installation.