How to do quantization for pretrained model? #4739
EvelinaAleksiutenko
started this conversation in
General
Replies: 1 comment
-
Having the same issue |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I need to do quantization for the pretrained model. After reading the tutorialI try to run the code
snippet:
model = nemo_nlp.models.PunctuationCapitalizationModel.from_pretrained("punctuation_en_distilbert")
. The model was loaded correctly.quantized_model = torch.quantization.quantize_dynamic(model, {torch.nn.Linear}, dtype=torch.qint8)
Here I faced an error:
NotImplementedError: object proxy must define deepcopy()
How can I fix this? How can I actually do quantization for NLP models from NeMo?
Beta Was this translation helpful? Give feedback.
All reactions