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
`get_peft_model` with the argument `mixed=True`.
<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.
</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.
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
adapters.
<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).
</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).
"""
_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`):
Create empty adapter weights on meta device. Useful to speed up the loading loading process.
<Tip>
Don't use `low_cpu_mem_usage=True` when creating a new PEFT adapter for training.
</Tip>
> [!TIP] > Don't use `low_cpu_mem_usage=True` when creating a new PEFT adapter for training.
**Attributes**:
- **base_model** ([`torch.nn.Module`]) -- The base transformer model used for Peft.