mirror of
https://github.com/wassname/peft.git
synced 2026-09-09 11:28:32 +08:00
fix kwargs
This commit is contained in:
@@ -92,7 +92,7 @@ class PeftModel(PushToHubMixin, torch.nn.Module):
|
||||
save_directory (`str`):
|
||||
Directory where the adapter model and configuration files will be saved (will be created if it does not
|
||||
exist).
|
||||
**kwargs:
|
||||
kwargs (additional keyword arguments, *optional*):
|
||||
Additional keyword arguments passed along to the `push_to_hub` method.
|
||||
"""
|
||||
if os.path.isfile(save_directory):
|
||||
|
||||
@@ -65,7 +65,7 @@ class PeftConfigMixin(PushToHubMixin):
|
||||
Args:
|
||||
save_directory (`str`):
|
||||
The directory where the configuration will be saved.
|
||||
kwargs:
|
||||
kwargs (additional keyword arguments, *optional*):
|
||||
Additional keyword arguments passed along to the [`~transformers.utils.PushToHubMixin.push_to_hub`]
|
||||
method.
|
||||
"""
|
||||
@@ -89,7 +89,7 @@ class PeftConfigMixin(PushToHubMixin):
|
||||
Args:
|
||||
pretrained_model_name_or_path (`str`):
|
||||
The directory or the Hub repository id where the configuration is saved.
|
||||
kwargs:
|
||||
kwargs (additional keyword arguments, *optional*):
|
||||
Additional keyword arguments passed along to the child class initialization.
|
||||
"""
|
||||
if os.path.isfile(os.path.join(pretrained_model_name_or_path, CONFIG_NAME)):
|
||||
@@ -145,8 +145,8 @@ class PeftConfig(PeftConfigMixin):
|
||||
@dataclass
|
||||
class PromptLearningConfig(PeftConfig):
|
||||
"""
|
||||
This is the base configuration class to store the configuration of a Union[[`~peft.PrefixTuning`],
|
||||
[`~peft.PromptEncoder`], [`~peft.PromptTuning`]].
|
||||
This is the base configuration class to store the configuration of [`PrefixTuning`], [`PromptEncoder`], or
|
||||
[`PromptTuning`].
|
||||
|
||||
Args:
|
||||
num_virtual_tokens (`int`): The number of virtual tokens to use.
|
||||
|
||||
Reference in New Issue
Block a user