Skip to content

Commit

Permalink
add ignore
Browse files Browse the repository at this point in the history
Signed-off-by: Kyle Sayers <[email protected]>
  • Loading branch information
kylesayrs committed Feb 3, 2025
1 parent 54fd6fb commit 20c6c00
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/llmcompressor/modifiers/obcq/sgpt_mixin.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import numpy
import torch
from loguru import logger
from pydantic import field_validator, model_validator
from pydantic import Field, field_validator, model_validator

from llmcompressor.core import State
from llmcompressor.modifiers import Modifier
Expand Down Expand Up @@ -35,6 +35,7 @@ class SparsityModifierMixin(HooksMixin):
sequential_update: Optional[bool] = False # deprecated
sequential_targets: Union[str, List[str], None] = None
targets: Union[str, List[str], None] = None # alias sequential_targets
ignore: List[str] = Field(default_factory=list)

@field_validator("sequential_update", mode="before")
def validate_sequential_update(cls, value: bool) -> bool:
Expand Down Expand Up @@ -142,7 +143,7 @@ def on_initialize(self, state: "State", **kwargs) -> bool:
state.model,
state.data.calib,
self.sequential_targets,
[],
self.ignore,
self,
)
return True
Expand Down

0 comments on commit 20c6c00

Please sign in to comment.