llmcompressor.modifiers.interface
Classes:
-
ModifierInterface–Defines the contract that all modifiers must implement
ModifierInterface
Bases: ABC
Defines the contract that all modifiers must implement
Methods:
-
finalize–Finalize the modifier
-
initialize–Initialize the modifier
-
update_event–Update the modifier based on the event
Attributes:
-
finalized(bool) –:return: True if the modifier has been finalized
-
initialized(bool) –:return: True if the modifier has been initialized
finalized abstractmethod property
Returns:
-
bool–True if the modifier has been finalized
initialized abstractmethod property
Returns:
-
bool–True if the modifier has been initialized
finalize abstractmethod
Finalize the modifier
Parameters:
-
(stateState) –The current state of the model
-
–kwargsAdditional keyword arguments for modifier finalization
Source code in llmcompressor/modifiers/interface.py
initialize abstractmethod
Initialize the modifier
Parameters:
-
(stateState) –The current state of the model
-
–kwargsAdditional keyword arguments for modifier initialization
Source code in llmcompressor/modifiers/interface.py
update_event abstractmethod
Update the modifier based on the event
Parameters:
-
(stateState) –The current state of the model
-
(eventEvent) –The event to update the modifier with
-
–kwargsAdditional keyword arguments for modifier update