"vscode:/vscode.git/clone" did not exist on "90f05cd63282b1b412657396fe9f610cab4ade90"
Unverified Commit 21906a6f authored by Ahmad Fahadh Ilyas's avatar Ahmad Fahadh Ilyas Committed by GitHub
Browse files

[Bugfix] Fix lora loading for Compressed Tensors in #9120 (#9179)

parent dc4aea67
...@@ -39,6 +39,9 @@ def _get_lora_device(base_layer: nn.Module) -> torch.device: ...@@ -39,6 +39,9 @@ def _get_lora_device(base_layer: nn.Module) -> torch.device:
# unquantizedLinear # unquantizedLinear
if hasattr(base_layer, "weight"): if hasattr(base_layer, "weight"):
return base_layer.weight.device return base_layer.weight.device
# Compressed Tensor
elif hasattr(base_layer, "weight_packed"):
return base_layer.weight_packed.device
# GPTQ/AWQ # GPTQ/AWQ
elif hasattr(base_layer, "qweight"): elif hasattr(base_layer, "qweight"):
return base_layer.qweight.device return base_layer.qweight.device
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment