def log_quantizable_layers_per_transformer(
    transformer_blocks, layers=(nn.Conv2d, nn.Conv1d, nn.Linear, transformers.Conv1D)
):
    """Print all layers which will be quantized in GPTQ algorithm."""
    logger.info("* * Layer to be quantized * *")

    for block_id in range(len(transformer_blocks["transformers"])):
        transformer_block = transformer_blocks["transformers"][block_id]
        layers_for_this_tblock = find_layers_name(transformer_block)
        layer_names = [
            (
                transformer_blocks["transformers_name"]
                + "."
                + str(block_id)
                + "."
                + layer_name
            )
            for layer_name in layers_for_this_tblock
        ]
        for name in layer_names:
            logger.info(name)
Print all layers which will be quantized in GPTQ algorithm.
intel_extension_for_pytorch/quantization/_GPTQ/gptq/model_utils.py