def METHOD_NAME(self):
    model = Model()
    input = torch.randn(1, 30)
    conf = PostTrainingQuantConfig(
        approach="weight_only",
    )
    q_model = quantization.fit(model, conf)
    out1 = q_model(input)
    q_model.save("saved")
    model_size1 = os.path.getsize("saved/best_model.pt") / 1024
    print("FP32 Model size:{:.3f}M".format(model_size1))
    # test compress_bits = [8, 16, 32, 64]
    compression_dtype = [torch.int8, torch.int16, torch.int32, torch.int64]
    for dtype in compression_dtype:
        new_model = Model()
        inc_model = INCModel(new_model)
        inc_model.export_compressed_model(
            qweight_config_path="saved/qconfig.json",
            compression_dtype=dtype,
        )
        out2 = q_model(input)
        torch.save(inc_model.state_dict(), "saved/tmp.pt")
        model_size2 = os.path.getsize("saved/tmp.pt") / 1024
        print("WeightOnlyLinear Model size:{:.3f}M".format(model_size2))
        self.assertTrue(isinstance(inc_model.model.fc1, WeightOnlyLinear))
        self.assertTrue(inc_model.model.fc1.packed_weight.dtype == dtype)
        self.assertTrue(inc_model.model.fc1.scale.dtype == torch.float32)
        self.assertTrue(model_size1 / model_size2 > 2)
        self.assertTrue(torch.all(torch.isclose(out1, out2, atol=5e-1)))
    # test compress_bits = [8, 16, 32, 64]
    compress_dims = [0, 1]
    for dim in compress_dims:
        new_model = Model()
        inc_model = INCModel(new_model)
        inc_model.export_compressed_model(
            qweight_config_path="saved/qconfig.json",
            compression_dim=dim,
        )
        out2 = q_model(input)
        torch.save(inc_model.state_dict(), "saved/tmp.pt")
        model_size2 = os.path.getsize("saved/tmp.pt") / 1024
        print("WeightOnlyLinear Model size:{:.3f}M".format(model_size2))
        self.assertTrue(isinstance(inc_model.model.fc1, WeightOnlyLinear))
        if dim == 1:
            self.assertTrue(inc_model.model.fc1.packed_weight.shape[0] == inc_model.model.fc1.out_features)
        else:
            self.assertTrue(inc_model.model.fc1.packed_weight.shape[1] == inc_model.model.fc1.in_features)
        self.assertTrue(model_size1 / model_size2 > 2)
        self.assertTrue(torch.all(torch.isclose(out1, out2, atol=5e-1)))
    # test half dtype
    new_model = Model()
    inc_model = INCModel(new_model)
    inc_model.export_compressed_model(
        qweight_config_path="saved/qconfig.json",
        scale_dtype=torch.float16,
    )
    out2 = q_model(input)
    torch.save(inc_model.state_dict(), "saved/tmp.pt")
    model_size2 = os.path.getsize("saved/tmp.pt") / 1024
    print("WeightOnlyLinear Model size:{:.3f}M".format(model_size2))
    self.assertTrue(isinstance(inc_model.model.fc1, WeightOnlyLinear))
    self.assertTrue(inc_model.model.fc1.scale.dtype == torch.float16)
    self.assertTrue(model_size1 / model_size2 > 2)
    self.assertTrue(torch.all(torch.isclose(out1, out2, atol=5e-1)))