mirror of
https://github.com/huggingface/text-generation-inference.git
synced 2025-09-11 20:34:54 +00:00
fix: exit early if no adapter_data
This commit is contained in:
parent
0d496baaa4
commit
a2d821c4a3
@ -41,6 +41,8 @@ class LoraLinear(nn.Module):
|
||||
start_idx: int,
|
||||
end_idx: int,
|
||||
) -> torch.Tensor:
|
||||
if adapter_data is None:
|
||||
return result
|
||||
data = adapter_data.data.get(layer_type)
|
||||
data: Optional["BatchLoraWeights"] = (
|
||||
data.get("lora") if data is not None else None
|
||||
|
Loading…
Reference in New Issue
Block a user