You could script/trace the model and export it. This wouldn’t need separate source files, but you would also be unable to manipulate the model easily.
I would not recommend to save the complete eager model via torch.save, as it would still need to import the source files while reloading and can break easily.