webonnx / wonnx

A WebGPU-accelerated ONNX inference run-time written 100% in Rust, ready for native and the web
Other
1.54k stars 54 forks source link

Train ONNX models? #167

Closed 9876691 closed 1 year ago

9876691 commented 1 year ago

Is your feature request related to a problem? Please describe.

Onnx runtime allows for training https://github.com/microsoft/onnxruntime-training-examples is this possible with wonnx?

This could lead on to multi GPU training.

So perhaps at some point I could save models as ONNX and let training across multi GPU's be a configuration issue.

Describe the solution you'd like

Perhaps an example of training using wonnx, preferably in Rust.

Describe alternatives you've considered

I've asked the same question to ORT https://github.com/pykeio/ort/issues/51

Onnx Training API

There's a C interface into ONNX runtime training, no rust binding as yet.

https://github.com/microsoft/onnxruntime/blob/main/orttraining/orttraining/training_api/include/onnxruntime_training_c_api.h

It looks like the microsoft version doesn't support multi GPU.

pixelspark commented 1 year ago

Sorry, training is out of focus for wonnx. There are plenty of frameworks (I.e. torch) that can do training (and I am assuming multi-GPU as well). It should be fairly easy to convert trained models to ONNX for use with WONNX. Also torch can be used from rust through tch-rs.