Commit 0438fa8
authored
Add patches for
## Summary
Add support for Qwen3.5 multimodal patches as follow-up for #1123.
Implement extra `lce_forward` for `Qwen3_5ForConditionalGeneration` and
add corresponding tests.
### Details
Modified files:
- `model/qwen3_5.py`: add `lce_forward_for_multimodal` for
`Qwen3_5ForConditionalGeneration`.
- `model/output_classes.py`: add `LigerQwen3_5CausalLMOutputWithPast` as
the return type for qwen3_5.
- `test/utils.py`: `revert_liger_kernel_to_qwen3_5` to support
`conditional_generation` for qwen3_5.
- `test_monkey_patch.py`: add
`test_apply_liger_kernel_to_instance_for_qwen3_5_for_conditional_generation`.
- `bf16/test_mini_models_multimodal.py`: add
`MINI_MODEL_SETUPS["mini_qwen3_5"]` to convergence test.
- `fp32/test_mini_models_multimodal.py`: skipped
## Testing Done
- Hardware Type: NVIDIA A100
- [x] run `make test` to ensure correctness
- [x] run `make checkstyle` to ensure code style
- [x] run `make test-convergence` to ensure convergenceQwen3_5ForConditionalGeneration to support multimodal. (#1150)1 parent 781083b commit 0438fa8
File tree
7 files changed
+486
-16
lines changed- src/liger_kernel/transformers
- model
- test
- convergence
- bf16
- fp32
- transformers
7 files changed
+486
-16
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
76 | 83 | | |
77 | 84 | | |
78 | 85 | | |
| |||
156 | 163 | | |
157 | 164 | | |
158 | 165 | | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| |||
119 | 120 | | |
120 | 121 | | |
121 | 122 | | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2711 | 2711 | | |
2712 | 2712 | | |
2713 | 2713 | | |
| 2714 | + | |
| 2715 | + | |
| 2716 | + | |
| 2717 | + | |
| 2718 | + | |
2714 | 2719 | | |
| 2720 | + | |
| 2721 | + | |
| 2722 | + | |
2715 | 2723 | | |
2716 | 2724 | | |
2717 | 2725 | | |
2718 | 2726 | | |
2719 | 2727 | | |
| 2728 | + | |
2720 | 2729 | | |
2721 | 2730 | | |
| 2731 | + | |
2722 | 2732 | | |
2723 | 2733 | | |
2724 | 2734 | | |
| 2735 | + | |
| 2736 | + | |
2725 | 2737 | | |
| 2738 | + | |
2726 | 2739 | | |
2727 | 2740 | | |
2728 | 2741 | | |
2729 | 2742 | | |
| 2743 | + | |
| 2744 | + | |
2730 | 2745 | | |
2731 | 2746 | | |
2732 | | - | |
| 2747 | + | |
2733 | 2748 | | |
2734 | 2749 | | |
2735 | 2750 | | |
| 2751 | + | |
| 2752 | + | |
| 2753 | + | |
2736 | 2754 | | |
2737 | 2755 | | |
2738 | 2756 | | |
2739 | 2757 | | |
2740 | 2758 | | |
2741 | | - | |
| 2759 | + | |
| 2760 | + | |
| 2761 | + | |
2742 | 2762 | | |
2743 | | - | |
2744 | | - | |
2745 | | - | |
| 2763 | + | |
2746 | 2764 | | |
2747 | 2765 | | |
2748 | 2766 | | |
2749 | 2767 | | |
2750 | 2768 | | |
2751 | 2769 | | |
2752 | | - | |
| 2770 | + | |
2753 | 2771 | | |
2754 | | - | |
| 2772 | + | |
2755 | 2773 | | |
2756 | 2774 | | |
2757 | 2775 | | |
| |||
0 commit comments