Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added hybrid quantization for seq2seq models #427

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

AlexKoff88
Copy link
Collaborator

This is a draft of the PR that should be merged after OpenVINO 2023.1 release

@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint.

@AlexKoff88 AlexKoff88 changed the title [Draft]: Added hybrid quantization for seq2seq models Added hybrid quantization for seq2seq models Nov 9, 2023
Comment on lines +288 to +291
# Compress weights of decoders for safity
self.model.decoder_model = nncf.compress_weights(self.model.decoder_model)
if self.model.use_cache:
self.model.decoder_with_past_model = nncf.compress_weights(self.model.decoder_with_past_model)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would there be a possibility to also quantize the activations for the decoder components?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is possible but it may hurt accuracy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants