You can put whatever you want in the state_dict, here is an example:
import torch
net = torch.nn.Linear(2, 2)
d = net.state_dict()
d.update({"custom_stuff": 123})
torch.save(d, "net.pth")

# Load it from the serialized file

new_net = torch.nn.Linear(2, 2)
# By default, strict=True, then you need to force it to False to not raise an error
state_dict = torch.load("net.pth")
custom_stuff = state_dict["custom_stuff"] # Retrieving your stuff after loading
new_net.load_state_dict(state_dict, strict=False) 
# NOTE: you can just del state_dict["custom_stuff"] if you want, then strict can be set True

# Check that the parameters have been loaded as expected

print(net.weight.data.equal(new_net.weight.data))
print(net.bias.data.equal(new_net.bias.data))