def METHOD_NAME(self,
                blocksize=128,
                percdamp=.01,
                groupsize=-1,
                actorder=True):
    print('quant', self.layer.full_name())
    W = self.layer.weight.t().cast('float32')
    weight_scale = compute_scales(W.t(), method=self.weight_quant_method)
    weight_scale /= self.quant_bits
    tick = time.time()
    H = self.hessian
    del self.hessian
    dead = paddle.where(paddle.diag(H) == 0)
    H[dead, dead] = 1
    W[:, dead] = 0
    del dead
    if actorder:
        perm = paddle.argsort(paddle.diag(H), descending=True)
        W = W.transpose((1, 0))
        W = W[perm].transpose((1, 0))
        H = H[perm].transpose((1, 0))
        H = H[perm].transpose((1, 0))
    Losses = paddle.zeros_like(W)
    Q = paddle.zeros_like(W)
    damp = percdamp * paddle.mean(paddle.diag(H))
    diag = paddle.arange(self.columns)
    H[diag, diag] += damp
    H = paddle.inverse(H)
    H = paddle.linalg.cholesky(H, upper=True)
    Hinv = H
    for i1 in range(0, self.columns, blocksize):
        i2 = min(i1 + blocksize, self.columns)
        count = i2 - i1
        W1 = W[:, i1:i2]
        Q1 = paddle.zeros_like(W1)
        Err1 = paddle.zeros_like(W1)
        Losses1 = paddle.zeros_like(W1)
        Hinv1 = Hinv[i1:i2, i1:i2]
        for i in range(count):
            w = W1[:, i]
            d = Hinv1[i, i]
            if groupsize != -1:
                if (i1 + i) % groupsize == 0:
                    weight_scale = compute_scales(
                        W[:, (i1 + i):(i1 + i + groupsize)].t(),
                        method=self.weight_quant_method)
                    weight_scale /= self.quant_bits
            q = paddle.clip(
                paddle.round(w / weight_scale), -self.quant_bits - 1,
                self.quant_bits)
            q = q * weight_scale
            Q1[:, i] = q
            Losses1[:, i] = (w - q)**2 / d**2
            err1 = (w - q) / d
            W1[:, i:] -= err1.unsqueeze(1).matmul(Hinv1[i, i:].unsqueeze(0))
            Err1[:, i] = err1
            del w, d, q, err1
            paddle.device.cuda.empty_cache()
        Q[:, i1:i2] = Q1
        Losses[:, i1:i2] = Losses1 / 2
        del Q1, Losses1
        if Hinv[i1:i2, i2:].shape[1] != 0:
            W[:, i2:] -= Err1.matmul(Hinv[i1:i2, i2:])
        del Err1, W1, Hinv1
        paddle.device.cuda.empty_cache()
    print('time %.2f' % (time.time() - tick))
    print('error', paddle.sum(Losses).item())
    if actorder:
        invperm = paddle.argsort(perm)
        Q = Q.transpose((1, 0))
        Q = Q[invperm].transpose((1, 0))
        del invperm, perm
    param = self.layer.weight
    Q = Q.t().cast(self.layer.weight.dtype)
    paddle.assign(Q, output=param)
    self.quantized = True
    del H, Q, Hinv, W, Losses
    paddle.device.cuda.empty_cache()