marcelotduarte / cx_Freeze

cx_Freeze creates standalone executables from Python scripts, with the same performance, is cross-platform and should work on any platform that Python itself works on.
https://marcelotduarte.github.io/cx_Freeze/
Other
1.28k stars 210 forks source link

Reducing the Size of PyTorch-Based Executable #2412

Open hwy1992129 opened 1 month ago

hwy1992129 commented 1 month ago

Hi,

I'm working on converting a Python program that uses PyTorch to an executable file. However, the folder for the app is too large. I've noticed that the original torch2.3+cu118 in conda is around 5GB, and the torch library in the app is about 4GB.

I'm wondering how to use torch while keeping the executable file small. Specifically, how do others create standalone binary executables that are only 200-300 MB in size?

Any advice or suggestions would be greatly appreciated. Thank you!