File size: 1,966 Bytes
f06c838
 
 
985bad6
 
 
 
 
 
 
 
 
 
 
 
 
cb919a4
 
 
b40ae39
 
 
88b6677
 
 
 
 
 
 
 
 
 
7b8501c
 
 
c1ddd03
 
 
f06c838
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
22d035f
f06c838
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
---
datasets:
- alinet/balanced_qg
model-index:
- name: alinet/bart-base-balanced-ra-qg
  results:
  - task:
      type: text2text-generation
      name: Question Generation
    dataset:
      name: MRQA
      type: mrqa
    metrics:
    - type: bertscore
      value: 0.6536068921497561
      name: BERTScore F1
    - type: bertscore
      value: 0.6491253387475042
      name: BERTScore Precision
    - type: bertscore
      value: 0.6618921563478661
      name: BERTScore Recall
  - task:
      type: text2text-generation
      name: Question Generation
    dataset:
      name: Spoken-SQuAD
      type: alinet/spoken_squad
    metrics:
    - type: bertscore
      value: 0.6280233523142774
      name: BERTScore F1
    - type: bertscore
      value: 0.6270323888350072
      name: BERTScore Precision
    - type: bertscore
      value: 0.6320889797976309
      name: BERTScore Recall
---

A question generation model trained on `alinet/balanced_qg` dataset (`resolved_augmented` subset).

Example usage:

```py
from transformers import BartConfig, BartForConditionalGeneration, BartTokenizer

model_name = "alinet/bart-base-balanced-ra-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 term for a reading comprehension dataset consisting of questions posed by crowdworkers?']
```