mirror of
https://github.com/huggingface/peft.git
synced 2025-10-20 15:33:48 +08:00
DOC Some more TIP syntax migration (#2806)
Add `<Tip>`s converted to new syntax to docstrings. --------- Co-authored-by: nemo <git@ningu.net>
This commit is contained in:
@ -71,12 +71,8 @@ class PeftMixedModel(PushToHubMixin, torch.nn.Module):
|
|||||||
This class does not support loading/saving, and it shouldn't usually be initialized directly. Instead, use
|
This class does not support loading/saving, and it shouldn't usually be initialized directly. Instead, use
|
||||||
`get_peft_model` with the argument `mixed=True`.
|
`get_peft_model` with the argument `mixed=True`.
|
||||||
|
|
||||||
<Tip>
|
> [!TIP] > Read the [Mixed adapter types](https://huggingface.co/docs/peft/en/developer_guides/mixed_models) guide
|
||||||
|
to learn > more about using different adapter types.
|
||||||
Read the [Mixed adapter types](https://huggingface.co/docs/peft/en/developer_guides/mixed_models) guide to learn
|
|
||||||
more about using different adapter types.
|
|
||||||
|
|
||||||
</Tip>
|
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
|
|
||||||
@ -224,12 +220,8 @@ class PeftMixedModel(PushToHubMixin, torch.nn.Module):
|
|||||||
Create empty adapter weights on meta device. Useful to speed up the process when loading saved
|
Create empty adapter weights on meta device. Useful to speed up the process when loading saved
|
||||||
adapters.
|
adapters.
|
||||||
|
|
||||||
<Tip>
|
> [!TIP] > Don't use `low_cpu_mem_usage=True` when creating a new PEFT adapter for training (training
|
||||||
|
is untested > and discouraged for PeftMixedModel in general).
|
||||||
Don't use `low_cpu_mem_usage=True` when creating a new PEFT adapter for training (training is untested
|
|
||||||
and discouraged for PeftMixedModel in general).
|
|
||||||
|
|
||||||
</Tip>
|
|
||||||
"""
|
"""
|
||||||
_check_config_compatible(peft_config)
|
_check_config_compatible(peft_config)
|
||||||
|
|
||||||
|
@ -83,11 +83,7 @@ class PeftModel(PushToHubMixin, torch.nn.Module):
|
|||||||
low_cpu_mem_usage (`bool`, `optional`, defaults to `False`):
|
low_cpu_mem_usage (`bool`, `optional`, defaults to `False`):
|
||||||
Create empty adapter weights on meta device. Useful to speed up the loading loading process.
|
Create empty adapter weights on meta device. Useful to speed up the loading loading process.
|
||||||
|
|
||||||
<Tip>
|
> [!TIP] > Don't use `low_cpu_mem_usage=True` when creating a new PEFT adapter for training.
|
||||||
|
|
||||||
Don't use `low_cpu_mem_usage=True` when creating a new PEFT adapter for training.
|
|
||||||
|
|
||||||
</Tip>
|
|
||||||
|
|
||||||
**Attributes**:
|
**Attributes**:
|
||||||
- **base_model** ([`torch.nn.Module`]) -- The base transformer model used for Peft.
|
- **base_model** ([`torch.nn.Module`]) -- The base transformer model used for Peft.
|
||||||
|
Reference in New Issue
Block a user