File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -741,8 +741,7 @@ def _create_quantized_state_dict(
741
741
) -> Dict [str , torch .Tensor ]:
742
742
cur_state_dict = model .state_dict ()
743
743
for fqn , mod in model .named_modules ():
744
- if isinstance (mod , torch .nn .Linear ):
745
- assert not mod .bias
744
+ if isinstance (mod , torch .nn .Linear ) and mod .bias is None :
746
745
out_features = mod .out_features
747
746
in_features = mod .in_features
748
747
# assert out_features % 8 == 0, "require out_features % 8 == 0"
@@ -1131,8 +1130,7 @@ def _create_quantized_state_dict(
1131
1130
) -> Dict [str , torch .Tensor ]:
1132
1131
cur_state_dict = model .state_dict ()
1133
1132
for fqn , mod in model .named_modules ():
1134
- if isinstance (mod , torch .nn .Linear ):
1135
- assert not mod .bias
1133
+ if isinstance (mod , torch .nn .Linear ) and mod .bias is None :
1136
1134
out_features = mod .out_features
1137
1135
in_features = mod .in_features
1138
1136
# assert out_features % 8 == 0, "require out_features % 8 == 0"
You can’t perform that action at this time.
0 commit comments