Recomputation and quantization
To reduce the memory footprint during DNN training, we have two main kinds of methodology – recomputation and quantization.
Recomputation refers to the process where, if some tensors are not used for a certain period, we can delete the tensors and then recompute the result once we need it later.
At a high level, quantization means that we use fewer physical bits to represent a single value. For example, if a normal integer value consumes 4 bytes, by conducting quantization over this integer value, we use 2 bytes or even fewer bits to represent the same value. Quantization is lossy optimization, which means it may lose some information while shrinking the bits so that they represent the weights/gradients.
A comparison between these two approaches is illustrated in the following table:
Recomputation is performed to reproduce the previous...