File size: 1,121 Bytes
2afd5bb |
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 |
---
inference: false
tags:
- onnx
- adapterhub:qa/narrativeqa
- adapter-transformers
- bart
datasets:
- narrativeqa
---
# ONNX export of Adapter `hSterz/narrativeqa` for facebook/bart-base
## Conversion of [AdapterHub/narrativeqa](https://huggingface.co/AdapterHub/narrativeqa) for UKP SQuARE
## Usage
```python
onnx_path = hf_hub_download(repo_id='UKP-SQuARE/narrativeqa-onnx', filename='model.onnx') # or model_quant.onnx for quantization
onnx_model = InferenceSession(onnx_path, providers=['CPUExecutionProvider'])
context = 'ONNX is an open format to represent models. The benefits of using ONNX include interoperability of frameworks and hardware optimization.'
question = 'What are advantages of ONNX?'
tokenizer = AutoTokenizer.from_pretrained('UKP-SQuARE/narrativeqa-onnx')
inputs = tokenizer(question, context, padding=True, truncation=True, return_tensors='np')
outputs = onnx_model.run(input_feed=dict(inputs), output_names=None)
```
## Architecture & Training
<!-- Add some description here -->
## Evaluation results
<!-- Add some description here -->
## Citation
<!-- Add some description here --> |