You can assign any attribute to the model, but note that only parameters and buffers would show up in the state_dict. If you want to store it, you could add the mapping to the checkpoint manually and save it in a similar way as e.g. the epoch argument is stored in the ImageNet example.