You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Clarify set_adapters() adapter_weights documentation and type hints #15146
During the review of #15128, @BenjaminBossan suggested improving the adapter_weights docstring and type annotation in LoraBaseMixin.set_adapters(), and @sayakpaul agreed. The PR was merged before I could include these changes. On current main, the docstring still describes adapter_weights as list[float, float], but the method also accepts scalars, dictionaries, lists of weights, and None. The type annotation also uses dict without specifying the key and value types.
A small follow-up could:
Explain the supported weight formats and how the same component-weight dictionary is used for multiple adapters.
Explain per-adapter and nested component weights where supported.
Make the type annotation more specific without changing how the method works.
I already wrote and tested these changes while working on #15128. Would a small follow-up PR for these changes be appropriate?
Activity
sayakpaul commentedon Oct 30, 2026
Please open a PR. Thank you!