Closed WeiweiZhang1 closed 2 weeks ago
fp_layers = args.fp_layers.split(",")
if bool(fp_layers):
for n, m in model.named_modules():
if isinstance(m, torch.nn.Linear) or isinstance(m, transformers.modeling_utils.Conv1D):
name = n.split('.')[-1]
if n in fp_layers or name in fp_layers:
layer_config[n] = {"bits": 16}
logger.info(
f"{n} will not be quantized.")
why coding like this , name = n.split('.')[-1]? how to exclude a exact layer
could fp layer also support fuzzy matching