Remix.run Logo
woadwarrior01 7 days ago

The Python 3.13 virtualenv you're bundling with the app is 357MB, while the ONNX model is only 90.4MB.

onnxruntime has Swift bindings[1], consider using that. Or better yet use CoreML. You'll also be able to support x86 Macs with either of those.

[1]: https://github.com/microsoft/onnxruntime-swift-package-manag...

mdaniel 7 days ago | parent [-]

Even without changing one byte of the actual binary they could get pretty far by just evicting all the test files for those packages they're including. And, related to that, it seems that dist-info/RECORD ends up at 1,050,544 because the onnx folks decided it was important that they cryptographically sign all those test data files they're choosing to ship :-/

bobnarizes 7 days ago | parent [-]

Thanks for pointing this out mdaniel & woadwarrior01 — reducing the footprint is definitely on my radar and something I’m actively working on. I actually started with CoreML but switched to ONNX after running into some issues.

That said, it’s kind of amazing that we can run models of ~90 MB this efficiently on our devices today — the performance has been really encouraging. Appreciate the feedback!