Fix conversion mappings for vlms#45340
Conversation
|
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. |
* fix * oupsi typo * missing dot * why did it have a mapping?... hub weights are correct already * no kw arg for replace...
|
@Cyrilvallez This PR breaks the weight conversion with PEFT. Unfortunately, this was not caught by CI because the corresponding test is gated against PEFT v0.19.0, which is not out yet. However, when commenting out these two lines: transformers/tests/peft_integration/test_peft_integration.py Lines 936 to 937 in 83c3672 and then running:
we get:
I tried understanding where that comes from based on the diff but I couldn't figure it out. Do you know what could be amiss here? |
|
Hey @Cyrilvallez :) I think that removing "mixtral" from the conversion mapping is the culprit. While mixtral is the reference implementation and 'up-to-date' this doesn't mean that old checkpoints don't need conversion. @BenjaminBossan already confirmed offline that re-introducing this to the mapping resolves the issue. |
|
Hey @BenjaminBossan @githubnemo! Are you checking the internal variable |
|
Yes, here: So we should replace that with
? |
|
@BenjaminBossan Looking at your code, I think what you wanted to do is find all models with similar mapping to mixtral? If so, you can keep checking |
|
The intent is to identify those models that require a conversion, as the PEFT config must be updated accordingly (e.g. target module
I'm not quite sure what "similar" means here. Do you mean the same |
|
@BenjaminBossan if you want to find all conversions, simply check |
* fix * oupsi typo * missing dot * why did it have a mapping?... hub weights are correct already * no kw arg for replace...
What does this PR do?
Supersedes #45314 with a better fix.
Fixes #45216 and #45310 and #45313
cc @zucchini-nlp