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:
-
state
State
) –The current state of the model
-
kwargs
Additional keyword arguments for modifier finalization
Source code in llmcompressor/modifiers/interface.py
initialize abstractmethod
Initialize the modifier
Parameters:
-
state
State
) –The current state of the model
-
kwargs
Additional keyword arguments for modifier initialization
Source code in llmcompressor/modifiers/interface.py
update_event abstractmethod
Update the modifier based on the event
Parameters:
-
state
State
) –The current state of the model
-
event
Event
) –The event to update the modifier with
-
kwargs
Additional keyword arguments for modifier update