llmcompressor.observers.helpers
Helper functions for observer token counting and analysis.
Provides utility functions for analyzing observer statistics and token counts across model modules. Used for monitoring compression effects and understanding model behavior during quantization and pruning operations.
Functions:
-
get_observer_token_count
–Parse the module and return the number of tokens observed by
get_observer_token_count
Parse the module and return the number of tokens observed by each module's observer.
Parameters:
-
module
Module
) –module to parse
Returns:
-
Counter
–counter with the number of tokens observed by each observer