Consider using MLflow to help manage model saving and loading. https://mlflow.org/docs/latest/deep-learning/pytorch/guide
Saving the model
import mlflow.pytorch
with mlflow.start_run():
mlflow.pytorch.log_model(model, "model")
Loading the model later:
import mlflow.pytorch
model = mlflow.pytorch.load_model("runs:/<run_id>/model")