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:
githubnemo
2025-09-30 12:31:12 +02:00
committed by GitHub
parent e596112b7b
commit 4469af57a0
2 changed files with 5 additions and 17 deletions

View File

@ -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)

View File

@ -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.