@@ -147,16 +147,16 @@ def convert_for_runtime(self) -> nn.Module:
147
147
148
148
def replace_linear_weight_only_int8_per_channel (module , node_type ):
149
149
for name , child in module .named_children ():
150
- print (f"name: { name } " )
150
+ # print(f"name: {name}")
151
151
if isinstance (child , nn .Linear ):
152
152
if (
153
153
(node_type == "*" )
154
154
or (node_type == "output" and name == "output" )
155
155
or (node_type == "!output" and name != "output" )
156
156
):
157
- print (f"{ name , child } " )
158
- print (f"in_features: { child .in_features } " )
159
- print (f"out_features: { child .out_features } " )
157
+ # print(f"{name, child}")
158
+ # print(f"in_features: {child.in_features}")
159
+ # print(f"out_features: {child.out_features}")
160
160
setattr (
161
161
module ,
162
162
name ,
@@ -276,10 +276,10 @@ def replace_embedding_weight_only_grouped_int8_per_channel(
276
276
module , bitwidth : int = 8 , group_size : Optional [int ] = None
277
277
):
278
278
for name , child in module .named_children ():
279
- print (f"name: { name } " )
279
+ # print(f"name: {name}")
280
280
if isinstance (child , nn .Embedding ):
281
- print (f"{ name , child } " )
282
- print (f"weights size: { child .weight .size ()} " )
281
+ # print(f"{name, child}")
282
+ # print(f"weights size: {child.weight.size()}")
283
283
setattr (
284
284
module ,
285
285
name ,
@@ -320,9 +320,9 @@ def create_quantized_state_dict(self) -> Dict:
320
320
or isinstance (mod , fsEmbedding )
321
321
or isinstance (mod , fsStandardEmbedding )
322
322
):
323
- print ("****" )
324
- print (f"Embedding identified: { fqn , mod } " )
325
- print (f"weights size: { mod .weight .size ()} " )
323
+ # print("****")
324
+ # print(f"Embedding identified: {fqn, mod}")
325
+ # print(f"weights size: {mod.weight.size()}")
326
326
# print(f"quantize {fqn}...")
327
327
328
328
print (
@@ -516,9 +516,9 @@ def create_quantized_state_dict(self):
516
516
assert not mod .bias
517
517
out_features = mod .out_features
518
518
in_features = mod .in_features
519
- print ("in features:" , in_features , " out features:" , out_features )
519
+ # print("in features:", in_features, " out features:", out_features)
520
520
# assert out_features % 8 == 0, "require out_features % 8 == 0"
521
- print (f"linear: { fqn } , in={ in_features } , out={ out_features } " )
521
+ # print(f"linear: {fqn}, in={in_features}, out={out_features}")
522
522
523
523
assert (
524
524
in_features % self .group_size == 0
0 commit comments