What is the recommend serialization format when considering the upcoming pt2?

There are two serialization format: torchscript and onnx.

torchscript seems will be deprecated in the long term: The nuances of PyTorch Graph Capture - #9 by penguinwu - compiler - PyTorch Dev Discussions, and after using torchscript for a period of time, we found that torchscript is not easy to use.

ONNX has a relatively larger number of users, but onnx can’t be loaded and run by torch directly, which lead to potential numeric issues.

My question is: is there a new serialization format in pt2? If not, which format you guys recommend for model serialization?

We’re still working on this but I’ll reach out again in a few months to provide an update if possible