Torch provides a way to save models in Torchscript. Using this format, several computations can be further optimised, hence faster models.
More information: https://pytorch.org/docs/stable/jit.html#frequently-asked-questions
We might also to this for datasets (collated_func)