Update src/pipeline.py
Browse files- 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)
|