domenicrosati commited on
Commit
f13bee7
1 Parent(s): 922bffd

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +27 -3
README.md CHANGED
@@ -24,17 +24,41 @@ It achieves the following results on the evaluation set:
24
  - Rougelsum: 85.4236
25
  - Bleu: 72.1080
26
 
 
 
27
  ## Model description
28
 
29
- More information needed
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
30
 
31
  ## Intended uses & limitations
32
 
33
- More information needed
34
 
35
  ## Training and evaluation data
36
 
37
- More information needed
38
 
39
  ## Training procedure
40
 
 
24
  - Rougelsum: 85.4236
25
  - Bleu: 72.1080
26
 
27
+ See: [https://wandb.ai/domenicrosati/huggingface/runs/n1yallpe](https://wandb.ai/domenicrosati/huggingface/runs/n1yallpe)
28
+
29
  ## Model description
30
 
31
+ A t5-model model to convert questions, answer pairs into statements.
32
+
33
+ The input should be all lower case and punctuation removed.
34
+ Use with `. ` as the seperator between question and answer.
35
+ > "where in the world is carmen. abruzzo"
36
+ > Output: "carmen is in abruzzo"
37
+
38
+ ```
39
+ from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
40
+
41
+ tokenizer = AutoTokenizer.from_pretrained('domenicrosati/QA2D-t5-small')
42
+ model = AutoModelForSeq2SeqLM.from_pretrained('domenicrosati/QA2D-t5-small')
43
+
44
+ question = "where in the world is carmen sandiego"
45
+ answer = "she is in abruzzo"
46
+ SEP = ". "
47
+
48
+ prompt = f'{question}{SEP}{answer}'
49
+ input_ids = tokenizer(prompt, return_tensors='pt').input_ids
50
+ output_ids = model.generate(input_ids)
51
+ responses = tokenizer.batch_decode(output_ids, skip_special_tokens=True)
52
+ # ['carmen sandiego is in abruzzo']
53
+ ```
54
 
55
  ## Intended uses & limitations
56
 
57
+ To convert questions, answer pairs into statements.
58
 
59
  ## Training and evaluation data
60
 
61
+ Uses [QA2D](https://huggingface.co/datasets/domenicrosati/QA2D).
62
 
63
  ## Training procedure
64