Clean warning logs for gate_proj loading in Lora (#8172)
This commit is contained in:
@@ -186,10 +186,6 @@ class LoRAAdapter(nn.Module):
|
|||||||
up_name = weight_name.replace("gate_proj", "up_proj")
|
up_name = weight_name.replace("gate_proj", "up_proj")
|
||||||
gate_up_name = weight_name.replace("gate_proj", "gate_up_proj")
|
gate_up_name = weight_name.replace("gate_proj", "gate_up_proj")
|
||||||
if up_name not in weights:
|
if up_name not in weights:
|
||||||
logger.warning(
|
|
||||||
f"Gate projection {weight_name} does not have a corresponding up projection {up_name}. "
|
|
||||||
f"Initializing up projection to zero."
|
|
||||||
)
|
|
||||||
weights[up_name] = torch.zeros_like(weights[weight_name])
|
weights[up_name] = torch.zeros_like(weights[weight_name])
|
||||||
# FIXME: Add gate-only support for flashinfer in future implementations
|
# FIXME: Add gate-only support for flashinfer in future implementations
|
||||||
assert self.lora_backend.name == "triton", (
|
assert self.lora_backend.name == "triton", (
|
||||||
|
|||||||
Reference in New Issue
Block a user