@@ -132,6 +132,20 @@ def feature_multiply_checker_group_size(
132132 )
133133
134134
135+ def feature_compatible_multiply_checker (
136+ in_feature , out_feature , config , in_feature_multiplier , out_feature_multiplier = None
137+ ):
138+ group_size = config ["group_size" ]
139+ if out_feature_multiplier is None :
140+ out_feature_multiplier = in_feature_multiplier
141+ compatible_flag = in_feature < group_size and (in_feature * out_feature ) % group_size == 0
142+ return (
143+ in_feature % in_feature_multiplier == 0
144+ and out_feature % out_feature_multiplier == 0
145+ and (in_feature % group_size == 0 or compatible_flag )
146+ )
147+
148+
135149def in_feature_checker_group_size (in_feature , out_feature , config ):
136150 group_size = config ["group_size" ]
137151 return in_feature % group_size == 0
@@ -148,6 +162,9 @@ def in_feature_checker_group_size(in_feature, out_feature, config):
148162exllamav2_feature_checker = functools .partial (
149163 feature_multiply_checker_group_size , in_feature_multiplier = 32 , out_feature_multiplier = 32
150164)
165+ compatible_exllamav2_feature_checker = functools .partial (
166+ feature_compatible_multiply_checker , in_feature_multiplier = 32 , out_feature_multiplier = 32
167+ )
151168
152169gptqmodel_marlin_feature_checker = functools .partial (
153170 feature_multiply_checker_group_size , in_feature_multiplier = 1 , out_feature_multiplier = 64
@@ -185,9 +202,9 @@ def fp8_static_scheme_checker(
185202 act_bits = WOQ_DEFAULT_ACT_BITS ,
186203 # 16, 384,768 accuracy issue
187204 group_size = [- 1 , 32 , 64 , 128 , 256 , 512 , 1024 , 2048 ],
188- checkers = [exllamav2_feature_checker ],
205+ checkers = [compatible_exllamav2_feature_checker ],
189206 alias = ["gptq" , "auto_gptq" , "exllamav2" , "gptq:exllamav2" , "auto_gptq:exllamav2" ],
190- requirements = ["auto-gptq>=0.7.1" ],
207+ requirements = ["torch<2.6.0" , " auto-gptq>=0.7.1" ],
191208)
192209
193210BackendInfos ["auto_gptq:tritonv2" ] = BackendInfo (
0 commit comments