fix(lora): validate LoRA rank is positive in PEFTHelper (#48437)
Signed-off-by: ErenAta16 <erena6466@gmail.com>
This commit is contained in:
@@ -51,6 +51,8 @@ class PEFTHelper:
|
||||
return error_msg
|
||||
|
||||
def __post_init__(self):
|
||||
if self.r <= 0:
|
||||
raise ValueError(f"LoRA rank `r` must be a positive integer, got {self.r}.")
|
||||
if self.use_rslora:
|
||||
logger.info_once("Loading LoRA weights trained with rsLoRA.")
|
||||
self.vllm_lora_scaling_factor = self.lora_alpha / math.sqrt(self.r)
|
||||
|
||||
Reference in New Issue
Block a user