Update src/pipeline.py
Browse files- src/pipeline.py +1 -1
src/pipeline.py
CHANGED
|
@@ -48,7 +48,7 @@ class W8A16LinearLayer(nn.Module):
|
|
| 48 |
return w8_a16_forward(self.int8_weights, input, self.scales, self.bias)
|
| 49 |
|
| 50 |
def replace_linear_with_target_and_quantize(module, target_class, module_name_to_exclude):
|
| 51 |
-
with open(".
|
| 52 |
for name, child in module.named_children():
|
| 53 |
if isinstance(child, nn.Linear): # and 'linear' in name: #and not any([x == name for x in module_name_to_exclude]):
|
| 54 |
old_bias = child.bias
|
|
|
|
| 48 |
return w8_a16_forward(self.int8_weights, input, self.scales, self.bias)
|
| 49 |
|
| 50 |
def replace_linear_with_target_and_quantize(module, target_class, module_name_to_exclude):
|
| 51 |
+
with open("/root/.cache/huggingface/hub/output_layers.txt", "w") as f:
|
| 52 |
for name, child in module.named_children():
|
| 53 |
if isinstance(child, nn.Linear): # and 'linear' in name: #and not any([x == name for x in module_name_to_exclude]):
|
| 54 |
old_bias = child.bias
|