modify style
This commit is contained in:
parent
fc0fa9f048
commit
235b411370
|
@ -1,4 +1,4 @@
|
|||
from typing import TYPE_CHECKING, Union
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
import torch
|
||||
from peft import LoraConfig, LoraModel, PeftModel, TaskType, get_peft_model
|
||||
|
@ -21,11 +21,11 @@ logger = get_logger(__name__)
|
|||
|
||||
def init_adapter(
|
||||
config: "PretrainedConfig",
|
||||
model: Union["PreTrainedModel"],
|
||||
model: "PreTrainedModel",
|
||||
model_args: "ModelArguments",
|
||||
finetuning_args: "FinetuningArguments",
|
||||
is_trainable: bool,
|
||||
) -> Union["PreTrainedModel"]:
|
||||
) -> "PreTrainedModel":
|
||||
r"""
|
||||
Initializes the adapters.
|
||||
|
||||
|
|
|
@ -112,7 +112,7 @@ def load_model(
|
|||
finetuning_args: "FinetuningArguments",
|
||||
is_trainable: bool = False,
|
||||
add_valuehead: bool = False,
|
||||
) -> Union["PreTrainedModel"]:
|
||||
) -> "PreTrainedModel":
|
||||
r"""
|
||||
Loads pretrained model.
|
||||
"""
|
||||
|
|
Loading…
Reference in New Issue