Skip to content

Conversation

@FeiXie8
Copy link
Contributor

@FeiXie8 FeiXie8 commented Oct 17, 2025

Fix a variable name typo in the load_lora_adapter function where an incorrect temporary variable key was used instead of k when modifying state dict keys during LoRA adapter hotswapping.
The error occurred in the map_state_dict_for_hotswap helper function, specifically in the condition checking for lora_A.weight and lora_B.weight suffixes. This typo would have caused unexpected behavior when remapping keys for hotswapped adapters, as key was not defined in that scope.
This change ensures consistent use of the loop variable k to correctly modify the state dict keys, maintaining the intended logic for adapter hotswapping.

… in state dict within load_lora_adapter function
@FeiXie8
Copy link
Contributor Author

FeiXie8 commented Oct 17, 2025

plz take some time to review it
@stevhliu @sayakpaul

Copy link
Member

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

Ouch, my bad. Thanks for catching and fixing 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.

@yiyixuxu yiyixuxu merged commit decfa3c into huggingface:main Oct 21, 2025
35 of 48 checks passed
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.

5 participants