Difference between mlmodel and mlpackage

34 Views Asked by At

CoreML models can be saved as either a Neural Network or a ML Program, in either “.mlmodel” (Neural Net) or “.mlpackage” (Neural Net/ML Program)

I know the Pytorch Saved Models are in .pth or .pt. But what are the differences between mlmodle and mlpackage.

Which is preferred where vs the another ?

Couldnt find any consolidated thing describing this

1

There are 1 best solutions below

0
Zayd On

So mlmodel is ur classic file for neural networks in CoreML, packing everything—structure, weights, the whole shebang—into one file.so mlpackage is the new kid pretty much kinda cooler because it splits the model’s brains (the structure) from its brawn (the weights)) This means u can messs with precision and its better for compiling on devices

.mlpackage is great wen u need that precision flexibility or want to leverage better performance on newer devices, while .mlmodel is still hanging around for scenarios needing updates directly on the device or when using custom stuff not yet supported by ML programs