[LoRA] Relax LoRA condition (#7146)
This commit is contained in:
+3
-3
@@ -1073,10 +1073,10 @@ class LogitsProcessorWithLoRA(BaseLayerWithLoRA):
|
||||
lora_config: LoRAConfig,
|
||||
model_config: Optional[PretrainedConfig] = None,
|
||||
) -> None:
|
||||
# TODO: Verify if this condition can be relaxed
|
||||
if 32000 < self.base_layer.vocab_size > 128512:
|
||||
# TODO: Verify if this condition can be further relaxed
|
||||
if 32000 < self.base_layer.vocab_size > 257024:
|
||||
raise ValueError("When using LoRA, vocab size must be "
|
||||
"32000 >= vocab_size <= 128512")
|
||||
"32000 >= vocab_size <= 257024")
|
||||
self.lora_a_stacked = torch.zeros(
|
||||
(
|
||||
max_loras,
|
||||
|
||||
Reference in New Issue
Block a user