-
Notifications
You must be signed in to change notification settings - Fork 0
Split get_weight_compression_parameters on get_params/collect_statistics #43
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
base: develop
Are you sure you want to change the base?
Conversation
all_weight_params, ratio_defining_params, group_size_values = self.get_weight_compression_parameters( | ||
model, graph | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
all_weight_params, ratio_defining_params, group_size_values = self._quantizer.get_weight_compression_parameters(
model, graph
)
quantizer doesn't need sensetivity metrics/ ratio and etc. It is the basic mixed precision: if the node is embedding node/ last node/ conv node- it is in the backup precision. Have to keep backup precision though
src/nncf/quantization/algorithms/weight_compression/algorithm.py
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aamir, could you please try to work on top of this refactoring? Would it possible to separate quantizer/algorithm the way I described in the comments?
all_weight_params, ratio_defining_params, group_size_values = self.get_weight_compression_parameters( | ||
model, graph | ||
) | ||
return self.apply_with_parameters( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
self._algo.apply_with_parameters(
model,
graph,
dataset,
statistic_points,
all_weight_params,
ratio_defining_params,
group_size_values,
)
algo has all required params like sencetivity metric/ ratio and etc
Changes
Reason for changes
Related tickets
Tests