helenai's picture
commit files to HF hub
f69b218
|
raw
history blame
762 Bytes
metadata
language:
  - en
tags:
  - openvino

csarron/bert-base-uncased-squad-v1

This is the csarron/bert-base-uncased-squad-v1 model converted to OpenVINO, for accellerated inference.

An example of how to do inference on this model:

from optimum.intel.openvino import $model_class_str
from transformers import AutoTokenizer, pipeline

# model_id should be set to either a local directory or a model available on the HuggingFace hub.
model_id = "$new_model_id"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = $model_class_str.from_pretrained(model_id)
pipe = pipeline("$task", model=model, tokenizer=tokenizer)
result = pipe($input_text)
print(result)