This isn’t a standard flow PyTorch quantization provides, but you could do something like this:

for a Tensor, use torch.quantize_per_tensor(x, ...) to convert fp32 -> int8, and x.dequantize() to convert from int8 to fp32.
override the _save_to_state_dict and _load_from_state_dict functions on the modules you’d like to do this on to use your custom logic.  You can call quantize_per_tensor when saving, and convert it back with dequantize when loading.