def from_float_and_int4_weight(
        cls,
        mod,
        qweight,
        scales,
        zero_points,
        bias=None,
        group_size=-1,
        g_idx=None,
        weight_format=WoqWeightFormat.PLAIN_FORMAT,
    ):
        r"""Create a weight-only quantized module from a float module and int4 weight

        Args:
            mod (Module): a float module, either produced by torch.ao.quantization
                          utilities or provided by the user
            qweight (Tensor): tensor in int32 dtype and contains actually int4 data
            bias (Tensor or None): bias for linear
            scales (Tensor): scales for qweight
            zero_points (Tensor): zero points for qweight
            group_size: Group size for weight quantization
            g_idx: Indices of groups for each input channel of weight. Generated by
                GPTQ with act-order.
            weight_format: weight format, plain format or GPTQ format or AWQ format
        """
        print(
            "[WARNING] from_float_and_int4_weight() is deprecated. Please use from_float_and_qweight() instead."
        )
        return cls.from_float_and_qweight(
            mod,
            qweight,
            WoqWeightDtype.INT4,
            scales,
            zero_points,
            bias,
            group_size,
            g_idx,
            weight_format,
        )
Create a weight-only quantized module from a float module and int4 weight

        Args:
            mod (Module): a float module, either produced by torch.ao.quantization
                          utilities or provided by the user
            qweight (Tensor): tensor in int32 dtype and contains actually int4 data
            bias (Tensor or None): bias for linear
            scales (Tensor): scales for qweight
            zero_points (Tensor): zero points for qweight
            group_size: Group size for weight quantization
            g_idx: Indices of groups for each input channel of weight. Generated by
                GPTQ with act-order.
            weight_format: weight format, plain format or GPTQ format or AWQ format
        
intel_extension_for_pytorch/nn/modules/weight_only_quantization.py