这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@BenjaminBossan
Copy link
Member

Explain how to use multiple adapters (e.g. 2 LoRA adapters) at the same time, as the API is not quite intuitive and there are some footguns around trainable parameters.

This question has come up multiple times in the past (for recent examples, check #2749 and #2756). Thus it's a good idea to properly document this.

Explain how to use multiple adapters (e.g. 2 LoRA adapters) at the same
time, as the API is not quite intuitive and there are some footguns
around trainable parameters.

This question has come up multiple times in the past (for recent
examples, check huggingface#2749 and huggingface#2756). Thus it's a good idea to properly
document this.
@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

Copy link
Member

@stevhliu stevhliu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for adding new docs!

Comment on lines +405 to +407
## Adapter handling

### Using multiple adapters at the same time
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
## Adapter handling
### Using multiple adapters at the same time
## Using multiple adapters at the same time

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's supposed to be a subsection of "Adapter handling", so ###.

model.base_model.set_adapter(["default", "other"])
```

<Tip>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor nit, but it may be nice to reduce the number of lines to use this instead of <Tip> ... </Tip>

> [!TIP]
> ...

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed.

BenjaminBossan and others added 2 commits September 3, 2025 11:07
Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com>
Copy link
Member Author

@BenjaminBossan BenjaminBossan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the review @stevhliu

Comment on lines +405 to +407
## Adapter handling

### Using multiple adapters at the same time
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's supposed to be a subsection of "Adapter handling", so ###.

model.base_model.set_adapter(["default", "other"])
```

<Tip>
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed.

@BenjaminBossan BenjaminBossan merged commit 7b2a5b1 into huggingface:main Sep 25, 2025
1 check passed
@BenjaminBossan BenjaminBossan deleted the doc-explain-how-to-use-multiple-adapters-at-the-same-time branch September 25, 2025 15:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants