vamsibanda's picture
Update README.md
f788f36
metadata
pipeline_tag: sentence-similarity
language: en
license: apache-2.0
tags:
  - sentence-transformers
  - feature-extraction
  - sentence-similarity
  - transformers
  - onnx

ONNX convert all-roberta-large-v1

Conversion of sentence-transformers/all-roberta-large-v1

Usage (HuggingFace Optimum)

Using this model becomes easy when you have optimum installed:

python -m pip install optimum

Then you can use the model like this:

from optimum.onnxruntime.modeling_ort import ORTModelForCustomTasks

model = ORTModelForCustomTasks.from_pretrained("vamsibanda/sbert-all-roberta-large-v1-with-pooler")
tokenizer = AutoTokenizer.from_pretrained("vamsibanda/sbert-all-roberta-large-v1-with-pooler")
inputs = tokenizer("I love burritos!", return_tensors="pt")
pred = model(**inputs)
embedding = pred['pooler_output']