Downloads · 30 days
6
2% of all-time downloads
alinet/bart-base-squad-qg
bart-base-squad-qg is a machine learning model from alinet. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for transformers.
A question generation model trained on SQuAD dataset.
Downloads · 30 days
6
2% of all-time downloads
All-time downloads
337
Public
Repo size
1.1 GB
Likes
0
Public
Click a slice to open those files.
.bin558 MB · 100%
From the Hugging Face model README
A question generation model trained on SQuAD dataset.
Example usage:
from transformers import BartConfig, BartForConditionalGeneration, BartTokenizer
model_name = "alinet/bart-base-squad-qg"
tokenizer = BartTokenizer.from_pretrained(model_name)
model = BartForConditionalGeneration.from_pretrained(model_name)
def run_model(input_string, **generator_args):
input_ids = tokenizer.encode(input_string, return_tensors="pt")
res = model.generate(input_ids, **generator_args)
output = tokenizer.batch_decode(res, skip_special_tokens=True)
print(output)
run_model("Stanford Question Answering Dataset (SQuAD) is a reading comprehension dataset, consisting of questions posed by crowdworkers on a set of Wikipedia articles, where the answer to every question is a segment of text, or span, from the corresponding reading passage, or the question might be unanswerable.", max_length=32, num_beams=4)
# ['What is the Stanford Question Answering Dataset?']