llmcompressor.pytorch.utils.sparsification_info.module_sparsification_info
Classes:
-
ModuleSparsificationInfo–Pydantic model for storing sparsification information of a torch module.
ModuleSparsificationInfo
Bases: SparsificationInfo
Pydantic model for storing sparsification information of a torch module.
Methods:
-
from_module–Factory method to create a ModuleSparsificationInfo object from a torch module.
-
loggable_items–A generator that yields the loggable items of
from_module classmethod
Factory method to create a ModuleSparsificationInfo object from a torch module.
Parameters:
-
(moduleModule) –the module to create the ModuleSparsificationInfo object from
Returns:
-
ModuleSparsificationInfo–the ModuleSparsificationInfo object created from the module
Source code in llmcompressor/pytorch/utils/sparsification_info/module_sparsification_info.py
loggable_items
A generator that yields the loggable items of the ModuleSparsificationInfo object.
Parameters:
-
–kwargsadditional kwargs to pass to the loggable items
Returns:
-
Generator[Tuple[str, Any], None, None]–- the name of the loggable item - the value of the loggable item