fix: fixed syntax error in LoRA
Browse files- modeling_lora.py +1 -1
modeling_lora.py
CHANGED
@@ -259,7 +259,7 @@ class BertLoRA(BertPreTrainedModel):
|
|
259 |
partial(LoRAParametrization.select_task_for_layer, task_idx=task_idx)
|
260 |
)
|
261 |
|
262 |
-
def forward(self, *args,
|
263 |
if current_task is None or current_task >= 0:
|
264 |
self.current_task = current_task
|
265 |
return self.bert(*args, **kwargs)
|
|
|
259 |
partial(LoRAParametrization.select_task_for_layer, task_idx=task_idx)
|
260 |
)
|
261 |
|
262 |
+
def forward(self, *args, current_task: Union[None, int] = -1, **kwargs):
|
263 |
if current_task is None or current_task >= 0:
|
264 |
self.current_task = current_task
|
265 |
return self.bert(*args, **kwargs)
|