phlippseitz commited on
Commit
1acec2f
1 Parent(s): 65ffbeb

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +39 -0
README.md ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ inference: false
3
+ tags:
4
+ - onnx
5
+ - adapterhub:qa/narrativeqa
6
+ - adapter-transformers
7
+ - bart
8
+ datasets:
9
+ - narrativeqa
10
+ ---
11
+
12
+ # ONNX export of Adapter `hSterz/narrativeqa` for facebook/bart-base
13
+ ## Conversion of [AdapterHub/narrativeqa](https://huggingface.co/AdapterHub/narrativeqa) for UKP SQuARE
14
+
15
+
16
+ ## Usage
17
+ ```python
18
+ onnx_path = hf_hub_download(repo_id='UKP-SQuARE/narrativeqa-onnx', filename='model.onnx') # or model_quant.onnx for quantization
19
+ onnx_model = InferenceSession(onnx_path, providers=['CPUExecutionProvider'])
20
+
21
+ context = 'ONNX is an open format to represent models. The benefits of using ONNX include interoperability of frameworks and hardware optimization.'
22
+ question = 'What are advantages of ONNX?'
23
+ tokenizer = AutoTokenizer.from_pretrained('UKP-SQuARE/narrativeqa-onnx')
24
+
25
+ inputs = tokenizer(question, context, padding=True, truncation=True, return_tensors='np')
26
+ outputs = onnx_model.run(input_feed=dict(inputs), output_names=None)
27
+ ```
28
+
29
+ ## Architecture & Training
30
+
31
+ <!-- Add some description here -->
32
+
33
+ ## Evaluation results
34
+
35
+ <!-- Add some description here -->
36
+
37
+ ## Citation
38
+
39
+ <!-- Add some description here -->