I want to convert a model.safetensors to ONNX, unfortunately I haven't found enough information about the procedure. The documentation of safetensors package isn't enough and actually is not clear even how to get the original (pytorch in my case) model, since when I try something as
with st.safe_open(modelsafetensors, framework="pt") as mystf:
...
the mystf object has get_tensor('sometensorname') but it seems hasn't any get_model() method or something similar.
I had the same problem and this is what I found for the conversion of model:
Convertor
Download from repo
convert.pyandrequirements.txtfrom scripts, put it to some folder.python -m venv .venvsource .venv/bin/activatepip install -r requirements.txtpython convert.py --quantize --model_id BAAI/bge-small-en-v1.5