Skip to content

Commit

Permalink
changed peft installation on parent qlinear
Browse files Browse the repository at this point in the history
Signed-off-by: 1000850000 user <[email protected]>
  • Loading branch information
achew010 committed Sep 4, 2024
1 parent b707814 commit 4666f2c
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@

# Local
from ..models.base import BaseGPTQModel
from ..nn_modules.qlinear.qlinear_tritonv2 import QuantLinear as QuantLinearTriton
from ..nn_modules.qlinear import BaseQuantLinear


class GPTQLoraConfig(LoraConfig):
Expand All @@ -61,7 +61,7 @@ def _create_new_module(
lora_config: LoraConfig,
adapter_name: str,
target: torch.nn.Module,
target_cls: torch.nn.Module = QuantLinearTriton,
target_cls: torch.nn.Module = BaseQuantLinear,
**kwargs,
):
# if the base layer module matches a supported class, dispatch the lora linear
Expand Down Expand Up @@ -97,7 +97,7 @@ def find_all_linear_names(
ignore.append(lm_head_name)
results = set()
for n, m in model.named_modules():
if isinstance(m, QuantLinearTriton):
if isinstance(m, BaseQuantLinear):
res = n.split(".")[-1]
if res not in ignore:
results.add(res)
Expand Down

0 comments on commit 4666f2c

Please sign in to comment.