Edit model card

ONNX export of Adapter hSterz/narrativeqa for facebook/bart-base

Conversion of AdapterHub/narrativeqa for UKP SQuARE


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

Evaluation results


Downloads last month
Inference API (serverless) has been turned off for this model.

Dataset used to train UKP-SQuARE/narrativeqa-onnx