This is currently not possible and
will not directly save the structure of the model, but would still depend on the source files (and could thus break in various ways).
You could check the experimental torch.package
utility, which might fit your use case, but note that it’s experimental and you might thus encounter issues with it.