[LoRA] Support variable num_labels for sequence classification (#57766)
Signed-off-by: linitra24 <renshuang.zhou@daocloud.io> Co-authored-by: Jee Jee Li <pandaleefree@gmail.com>
This commit is contained in:
@@ -676,6 +676,7 @@ class EngineArgs:
|
||||
specialize_active_lora: bool = LoRAConfig.specialize_active_lora
|
||||
enable_mixed_moe_lora_format: bool = LoRAConfig.enable_mixed_moe_lora_format
|
||||
enable_moe_shared_loras: bool = LoRAConfig.enable_moe_shared_loras
|
||||
max_lora_cls_labels: int | None = LoRAConfig.max_lora_cls_labels
|
||||
|
||||
ray_workers_use_nsight: bool = ParallelConfig.ray_workers_use_nsight
|
||||
num_gpu_blocks_override: int | None = CacheConfig.num_gpu_blocks_override
|
||||
@@ -1571,6 +1572,10 @@ class EngineArgs:
|
||||
"--enable-moe-shared-loras",
|
||||
**lora_kwargs["enable_moe_shared_loras"],
|
||||
)
|
||||
lora_group.add_argument(
|
||||
"--max-lora-cls-labels",
|
||||
**lora_kwargs["max_lora_cls_labels"],
|
||||
)
|
||||
|
||||
# Logging arguments
|
||||
logging_group = parser.add_argument_group(
|
||||
@@ -2587,6 +2592,7 @@ class EngineArgs:
|
||||
specialize_active_lora=self.specialize_active_lora,
|
||||
enable_mixed_moe_lora_format=self.enable_mixed_moe_lora_format,
|
||||
enable_moe_shared_loras=self.enable_moe_shared_loras,
|
||||
max_lora_cls_labels=self.max_lora_cls_labels,
|
||||
max_cpu_loras=self.max_cpu_loras
|
||||
if self.max_cpu_loras and self.max_cpu_loras > 0
|
||||
else None,
|
||||
|
||||
Reference in New Issue
Block a user