mlfoundations / open_flamingo

An open-source framework for training large multimodal models.
MIT License
3.75k stars 284 forks source link

Support for Onnx format? #256

Open mhjort opened 1 year ago

mhjort commented 1 year ago

Do you have plans for releasing trained models in Onnx format?

I tried to manually export the model mpt-1b-redpajama-200bto onnx format. Export generated lots of warnings like this:

 TracerWarning: Converting a tensor to a Python boolean might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future.

and then when trying the exported model with onnxruntime I got the following error:

 INVALID_GRAPH : Load model from open_flamingo.onnx failed:This is an invalid model. Type Error: Type 'tensor(bool)' of input parameter (/lang_encoder/Equal_output_0) of operator (CumSum)
anas-awadalla commented 1 year ago

Hello! We don't have plans to do this. I am personally not familiar with Onnx but we would welcome a PR 😄.