tinygrad icon indicating copy to clipboard operation
tinygrad copied to clipboard

Export safetensors as ONNX/Pytorch/Tensorflow model

Open michbogos opened this issue 2 years ago • 2 comments

I'm looking for a way to convert a trained model to an ONNX model to use on the web. I've only found how to run ONNX models in tinygrad, but not how to export them.

An nice addition would also be to export to a pytorch or a tensorflow model to use on embedded devices and on the web.

michbogos avatar Feb 03 '24 17:02 michbogos

There's no way to export tinygrad model to onnx, torch/torchscript or tensorflow/tflite and it's not in scope of a project at a time. There is, though, webgpu backend that was removed last month in order to focus on more crucial things, but it still should work(extra/backends/ops_wgpu.py), or at least easy to fix and there is a way to export webgpu model so it can run on web(extra/export_model.py). If you absolutely need to run tinygrad model on web you might want to consider this path, but there are dragons there.

terafo avatar Feb 03 '24 18:02 terafo

Thanks for the information.

michbogos avatar Feb 03 '24 19:02 michbogos

close as not planned

chenyuxyz avatar Apr 16 '24 22:04 chenyuxyz

That's very sad

roman-koshchei avatar Jun 10 '25 16:06 roman-koshchei