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']
- Downloads last month
- 11
This model does not have enough activity to be deployed to Inference API (serverless) yet. Increase its social
visibility and check back later, or deploy to Inference Endpoints (dedicated)
instead.