You could use PyTorch’s save and load methods. If you want to lazily load the data, you could store each data sample in a separate file and just load this particular file later (if you are not dealing with too many files).
Otherwise you should also be able to use HDF5 to store and load the data. We’ve had recently some topics about this.