You won’t be able to run the model as the state_dict only contains its parameters and buffers.
In PyTorch “eager” mode the model definition is the source code of it, which thus would need to be accessible.
You can script the model and store the scripted model, which would be executable without the model definition.
No, I wouldn’t use this approach as you would have to make sure all source files are in the expected locations and your loading might easily break.
The introduction section explains it a bit better.
If you have an idea how the model would look like, e.g. were all parameters called sequentially, you might hack a model definition. Since the forward method is unknown, I don’t think it’s a practical approach.