Skip to content

Commit

Permalink
[Bugfix] Fix _get_lora_device for HQQ marlin (vllm-project#12090)
Browse files Browse the repository at this point in the history
Signed-off-by: Varun Sundar Rabindranath <[email protected]>
Co-authored-by: Varun Sundar Rabindranath <[email protected]>
  • Loading branch information
varun-sundar-rabindranath and Varun Sundar Rabindranath authored Jan 15, 2025
1 parent 70755e8 commit ebd8c66
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions vllm/lora/layers.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ def _get_lora_device(base_layer: nn.Module) -> torch.device:
# marlin
elif hasattr(base_layer, "B"):
return base_layer.B.device
# HQQ marlin
elif hasattr(base_layer, "W_q"):
return base_layer.W_q.device
else:
raise ValueError(f"Unsupported base layer: {base_layer}")

Expand Down

0 comments on commit ebd8c66

Please sign in to comment.