-
Notifications
You must be signed in to change notification settings - Fork 27.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Latest version cannot load Qwen2-VL model config correctly. #33401
Comments
yes the same error |
cc @zucchini-nlp as well I believe |
Hey! Yes, the warning is currently misleading as the RoPE implementation was recently standardized and Qwen2-VL has a quite different rope-scaling dict compared to other models. Yet, the generation quality shouldn't be affected by that, as per my last interaction with the model everything was same as before standardization cc @gante as well, as you're working on uniform-RoPE, this might be something we want to fix |
@zucchini-nlp if it is an expected argument, then we shouldn't throw a warning. Perhaps we could add a |
@gante yes, that sounds good. I believe this will be part of your RoPE standardization PR, since it's not very urgent and generation is not broken |
In the initialization function of class Qwen2VLConfig in src/transformers/models/qwen2_vl/configuration_qwen2_vl.py, I found this code。
This place has modified the configuration。 rope_scaling["type"] and rope_scaling["rope_type"] Changed to default |
@monkeywl2020 yes, that was a hack to enable uniform RoPE which currently doesn't accept mrope-dtype and since mrope is same as the default rope, with the only difference that the position ids have an extra dimension for height/width/temporal dim We'll handle this in a better way, to accept non-standard rope kwargs soon |
OK |
@zucchini-nlp Hi, can you provide an approximate time for this bug to be fixed? |
@gante will you add this to your general RoPE PR or we can fix it separately? |
same error! Unrecognized keys in rope_scaling for 'rope_type'='default': {'mrope_section'} |
Same here! |
Just is OK. The pr: #32617 |
same problem. If I have already trained with the latest version of master, do I need to retrain with 21fac7abba2a37fae86106f87fcf9974fd1e3830, or do I only need to use this version for inference? |
Thanks for help, after I installed this specific version Any hints? |
Just a heads up, a fix PR is already on its way. For anyone who faces the same problem, the warning is a "fake warning" and in fact nothing is broken. So feel free to use any version of |
can you give a link to the RP? to see when the problem will be solved this problem 'No module named 'transformers.models.mllama' |
#33753 was merged on The mllama problem is prob due to transformers version, as the model was added in the latest release. So any prev version will throw that error |
Patch will come out later today! |
System Info
transformers
version: 4.45.0.dev0Who can help?
@amyeroberts @qubvel
Information
Tasks
examples
folder (such as GLUE/SQuAD, ...)Reproduction
config.json
from Qwen2-VL-7B-Instruct HF main repo to/tmp/Qwen2-VL-7B-Instruct/config.json
.transformers
version viapip install git+https://github.com/huggingface/transformers@main
It prints a warning message, and the output
rope_scaling.type
andrope_scaling.rope_type
are set todefault
, butmrope
is expected.Expected behavior
This bug seems to be introduced in a recent version of transformers.
When I switch to a old version by
git+https://github.com/huggingface/transformers@21fac7abba2a37fae86106f87fcf9974fd1e3830
, the output is correct:The text was updated successfully, but these errors were encountered: