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:
-
module(Module) –the module to create the ModuleSparsificationInfo object from
Returns:
-
'ModuleSparsificationInfo'–the ModuleSparsificationInfo object created from the module
Source code in src/llmcompressor/pytorch/utils/sparsification_info/module_sparsification_info.py
loggable_items
A generator that yields the loggable items of the ModuleSparsificationInfo object.
Parameters:
-
kwargs–additional 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