Clean up remaining Punica C information (#7027)
This commit is contained in:
+1
-1
@@ -1304,7 +1304,7 @@ class LoRAConfig:
|
||||
long_lora_scaling_factors: Optional[Tuple[float]] = None
|
||||
|
||||
def __post_init__(self):
|
||||
# Keep this in sync with csrc/punica/bgmv/bgmv_config.h
|
||||
# TODO: Increase the range of rank
|
||||
possible_max_ranks = (8, 16, 32, 64)
|
||||
possible_lora_extra_vocab_size = (0, 256, 512)
|
||||
if self.max_lora_rank not in possible_max_ranks:
|
||||
|
||||
+1
-1
@@ -1073,7 +1073,7 @@ class LogitsProcessorWithLoRA(BaseLayerWithLoRA):
|
||||
lora_config: LoRAConfig,
|
||||
model_config: Optional[PretrainedConfig] = None,
|
||||
) -> None:
|
||||
# Keep this in sync with csrc/punica/bgmv/bgmv_config.h
|
||||
# TODO: Verify if this condition can be relaxed
|
||||
if 32000 < self.base_layer.vocab_size > 128512:
|
||||
raise ValueError("When using LoRA, vocab size must be "
|
||||
"32000 >= vocab_size <= 128512")
|
||||
|
||||
Reference in New Issue
Block a user