fast-sentence-transformers icon indicating copy to clipboard operation
fast-sentence-transformers copied to clipboard

Why is the original model required?

Open mgoldenbe opened this issue 1 year ago • 2 comments

I tried removing the original files from .cache and leaving only the .onnx file. However, when I ran the script it downloaded the original model again. How can I get rid of the dependency on the original model? In fact, given onnx, I should only need onnxruntime to make inferences. So, how do I get rid of the dependencies such as torch?

mgoldenbe avatar Sep 11 '23 20:09 mgoldenbe

did you find a solution, for the whole model dependency?

Sayed-Ameer avatar Nov 08 '23 08:11 Sayed-Ameer

This package not only converts the model to onnx format, but also instantiates it to run inference. To run inference, you need the tokenizer, which is expected in the cache_folder. The tokenizer is instantiated by the transformer library, which depends on torch, among other things.

antonmosin avatar Mar 11 '24 15:03 antonmosin

Sorry for the late response but I've got good news! Sentence Transformers has an awesome maintainer again @tomaarsen, along with awesome ONNX integrations through optimum, therefore I decided to archive this project. https://github.com/UKPLab/sentence-transformers. Take a look here https://www.philschmid.de/optimize-sentence-transformers.

davidberenstein1957 avatar May 31 '24 14:05 davidberenstein1957