rajpurkar/squad
Viewer • Updated • 98.2k • 287k • 1.03k
How to use Rachneet/t5-base-qg-hl-squadv2 with Transformers:
# Load model directly
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
tokenizer = AutoTokenizer.from_pretrained("Rachneet/t5-base-qg-hl-squadv2")
model = AutoModelForSeq2SeqLM.from_pretrained("Rachneet/t5-base-qg-hl-squadv2", device_map="auto")This is t5-base model trained for answer aware question generation task. The answer spans are highlighted within the text with special highlight tokens.
You can play with the model using the inference API, just highlight the answer spans with <hl> tokens and end the text with </s>. For example
<hl> 42 <hl> is the answer to life, the universe and everything. </s>
For more deatils see this repo.