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

Collect statistics from subset in weight compression #3061

Merged
merged 4 commits into from
Nov 7, 2024

Conversation

ljaljushkin
Copy link
Contributor

@ljaljushkin ljaljushkin commented Nov 5, 2024

Changes

Set a subset size for collecting statistics

Reason for changes

subset size option is ignored and the whole dataset is used

Related tickets

n/a

Tests

  • unit test for setting subset size
  • manual/job/post_training_weight_compression/245

@github-actions github-actions bot added the NNCF PTQ Pull requests that updates NNCF PTQ label Nov 5, 2024
@github-actions github-actions bot added the NNCF OpenVINO Pull requests that updates NNCF OpenVINO label Nov 6, 2024
@ljaljushkin ljaljushkin marked this pull request as ready for review November 6, 2024 13:28
@ljaljushkin ljaljushkin requested a review from a team as a code owner November 6, 2024 13:28
Copy link
Collaborator

@nikita-savelyevv nikita-savelyevv left a comment

Choose a reason for hiding this comment

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

A minor comment on my side

Comment on lines 759 to 762
model: TModel,
graph: NNCFGraph,
nodes_and_port_ids: Iterable[Tuple[NNCFNode, int]],
subset_size: Optional[int] = None,
) -> StatisticPointsContainer:
Copy link
Collaborator

Choose a reason for hiding this comment

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

What do you think about also removing subset_size parameter from MixedPrecisionCriterion.get_statistic_points() method for two algorithms to be more aligned? I believe subset_size can be provided to criterion constructor similarly as it is done for WeightCompression algorithm.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Had to make it optional for data-free mixed precision, but probably it's better since the parameter is passed only once.

@ljaljushkin ljaljushkin requested a review from kshpv November 7, 2024 13:29
@ljaljushkin ljaljushkin merged commit 20ab35d into openvinotoolkit:develop Nov 7, 2024
14 checks passed
nikita-savelyevv pushed a commit to nikita-savelyevv/nncf that referenced this pull request Dec 11, 2024
…#3061)

### Changes

Set a subset size for collecting statistics

### Reason for changes

`subset size` option is ignored and the whole dataset is used

### Related tickets

n/a

### Tests

- [x] unit test for setting subset size
- [x] manual/job/post_training_weight_compression/245
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Code Freeze NNCF OpenVINO Pull requests that updates NNCF OpenVINO NNCF PTQ Pull requests that updates NNCF PTQ
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants