mirror of
https://git.datalinker.icu/vllm-project/vllm.git
synced 2025-12-13 13:25:30 +08:00
[Bugfix] Fix _get_lora_device for HQQ marlin (#12090)
Signed-off-by: Varun Sundar Rabindranath <varun@neuralmagic.com> Co-authored-by: Varun Sundar Rabindranath <varun@neuralmagic.com>
This commit is contained in:
parent
70755e819e
commit
ebd8c669ef
@ -51,6 +51,9 @@ def _get_lora_device(base_layer: nn.Module) -> torch.device:
|
|||||||
# marlin
|
# marlin
|
||||||
elif hasattr(base_layer, "B"):
|
elif hasattr(base_layer, "B"):
|
||||||
return base_layer.B.device
|
return base_layer.B.device
|
||||||
|
# HQQ marlin
|
||||||
|
elif hasattr(base_layer, "W_q"):
|
||||||
|
return base_layer.W_q.device
|
||||||
else:
|
else:
|
||||||
raise ValueError(f"Unsupported base layer: {base_layer}")
|
raise ValueError(f"Unsupported base layer: {base_layer}")
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user