manbeast3b commited on
Commit
650e339
·
verified ·
1 Parent(s): 3a4ab02

Update src/pipeline.py

Browse files
Files changed (1) hide show
  1. src/pipeline.py +1 -1
src/pipeline.py CHANGED
@@ -49,7 +49,7 @@ class W8A16LinearLayer(nn.Module):
49
 
50
  def replace_linear_with_target_and_quantize(module, target_class, module_name_to_exclude):
51
  for name, child in module.named_children():
52
- if isinstance(child, nn.Linear) and not any([x == name for x in module_name_to_exclude]):
53
  old_bias = child.bias
54
  old_weight = child.weight
55
  new_module = target_class(child.in_features, child.out_features, old_bias is not None, child.weight.dtype)
 
49
 
50
  def replace_linear_with_target_and_quantize(module, target_class, module_name_to_exclude):
51
  for name, child in module.named_children():
52
+ if isinstance(child, nn.Linear) and 'linear' in name: #and not any([x == name for x in module_name_to_exclude]):
53
  old_bias = child.bias
54
  old_weight = child.weight
55
  new_module = target_class(child.in_features, child.out_features, old_bias is not None, child.weight.dtype)