shahrukhx01 commited on
Commit
ad3bde6
1 Parent(s): d8871b0

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +14 -1
README.md CHANGED
@@ -19,4 +19,17 @@ eval_best_f1 = 82.9231 <br/>
19
  eval_exact = 79.9208 <br/>
20
  eval_f1 = 82.9231 <br/>
21
  eval_samples = 12165 <br/>
22
- eval_total = 11873
 
 
 
 
 
 
 
 
 
 
 
 
 
 
19
  eval_exact = 79.9208 <br/>
20
  eval_f1 = 82.9231 <br/>
21
  eval_samples = 12165 <br/>
22
+ eval_total = 11873
23
+
24
+ ## Uasge in transformers
25
+ Import the script from [here](https://huggingface.co/shahrukhx01/roberta-base-squad2-boolq-baseline/blob/main/multitask_model.py)
26
+ ```python
27
+ from multitask_model import RobertaForMultitaskQA
28
+ from transformers import RobertaTokenizerFast
29
+ device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
30
+ model = RobertaForMultitaskQA.from_pretrained(
31
+ "shahrukhx01/roberta-base-squad2-boolq-baseline",
32
+ task_labels_map={"squad_v2": 2, "boolq": 3},
33
+ ).to(device)
34
+ tokenizer = RobertaTokenizerFast.from_pretrained("shahrukhx01/roberta-base-squad2-boolq-baseline")
35
+ ```