Repository navigation
FIX Issues with transformer weight conversion code - #3127
Merged
BenjaminBossan merged 1 commit intoApr 2, 2026
Merged
BenjaminBossan merged 1 commit into
BenjaminBossan merged 1 commit into
Conversation
As notified here: - huggingface/trl#5428 - huggingface/trl#5429 Two issues: First we assumed that if get_checkpoint_conversion_mapping returns something, we always have an entry in _MOE_TARGET_MODULE_MAPPING. This assumption is no longer being made. Second, during handling of an error message, we would subtract a set from a list. This was missed because the type of the first argument used to be a set but was changed to list. Now we correctly subtract sets. Note that the trl will still fail because the LoRA config is configured to only target the up_proj, not the gate_proj. This no longer works as transformers fuses these two. The aforementioned error message was caused by this inconsistency.
Member
Author
|
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. |
1 of 8 tasks
Member
Author
|
Note: failing tests are unrelated. |
albertvillanova
approved these changes
Apr 1, 2026
This was referenced Apr 1, 2026
githubnemo
approved these changes
Apr 2, 2026
BenjaminBossan
deleted the
fix-issues-transformers-weight-conversion-qwen
branch
April 2, 2026 11:21
Merged
3 of 6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
As notified here:
Two issues:
First we assumed that if
get_checkpoint_conversion_mappingreturns something, we always have an entry in_MOE_TARGET_MODULE_MAPPING. This assumption is no longer being made.Second, during handling of an error message, we would subtract a set from a list. This was missed because the type of the first argument used to be a set but was changed to list. Now we correctly subtract sets.
Note that the trl will still fail because the LoRA config is configured to only target the
up_proj, not thegate_proj. This no longer works as transformers fuses these two. The aforementioned error message was caused by this inconsistency.