def _save_to_state_dict(self, destination, prefix, keep_vars):
        """
        save weight and bias,
        then fill state_dict with components of quant_state
        """
        if getattr(self.weight, "quant_state", None) is not None and getattr(self.weight.quant_state, "ipex", False):
            if self.weight.device.type == "cpu":
                original_weight = torch.ops.ipex_prepack.woq_linear_unpack_weight(
                    self.weight, "nf4", self.weight.quant_state.shape, 2
                )
                self.weight.data = _reverse_4bit_compress_format(original_weight.data)
            elif self.weight.device.type == "xpu":
                self.weight.data = _reverse_4bit_compress_format(self.weight.data.reshape(1, -1))

            self.weight.quant_state.ipex = False
            self.ipex_linear_is_set = False

        super()._save_to_state_dict(destination, prefix, keep_vars)  # saving weight and bias

        if getattr(self.weight, "quant_state", None) is not None:
            for k, v in self.weight.quant_state.as_dict(packed=True).items():
                destination[prefix + "weight." + k] = v if keep_vars else v.detach()

        save weight and bias,
        then fill state_dict with components of quant_state
        
bitsandbytes/nn/modules.py