-
Notifications
You must be signed in to change notification settings - Fork 798
Resume from checkpoint with quantization #21
Comments
Unfortunately, resuming training with active quantization isn't really supported. The mechanism that's in there at the moment, with At this time we weren't planning to focus on this feature. If you want to have a go at it, I'll be happy to help with any questions. |
@guyjacob, thanks for your reply. This explains why the hack seems to work for resuming quantized weight training -- it's the sequencing. My demo is different in this respect from the sample app in this repo. It does the following in the following order (it seemed to make sense that the model shouldn't be prepared twice, and not calling
I'm not clear why |
I am using a workaround to allow resuming from checkpoint with active quantization. The
requires_grad
flags aren't set in the restored biases and weights (they seem to be present at checkpoint save time). So as a quick fix I use:Without this, I get the PyTorch error message
element 0 of tensors does not require grad and does not have a grad_fn
.Looking for a proper way to fix this.
The text was updated successfully, but these errors were encountered: