fix: Fix qwen2_vl and qwen2_5_vl monkey patch#738
Conversation
Resolve part of #729 format Signed-off-by: Tcc0403 <76503978+Tcc0403@users.noreply.github.com>
ac10b92 to
a20da9e
Compare
Signed-off-by: Tcc0403 <76503978+Tcc0403@users.noreply.github.com>
Signed-off-by: Tcc0403 <76503978+Tcc0403@users.noreply.github.com>
…ence test Signed-off-by: Tcc0403 <76503978+Tcc0403@users.noreply.github.com>
11ca284 to
3deecfc
Compare
|
@shimizust @vaibhavjindal I saw you have a disscusion about transformers version in https://github.com/linkedin/Liger-Kernel/pull/743/files#r2130545912. Also, most lce_deprecated_forward was made for transformers==4.44.2 (the only old version tested in ci). Perhaps we need a complete support matrix and add it to ci and readme for users. |
|
@Tcc0403 Yeah, we are planning to update the lowest compatible transformers version to 4.49 in CI, so if you can make it compatible that would be ideal. If not, we can add a check specifically for this model that says it's only compatible with transformers >= 4.52.? The plan is to have the testing run against transformers 4.49, current release, and latest main branch (non-blocking). We have an issue open with transformers to have model layers itself be responsible for patching with liger kernels to avoid all these issues, but discussion is still ongoing. In the meantime, we should update the documentation clearly with what models/compatible transformers versions are supported. |
|
@shimizust Update: |
Signed-off-by: Tcc0403 <76503978+Tcc0403@users.noreply.github.com>
60909f1 to
55eb80c
Compare
shimizust
left a comment
There was a problem hiding this comment.
I see, that makes sense. Yeah, in this case it doesn't seem worth the effort to support earlier versions given all the changes/bugfix
## Summary <!--- This is a required section; please describe the main purpose of this proposed code change. ---> `Qwen2VLVideoProcessor` requires torchvision. Related to #738 #723 (comment) <!--- ## Details This is an optional section; is there anything specific that reviewers should be aware of? ---> ## Testing Done <!--- This is a required section; please describe how this change was tested. ---> <!-- Replace BLANK with your device type. For example, A100-80G-PCIe Complete the following tasks before sending your PR, and replace `[ ]` with `[x]` to indicate you have done them. --> - Hardware Type: <BLANK> - [ ] run `make test` to ensure correctness - [ ] run `make checkstyle` to ensure code style - [ ] run `make test-convergence` to ensure convergence
Summary
Resolve part of #729, #713
Details
For monkey patch:
Determine the class of instance and patch Liger Kernel to text model and vision model accordingly.
Add supported model type to
MODEL_TYPE_TO_APPLY_LIGER_FNdictionary to correctly call the corresponding functions.For convergence test:
video_processoris now required forQwen2_ProcessorandQwen2_5_Processor.Testing Done
transformers/monkey_patch
convergence test
bf16/test_mini_models
bf16/test_mini_models_multimodal
fp32/test_mini_models
fp32/test_mini_models_multimodal
make testto ensure correctnessmake checkstyleto ensure code stylemake test-convergenceto ensure convergence