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

Docs for statistics caching #3052

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

kshpv
Copy link
Collaborator

@kshpv kshpv commented Oct 31, 2024

Changes

Add section regarding statistics caching for WeightCompression

@kshpv kshpv requested a review from a team as a code owner October 31, 2024 14:14
@github-actions github-actions bot added the documentation Improvements or additions to documentation label Oct 31, 2024
@@ -180,6 +180,20 @@ from nncf import compress_weights, CompressWeightsMode
compressed_model = compress_weights(model, mode=CompressWeightsMode.E2M1, group_size=32, all_layers=True)
```

#### Caching Statistics
Copy link
Contributor

Choose a reason for hiding this comment

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

Caching stats are the only bullet in usage guide. Looks confusing. I'd add one more for previous bullets.
image

Copy link
Collaborator

Choose a reason for hiding this comment

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

Do we really need bullets at all?

@@ -180,6 +180,20 @@ from nncf import compress_weights, CompressWeightsMode
compressed_model = compress_weights(model, mode=CompressWeightsMode.E2M1, group_size=32, all_layers=True)
```

#### Caching Statistics

To optimize performance and reuse statistics data across multiple configurations, the `statistics_path` option can be used. This feature allows caching of computed statistics, so they can be loaded from a specified file path rather than being recalculated with each configuration. This can significantly reduce the setup time for models that require extensive statistical computations.
Copy link
Contributor

Choose a reason for hiding this comment

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

performance is really ambiguous word. could you clarify what exactly is optimized - e.g. compression time, memory footprint..

@@ -180,6 +180,20 @@ from nncf import compress_weights, CompressWeightsMode
compressed_model = compress_weights(model, mode=CompressWeightsMode.E2M1, group_size=32, all_layers=True)
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd add a table of content for this file, since it's easy to skip this feature in the long description.

It would be great to format some big sections as a "spoiler" for better navigation:

  • Example
    long console output here
    

Copy link
Collaborator

@MaximProshin MaximProshin left a comment

Choose a reason for hiding this comment

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

LGTM

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

Successfully merging this pull request may close these issues.

3 participants