File tree Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Original file line number Diff line number Diff line change 38
38
Glm4MoeForCausalLMPipe ,
39
39
LlamaForCausalLMPipe ,
40
40
PretrainedConfig ,
41
- Qwen2ForCausalLMPipe ,
42
- Qwen2MoeForCausalLMPipe ,
43
- Qwen3ForCausalLMPipe ,
44
- Qwen3MoeForCausalLMPipe ,
45
41
)
46
42
from ..utils .log import logger
47
43
@@ -114,7 +110,7 @@ def get_lora_target_modules(model):
114
110
".*mlp.w2.*" ,
115
111
".*mlp.c_proj.*" ,
116
112
]
117
- elif model .config .model_type == "qwen2" or isinstance ( model , Qwen2ForCausalLMPipe ) :
113
+ elif model .config .model_type == "qwen2" :
118
114
target_modules = [
119
115
".*q_proj.*" ,
120
116
".*k_proj.*" ,
@@ -124,7 +120,7 @@ def get_lora_target_modules(model):
124
120
".*down_proj.*" ,
125
121
".*up_proj.*" ,
126
122
]
127
- elif model .config .model_type == "qwen3" or isinstance ( model , Qwen3ForCausalLMPipe ) :
123
+ elif model .config .model_type == "qwen3" :
128
124
target_modules = [
129
125
".*q_proj.*" ,
130
126
".*k_proj.*" ,
@@ -156,7 +152,7 @@ def get_lora_target_modules(model):
156
152
".*w2.*" ,
157
153
".*w3.*" ,
158
154
]
159
- elif model .config .model_type == "qwen2_moe" or isinstance ( model , Qwen2MoeForCausalLMPipe ) :
155
+ elif model .config .model_type == "qwen2_moe" :
160
156
target_modules = [
161
157
".*q_proj.*" ,
162
158
".*k_proj.*" ,
@@ -167,7 +163,7 @@ def get_lora_target_modules(model):
167
163
".*up_proj.*" ,
168
164
".*down_proj.*" ,
169
165
]
170
- elif model .config .model_type == "qwen3_moe" or isinstance ( model , Qwen3MoeForCausalLMPipe ) :
166
+ elif model .config .model_type == "qwen3_moe" :
171
167
target_modules = [
172
168
".*q_proj.*" ,
173
169
".*k_proj.*" ,
You can’t perform that action at this time.
0 commit comments