OJBKQ : O bjective- J oint B abai-Klein Q uantization Xinyu Wang, Ziyu Zhao, Peng Lu, Xiao-Wen Chang Abstract Post-training quantization (PTQ) is widely used to compress large language models without retraining. However, many existing weight-only methods rely on heuristic objectives and greedy rounding, thus leading to noticeable degradation under low-bit quantization In this work, we introduce OJBKQ (Objective-Joint Babai-Klein Quantization with K-Best Sampling), a layer-wise PTQ method that formulates weight quantization as a joint optimization problem over activations and weights. This formulation results in a multiple-right-hand-side box-constrained integer least squares (BILS) problem in each layer, which is NP-hard. For each column of the weight matrix, we apply an extended Babai nearest-plane algorithm and an extended version of Klein’s randomized Babai algorithm to find the minimum-residual Babai–Klein point, a sub-optimal solution to the BILS problem. Experimental results on large language models show that OJBKQ achieves lower perplexity at 3–4 bits compared to existing PTQ approaches, while maintaining comparable computational cost. 1 Introduction Large Language Models (LLMs) ( 1 ; 35 ; 18 ) pose substantial deployment challenges due to their massive memory footprint and inference costs ( 15 ) . Layer-wise post-training quantization (PTQ) ( 19 ; 24 ; 13 ) has become a widely adopted compression standard, enabling efficient deployment by sequentially quantizing parameters without retraining. In this work, we focus on standard and practically relevant 4-bit and 3-bit settings (e.g., group size 128) and study how to further improve quantization quality beyond strong PTQ baselines. Despite its empirical success, layer-wise PTQ is intrinsically a discrete optimization problem. At its core, each layer-wise step solves an integer-constrained quadratic subproblem, typically approached with sequential rounding-type solvers. Recent theoretical analyses ( 14 ) reveal that standard solvers (e.g., GPTQ) admit a lattice-decoding interpretation: they are closely related to Babai’s nearest-plane algorithm ( 6 ) , which finds the Babai point, a suboptimal solution to the Closest Vector Problem (CVP) ( 3 ) , which is also referred to as the Integer Least-Squares (ILS) problem. However, when the lattice basis matrix is not well-conditioned or when the dimension is large, the Babai point residual may be much larger than the optimal residual. Thus, we need to find a better sub-optimal solution. Second, minimizing a layer-local proxy loss does not necessarily translate to better end-to-end quantization due to error propagation and input distribution drift; consequently, the selection objective used to compare and choose among candidates is as crucial as the solver itself, yet remains inconsistent across methods. We propose OJBKQ (Objective-Joint Babai-Klein Quantization), a unified framework that addresses both issues. (i) Joint Target Alignment (JTA): To better align layer-wise decisions with end-to-end behavior under error propagation, we introduce a unified candidate scoring objective (Eq. 7 ) with a single continuous knob. JTA interpolates between two fundamental alignment targets: matching the runtime quantized activations induced by the partially-quantized network, and matching the corresponding full-precision reference outputs ( 4 ) . The formulated quantization problems at each layer are multiple-right-hand-side box-constrained integer least squares (BILS) problems. (ii) Random- K quantization: For each column of the weight matrix in a BILS problem, we apply the box-constrained Babai algorithm to obtain one sub-optimal solution (a low-bit vector candidate). For the same column, we then extend Klein’s K-time randomized Babai algorithm ( 23 ) to the box-constrained case to generate K additional sub-optimal solutions independently. Among these K+1 candidates, we select the one which has the minimum residual, referred to as the best Babai-Klein point. There are two levels of parallelization. One across the columns of the weight matrix and the other across the K points produced by the box-constrained Klein algorithm. Both can be implemented efficiently. In OJBKQ , Random- K expands the quality of the candidate set , while JTA improves how we select the optimal candidate. Our contributions are summarized as follows: • Quantization Formulation. We revisit layer-wise PTQ from a CVP perspective and reformulate it as an explicit lattice-decoding problem. This enables a faithful Babai-style implementation that operates via triangular factors and back-substitution, without materializing any matrix inverse. • Superior Sub-optimal Solution. We extend Klein’s randomized algorithm to the box-constrained case and apply it to PTQ. By running K independent probabilistic traces in parallel, our method explores non-orthogonal lattice bases to find superior integer candidates while maintaining strong language modeling performance with low perplexity in both 4‑bit and 3‑bit configurations. In designing and implementation of our numerical algorithm, we take both accuracy and efficiency into account. For example, unlike GPTQ, no inverse of a matrix is computed. To reduce the computational overhead of multiple indepandent solution, we design a GPU-efficient algorithm presented in Appendix A • JTA Candidate Selection. We propose the Joint Target Alignment (JTA) objective, a unified scoring criterion that subsumes commonly used PTQ objectives as special cases by varying the alignment target between runtime-quantized and full-precision references, providing a more fine-grained criterion for candidate selection under error propagation. 2 Related Work Layer-wise post-training quantization (PTQ). Post-training quantization is a practical standard for compressing large language models without retraining. Following recent PTQ taxonomies ( 42 ) , mainstream weight-only PTQ methods can be broadly grouped by their dominant mechanism. Compensation-based approaches, exemplified by GPTQ ( 19 ) , quantize weights sequentially while updating the remaining unquantized weights to compensate for accumulated quantization errors, often leveraging second-order curvature surrogates estimated from calibration data. Rotation-based methods such as QuIP ( 13 ) apply structured transformations to reshape weight distributions and improve quantizability under low-bit constraints. Salience-based methods, represented by AWQ ( 24 ) , reduce quantization error by selecting scaling factors according to activation/weight importance, avoiding mixed-precision deployment. In addition, optimization-based approaches (e.g., OmniQuant 1 1 1 Although it is classified as PTQ in the survey, it still requires training on the calibration dataset to find scales.Then we exclude it from our baselines and PoTPTQ) ( 33 ; 38 ) directly optimize quantization parameters with lightweight objectives while keeping pretrained weights frozen. Overall, existing PTQ pipelines mainly differ along two orthogonal axes: (i) the approximate solver used to handle the discrete subproblem, and (ii) the objective used to evaluate candidates and guide selection. Integer least squares and Babai-type solution. The integer least squares (ILS) problems or/and its box-constrained variant (BILS) arise in crypotograph ( 26 ) , GPS ( 34 ; 10 ; 12 ) , MIMO detection ( 2 ; 7 ) etc, where the goal is to recover a discrete-valued vector under a quadratic objective. Since the ILS and BILS are NP-hard ( 27 ; 36 ) , in some application often efficient sub-optimal solutions are applied. An often used method is Babai’s nearest-plane algorithm ( 6 ) , which computes the Babai point by back substitution on an upper-triangular linear system, where rounding is performed at each step. The Babai point is the first integer point found by the Schnorr–Euchner sphere-decoding algorithm, which enumerates integer points in an ellipsoid to find the optimal solution ( 32 ) . It has been extended to the box-constrained case ( 39 ) . While computationally efficient, when the coefficient matrix (referred to as the lattice basis matrix in lattice theory) is not well-conditioned (or not well-reduced in lattice theory), or when the dimension of the integer vector is large. There are other sub-optimal algorithms, such as those proposed in ( 8 ; 11 ) , but they are not suitable for GPU computing. Fortunately, there is a randomized version of the Babai algorithm proposed in ( 23 ) , which is not widely used yet. In each step of the Babai algorithm, Klein’s algorithm rounds the real solution to a nearby integer according to a predefinded distribution. When the algorithm is called K times, it generates K points. Then the best one, which gives the minimum residual, is chosen as the final sub-optimal solution. This method can be parallelized. The method is for unconstrained ILS problem and has not been widely used yet. Recently, the connection between sequential PTQ solvers and the Babai point has gained attention ( 14 ) . This paper emphasizes that the PTQ problems can be modeled as BILS problems so that sub-optimal BILS algorithms can be applied. Objectives under error propagation and distribution drift. A recurring challenge in layer-wise PTQ is that minimizing a layer-local reconstruction proxy does not necessarily translate to improved end-to-end quality, due to quantization error propagation and the resulting input distribution drift across layers. Consequently, the choice of the alignment target —whether to match outputs under runtime (partially-quantized) activations or to match full-precision reference outputs—plays a central role in practical PTQ performance. Recent work revisits this issue from an error-propagation viewpoint and advocates objectives that better reflect downstream behavior under partial quantization ( 4 ) . Our JTA objective follows this perspective but provides a unified scoring criterion with a single continuous knob that interpolates between runtime-quantized activations and full-precision reference targets, enabling consistent candidate selection across layers. 3 Methodology 3.1 Layer-wise Objectives and Joint Target Alignment (JTA) We now start analyze commonly used layer-wise PTQ objectives. Consider a linear layer with full-precision weight matrix \mathbf{W}\in\mathbb{R}^{m\times n} . Let \mathbf{X}\in\mathbb{R}^{p\times m} be full-precision calibration activations, \widetilde{\mathbf{X}}\in\mathbb{R}^{p\times m} be the corresponding runtime activations produced by a partially quantized network (i.e., upstream layers already quantized), \mathbf{Y}^{\mathrm{fp}}:=\mathbf{XW} denote the full-precision reference output, and \mathbf{Y}^{\mathrm{rt}}:=\widetilde{\mathbf{X}}\mathbf{W} denote the runtime-consistent reference output under partially quantized activations. At runtime, a candidate \widehat{\mathbf{W}} produces the output \widehat{\mathbf{Y}}:=\widetilde{\mathbf{X}}\widehat{\mathbf{W}} . Many existing objectives can be interpreted as choosing different alignment targets: (Runtime-consistent) \displaystyle\min_{\widehat{\mathbf{W}}}\;\;\|\widetilde{\mathbf{X}}\widehat{\mathbf{W}}-\widetilde{\mathbf{X}}\mathbf{W}\|_{F}^{2} (1) \displaystyle\qquad=\|\widehat{\mathbf{Y}}-\mathbf{Y}^{\mathrm{rt}}\|_{F}^{2}, (2) (Full-precision mapping) \displaystyle\min_{\widehat{\mathbf{W}}}\;\;\|\mathbf{X}\widehat{\mathbf{W}}-\mathbf{X}\mathbf{W}\|_{F}^{2}, (3) (Mismatch target) \displaystyle\min_{\widehat{\mathbf{W}}}\;\;\|\widetilde{\mathbf{X}}\widehat{\mathbf{W}}-\mathbf{X}\mathbf{W}\|_{F}^{2} (4) \displaystyle\qquad=\|\widehat{\mathbf{Y}}-\mathbf{Y}^{\mathrm{fp}}\|_{F}^{2}. (5) Eq. ( 1 ) directly reflects runtime behavior but aligns to a target computed on quantized activations, which may be noisy; this objective is adopted by GPTQ and QUIP. Eq. ( 3 ) admits a convenient least-squares structure (prior to discretization) but suffers from train–run mismatch when earlier layers are quantized, and is optimized by AWQ. Eq. ( 4 ) partially alleviates this mismatch by evaluating candidates on runtime activations while preserving the full-precision reference; QEP employs this objective as a corrective patch within a layer-wise quantization pipeline, although it may over-penalize candidates when error drift accumulates across layers. These trade-offs motivate a unified selection objective that interpolates between runtime-consistent and full-precision references, while optionally controlling weight drift. We propose an expressive Joint Target Alignment (JTA) objective with a single continuous knob to score and select candidates generated by Random- K decoding. We define an interpolated target \small\mathbf{Y}^{\star}(\mu):=(1-\mu)\,\mathbf{X}\mathbf{W}+\mu\,\widetilde{\mathbf{X}}\mathbf{W},\hskip 18.49988pt\mu\in[0,1], (6) and formulate the ILS problem: \min\mathcal{S}(\widehat{\mathbf{W}})\;:=\;\|\widetilde{\mathbf{X}}\widehat{\mathbf{W}}-\mathbf{Y}^{\star}(\mu)\|_{F}^{2}\;+\;\lambda^{2}\|\widehat{\mathbf{W}}-\mathbf{W}\|_{F}^{2}, (7) where \widehat{\mathbf{W}} is subject to some constraint. Later we will show this is a multiple-right-hand-side box-constrained integer least squares (BILS) problem and provide a sub-optimal solution. The knob \mu interpolates between matching full-precision and runtime-consistent references, while \lambda optionally regularizes weight displacement. In our framework, Random- K quantization (Sec. 3.4 ) rewrites find a sub-optimal solution to , and JTA (Eq. ( 7 )) provides a consistent curvature-aware criterion for selecting the best candidate under error propagation. When \mu{=}1 and \lambda{=}0 , Eq. ( 7 ) reduces to the runtime-consistent objective in Eq. ( 1 ); when \mu{=}0 and \lambda{=}0 , it aligns to the full-precision reference in Eq. ( 4 ). End-to-end layer-wise procedure. For each layer, we (i) form \widetilde{\mathbf{X}} by a partially quantized forward pass, (ii) find a sub-optimal optimal solution to Eq. ( 7 ), to be seen in the next sections. This closes the loop between discrete candidate generation and objective-aligned selection. 3.2 From Layer-wise Quantization to Integer Least Squares From ( 7 ) we obtain \mathcal{S}(\widehat{\mathbf{W}})\;:=\;\left\|\begin{bmatrix}\widetilde{\mathbf{X}}\\ \lambda\mathbf{I}\end{bmatrix}\widehat{\mathbf{W}}-\begin{bmatrix}\mathbf{Y}^{\star}(\mu)\\ \lambda\mathbf{W}\end{bmatrix}\right\|_{F}^{2}. (8) The task of finding an optimal quantized weight \widehat{\mathbf{W}} to minimize the selection objective in Sec. 3.1 can be formally mapped to the classical Integer Least Squares (ILS) problem. Figure 1: Layer-wise comparison of the original output norms and JTA reconstruction errors across Layers 1, 15, and 30.We present results for all linear modules under varying K settings. To facilitate the derivation, we first introduce additional notation. Let \mathbb{B}=\{0,1,\ldots,2^{\text{wbit}}-1\} denote the box constraint corresponding to the set of admissible integer values for a wbit -bit quantized weight. Let \mathbf{Q}=[\mathbf{q}_{1},\mathbf{q}_{2},\ldots,\mathbf{q}_{n}]\in\mathbb{B}^{m\times n} denote the quantized version of the full-precision weight matrix \mathbf{W} . We further define \mathbf{S}=[\mathbf{s}_{1},\mathbf{s}_{2},\ldots,\mathbf{s}_{n}]\in\mathbb{R}^{m\times n},\quad\mathbf{Z}=[\mathbf{z}_{1},\mathbf{z}_{2},\ldots,\mathbf{z}_{n}]\in\mathbb{R}^{m\times n} as the scale matrix and zero-point matrix, respectively. Both \mathbf{S} and \mathbf{Z} are pre-computed using standard statistical calibration methods (e.g., the Absmax method). Finally, the dequantized weight matrix is given by \widehat{\mathbf{W}}=\mathbf{S}\odot(\mathbf{Q}-\mathbf{Z}), where \odot denotes element-wise multiplication. The matrices \mathbf{Q} , \mathbf{S} , \mathbf{Z} , and \widehat{\mathbf{W}} are all partitioned column-wise in the same manner as \mathbf{W} . We further define \mathbf{A}:=\begin{bmatrix}\widetilde{\mathbf{X}}\\ \lambda\mathbf{I}\end{bmatrix},\qquad\mathbf{T}:=\begin{bmatrix}\mathbf{Y}^{\star}(\mu)\\ \lambda\mathbf{W}\end{bmatrix}. Using the above notation, Eq. ( 8 ) can be rewritten as \sum_{j=1}^{n}\left\|\mathbf{A}\mathbf{D}_{j}\mathbf{q}_{j}-\mathbf{b}_{j}\right\|_{2}^{2}, where \mathbf{D}_{j}=\operatorname{diag}(\mathbf{s}_{j})\in\mathbb{R}^{m\times m} is a diagonal scaling matrix, and \mathbf{b}_{j}=\mathbf{t}_{j}+\mathbf{A}\mathbf{D}_{j}\mathbf{z}_{j} with \mathbf{t}_{j} denoting the j -th column of \mathbf{T} . As a result, Eq. ( 8 ) decomposes into n independent box-constrained integer least squares (BILS) problems: \min_{\mathbf{q}_{j}\in\mathbb{B}^{m}}\left\|\mathbf{A}\mathbf{D}_{j}\mathbf{q}_{j}-\mathbf{b}_{j}\right\|_{2}^{2},\qquad j=1,\ldots,n. (9) Since each subproblem is independent, we simplify notation by focusing on a single per-column subproblem: \min_{\mathbf{q}\in\mathbb{B}^{m}}\left\|\mathbf{A}\mathbf{D}\mathbf{q}-\mathbf{b}\right\|_{2}^{2}. (10) Solving Eq. ( 10 ) exactly is NP-hard for general lattices ( 27 ) . A classical and efficient approximation is given by the Babai point ( 6 ) , which performs successive orthogonal projections followed by greedy rounding along a triangular factorization of \mathbf{A} . It matches the recent analyses ( 14 ) which suggest that layer-wise solvers such as GPTQ can be interpreted as greedy lattice decoding methods under alternative objective formulations. While the objectives may differ, the underlying principle—approximating a structured lattice decoding problem—remains the same. 3.3 Babai-Based Quantization Define \bar{\mathbf{A}}:=\mathbf{A}\mathbf{D} . Then Eq. ( 10 ) can be rewritten as the box-constrained integer least squares (ILS) problem \min_{\mathbf{q}\in\mathbb{B}^{m}}\left\|\bar{\mathbf{A}}\mathbf{q}-\mathbf{b}\right\|_{2}^{2}. (11) Let \bar{\mathbf{q}}\in\mathbb{R}^{m} denote the unconstrained real least-squares solution of Eq. ( 11 ). The corresponding normal equations are given by \mathbf{D}\mathbf{A}^{\top}\mathbf{A}\mathbf{D}\,\bar{\mathbf{q}}=\mathbf{D}\mathbf{A}^{\top}\mathbf{b}=\mathbf{D}\mathbf{A}^{\top}\bigl(\mathbf{y}+\mathbf{A}\mathbf{D}\mathbf{z}\bigr). Rearranging terms yields \mathbf{A}^{\top}\mathbf{A}\mathbf{D}(\bar{\mathbf{q}}-\mathbf{z})=\mathbf{A}^{\top}\mathbf{y}. Let \mathbf{A}^{\top}\mathbf{A}=\mathbf{R}^{\top}\mathbf{R} be the Cholesky factorization, where \mathbf{R} is upper triangular. Substituting this factorization into Eq. ( 3.3 ) gives \mathbf{R}^{\top}\mathbf{R}\mathbf{D}(\bar{\mathbf{q}}-\mathbf{z})=\mathbf{A}^{\top}\mathbf{y}. Define the transformed variable \mathbf{v}:=\mathbf{D}(\bar{\mathbf{q}}-\mathbf{z}), which implies \bar{\mathbf{q}}=\mathbf{D}^{-1}\mathbf{v}+\mathbf{z}=\mathbf{v}\oslash\mathbf{s}, where \oslash denotes element-wise division. Finally, define \bar{\mathbf{R}}:=\mathbf{R}\mathbf{D} . It is straightforward to verify that Eq. ( 11 ) is equivalent to \min_{\mathbf{q}\in\mathbb{B}^{m}}\left\|\bar{\mathbf{R}}(\mathbf{q}-\mathbf{z})-\mathbf{R}^{-\top}\mathbf{A}^{\top}\mathbf{y}\right\|_{2}^{2}, (12) which admits efficient approximate solutions via Babai-type successive rounding. Algorithm 1 Quantization with JTA 1: Compute {\mathbf{s}} and \mathbf{z} 2: Compute the Cholesky factorization: \widetilde{\mathbf{X}}^{\top}\widetilde{\mathbf{X}}+\lambda^{2}\mathbf{I}=\mathbf{R}^{\top}\mathbf{R} 3: Solve the lower triangular system \mathbf{R}^{\top}\mathbf{u}=\mathbf{A}^{\top}\mathbf{y} and the upper triangular system \mathbf{R}\mathbf{v}=\mathbf{u} . 4: Compute \bar{\mathbf{q}}=\mathbf{v}\oslash\mathbf{s}+\mathbf{z} 5: Compute \bar{\mathbf{R}}=\mathbf{RD} 6: \mathbf{c}(m)=\hat{\mathbf{q}}(m) 7: \mathbf{q}(m)=\text{clamp}(\lfloor\mathbf{c}(m)\rceil;\mathbb{B}) 8: for i=m-1:-1:1 do 9: \mathbf{c}(i)=\bar{\mathbf{q}}(i)+\left(\sum_{j=i+1}^{m}\bar{\mathbf{R}}(i,j)(\bar{\mathbf{q}}(j)-\mathbf{q}(j))\right)/\bar{\mathbf{R}}(i,i) 10: \mathbf{q}(i)=\text{clamp}(\lfloor\mathbf{c}(i)\rceil;\mathbb{B}) 11: end for 3.4 Random- K Babai/Klein Decoding (Candidate Generation) However, as previously mentioned, the Babai algorithm typically produces a suboptimal solution due to its greedy rounding strategy, which does not fully explore the combinatorial structure of the underlying lattice. To address this limitation, Klein ( 23 ) proposed a randomized integer least squares (ILS) solver that introduces controlled randomness into the rounding process, enabling the algorithm to explore a richer set of lattice points while maintaining polynomial-time complexity. Klein-style randomized rounding. In each back-substitution step, instead of deterministic rounding such as the line 6 or 10 in Algorithm 1 , we sample \mathbf{q}_{i} from a distribution concentrated around c_{i} : \Pr(\mathbf{q}_{i}=v)\;=\;\frac{\exp\!\left(-\alpha\,\bar{\mathbf{R}}_{ii}\,(\mathbf{c}_{i}-v)^{2}\right)}{\sum_{u=0}^{Q_{\max}}\exp\!\left(-\alpha\,\bar{\mathbf{R}}_{ii}\,(\mathbf{c}_{i}-u)^{2}\right)},\quad v\in\mathcal{B}, (13) where \alpha>0 controls the sampling temperature. Larger \alpha approaches greedy Babai; smaller \alpha encourages exploration. When K{=}1 and \alpha\to\infty , the method reduces to deterministic Babai. To further enhance performance, we are inspired by the K-best Klein strategy. Specifically, the randomized Klein algorithm is executed independently for K trials, each producing a candidate integer solution. Among these K candidates, we select the one that minimizes the corresponding residual, yielding a more accurate approximation to the underlying integer least squares objective.See Figure 1 on the performance . For this paper, we followed ( 25 ) design choices where \alpha=ln(\rho)/\min_{1\leq i\leq m}r_{ii}^{2} and \rho is the solution of K=(e\rho)^{(2m/\rho)} This formulation yields a data-driven trade-off between exploration and exploitation, adaptively adjusting the sampling sharpness according to the lattice geometry and the target list size K . Reference greedy path. We reserve a reference path that uses deterministic rounding, guaranteeing inclusion of the Babai solution in the candidate set. Method L2-7B L2-13B L3-8B Q3-0.6B Q3-4B Q3-8B M-7B BF16 6.97/5.47 6.47/4.88 8.93/6.13 25.28/20.94 16.53/13.67 13.23/9.72 8.15/5.50 RTN 7.72/6.11 6.83/5.20 12.09/8.53 42.20/37.52 20.15/17.52 15.54/11.97 8.96/6.12 GPTQ 7.11 /5.62 6.56 /4.99 9.41/6.54 30.79/25.20 16.73/ 13.66 13.51/10.08 8.29/5.63 AWQ 7.16/ 5.61 6.56 / 4.97 9.40/6.54 27.99 /25.89 17.18/18.43 13.51/10.02 8.28/5.61 Ours(N) 7.15/5.63 6.56 /4.99 9.38/6.52 28.35/ 23.48 18.20/13.97 13.42/9.97 8.27 /5.60 Ours(R) 7.14 / 5.62 6.55 / 4.98 9.35/6.50 28.07/23.64 16.44 /13.84 13.40/9.95 8.27 / 5.59 g128 W4A16 Ours 7.14 / 5.61 6.55 / 4.97 9.33 / 6.48 26.84/22.80 16.32/13.54 13.39/9.94 8.23/5.58 RTN 4e2/5e2 12.50/10.68 4e2/2e3 1e5/2e5 3e3/3e3 5e2/7e2 19.65/14.88 GPTQ 7.92/6.44 6.99/5.43 12.25/8.35 43.60/41.54 18.16/15.19 14.34/11.01 9.10/6.27 AWQ 7.90/ 6.25 6.95 / 5.33 11.63/8.19 39.60/36.88 19.75/16.83 14.97/11.23 8.89/6.07 Ours(N) 7.88/6.33 6.98/5.41 11.52/8.19 47.23/42.75 25.46/20.36 14.44/11.11 8.87/ 6.06 Ours(R) 7.87 /6.34 6.94 / 5.39 11.43/8.16 44.09/40.19 19.52/14.91 14.37/11.05 8.86 / 6.03 g128 W3A16 Ours 7.86 / 6.30 6.94 / 5.33 11.40 / 7.87 35.03/31.75 17.01/12.89 14.30/10.98 8.84/6.03 GPTQ 7.37/5.83 6.70/5.16 10.30/7.37 37.03/33.64 17.34/14.34 13.99/10.65 8.53/5.81 AWQ 7.34/5.83 6.68/5.06 9.44/7.10 30.07/25.89 18.83/16.35 14.29/10.77 10.24/5.88 QUIP 12.54/10.44 6.71/5.15 9.84/6.85 51.41/47.10 182.16/126.55 19.19/14.85 9.69/6.65 Ours(N) 7.14/5.64 6.57 /4.98 9.39/6.52 28.35/23.48 17.30/14.30 13.41 /9.97 8.28/5.62 Ours(R) 7.11 / 5.62 6.56 / 4.97 9.38/6.50 28.11/23.04 17.30/14.30 13.41/9.96 8.27/5.60 W4A16 Ours 7.10 / 5.60 6.56 / 4.96 9.33/6.48 26.94/22.61 17.25/14.27 13.38/9.92 8.24/5.59 GPTQ 9.83/8.33 8.04/6.52 29.42/23.81 90.23/90.98 23.16/21.39 18.10/16.46 10.90/8.01 AWQ 15.62/15.51 8.17/6.45 17.60/11.84 78.52/79.44 30.31/33.19 18.36/ 14.97 10.27/7.65 QUIP 27.47/28.05 7.17/5.57 11.50/8.31 121.26/112.09 23.02/19.74 30.39/19.78 9.30/6.61 Ours(N) 7.88/6.30 6.97 /5.42 11.52/8.17 47.23/42.75 22.95/19.65 25.46/20.36 8.78/6.09 Ours(R) 7.87 / 6.29 6.97 / 5.41 11.35/8.12 43.94/39.77 22.90/19.63 18.07/ 16.48 8.77/6.07 W3A16 Ours 7.75/6.22 6.96 / 5.40 11.38/8.04 35.56/32.95 22.87/19.56 18.05/14.75 8.72/6.06 Table 1: Perplexity comparison across different models and quantization methods. For each entry, the left value is evaluated on C4 and the right value on WikiText-2. We denote our proposed methods as follows: Ours(N) represents Naïve Babai, Ours(R) represents Random- K Babai, and Ours represents Random- K Babai with Joint Activation-Target optimization. The model families are abbreviated as: L2/L3 for Llama2/Llama 3, Q3 for the Qwen3 series, and M for Mistral. All activations are in BF16 format. 3.4.1 GPU-efficient Path-Isolated Random- K Babai Search Naively parallelizing K decoding paths on GPU can introduce cross-path interference when residual states are shared or updated in-place after paths diverge, leading to incorrect centers c_{i} and biased sampling. We introduce a GPU-efficient random K -best Babai solver with strict path isolation, termed Parallel Path-Isolated K -best Babai (PPI-KBabai) (or Path-Isolated Random- K Babai Search ). Unlike naive parallel K -path implementations that share residual states, our method maintains an independent residual buffer per candidate path and performs blocked look-ahead updates via batched matrix multiplication. We further reserve an reference greedy path to guarantee inclusion of the deterministic Babai solution, and select the best candidate using the unified JTA score in Sec. 3.1 . The Klein Styled JTA quantization, K-Best JTA quantiation and detailed kernel design, buffer layout, and blocked update rules are provided in Appendix A . 4 Experiments To evaluate the effectiveness of our method, we conduct comprehensive experiments comparing it against commonly used layer-wise quantization baselines. We first describe the baseline methods, the large language models being quantized, as well as the evaluation metrics and datasets. We then present the experimental results, followed by a detailed analysis. To ensure fair comparisons, we adopt the default configurations of each baseline’s repo whenever possible. Baselines We evaluate our method against state-of-the-art quantization approaches, including AWQ ( 24 ) , GPTQ ( 15 ) , and QUIP ( 13 ) , and additionally report round-to-nearest as a naïve baseline for perplexity.Our method is evaluated under three settings: Naïve Babai (Ours-N), Random- K Babai (Ours-R), and Random K Babai with Joint Activation-Target optimization (Ours).Although theortically, the K can be any positive integer number, considering the trade-off between resource usage and performance gain Figure 2 , we set the K as 5 in our experiments. To ensure strong baselines, we enable activation ordering for GPTQ. Calibration is performed using 128 samples from the C4 ( 28 ) dataset with a sequence length of 2048 tokens. For all baselines, only minimal modifications are made to accommodate the architectural structures of newer LLMs, while their original algorithms and configurations are kept unchanged. Model Method 4 bits 3 bits ARC-C ARC-E BoolQ Hella PIQA Wino Average* ARC-C ARC-E BoolQ Hella PIQA Wino Average* Llama3-8B BF16 51.71 80.89 81.77 60.56 78.84 73.40 71.20 51.71 80.89 81.77 60.56 78.84 73.40 71.20 GPTQ 48.29 78.89 80.21 59.47 78.29 73.32 69.74 34.21 66.04 71.89 55.26 73.56 68.11 61.51 AWQ 48.70 79.21 80.80 59.73 78.62 73.32 70.06 43.86 75.21 76.15 55.79 75.95 71.03 66.33 QUIP 46.25 77.36 81.93 58.76 77.53 73.09 69.15 41.38 71.34 77.68 55.67 76.12 71.67 65.64 O(N) 48.46 78.53 81.04 60.00 78.18 73.16 69.90 41.81 71.71 76.73 56.71 76.88 71.35 65.87 O(R) 49.32 79.12 81.04 59.79 78.24 72.30 69.97 41.30 73.48 76.45 56.67 77.37 70.64 65.99 O 49.15 79.59 81.13 59.70 78.67 72.69 70.16 42.92 75.42 78.69 55.73 77.75 70.32 66.81 Qwen3-4B BF16 50.34 80.26 85.11 52.29 75.30 65.67 68.16 50.34 80.26 85.11 52.29 75.30 65.67 68.16 GPTQ 47.57 77.90 82.43 50.12 74.43 62.43 65.81 39.33 70.92 80.95 46.81 70.92 61.64 61.76 AWQ 46.29 77.32 83.23 50.37 74.10 62.88 65.70 40.27 68.27 81.19 46.02 70.87 60.38 61.17 QUIP 39.25 71.09 80.73 43.64 70.24 59.91 60.81 24.15 47.81 67.86 33.72 62.79 51.14 47.91 O(N) 41.81 74.79 83.46 47.61 73.12 58.33 63.19 35.95 58.68 69.20 40.65 67.74 50.83 53.84 O(R) 44.28 74.03 82.97 49.28 72.80 61.17 64.09 37.79 65.35 70.58 43.39 67.25 53.99 56.39 O 46.65 78.27 84.31 49.85 74.21 62.35 65.94 41.50 71.41 80.95 45.61 72.64 60.06 62.03 Qwen3-8B BF16 55.38 83.50 86.73 57.12 76.50 67.88 71.19 55.38 83.50 86.73 57.12 76.50 67.88 71.19 GPTQ 54.27 82.74 86.73 56.62 76.22 66.77 70.56 44.28 74.62 83.33 53.88 75.95 67.56 66.60 AWQ 53.67 82.37 85.93 55.91 75.79 68.75 70.40 50.56 80.93 84.43 52.80 75.90 67.25 68.65 QUIP 45.48 75.42 81.99 44.72 69.53 62.67 63.30 40.27 71.93 77.37 43.22 71.33 59.83 60.66 O(N) 53.75 82.20 86.02 56.39 76.22 68.03 70.44 47.69 77.61 84.46 53.76 74.76 67.35 67.61 O(R) 53.41 82.36 86.02 56.34 76.06 68.82 70.50 47.59 77.62 84.04 53.88 74.59 67.46 67.53 O 54.18 82.62 86.45 55.70 76.39 68.59 70.66 47.27 78.41 84.39 54.23 76.27 67.90 68.08 Table 2: Zero-shot accuracy comparison on six common sense reasoning tasks across Llama3-8B, Qwen3-4B, and Qwen3-8B. The evaluation is conducted under 4-bit and 3-bit quantization settings. We denote our proposed methods as: O(N) for Naïve Babai, O(R) for Random K -Best Babai, and O for Random K -Best Babai with Joint Activation-Target optimization. The unquantized BF16 baseline is shaded in gray. For quantized methods, bold indicates the best result and underlining denotes the second-best. LLaMA3-8B Qwen3-4B Qwen3-8B Bit Method GSM8K GPQA MBPP Avg GSM8K GPQA MBPP Avg GSM8K GPQA MBPP Avg BF16 BF16 51.86 35.98 48.40 45.41 83.70 38.38 62.40 61.49 88.48 33.33 65.00 62.27 GPTQ 45.03 29.27 45.00 39.77 57.71 31.81 27.60 39.77 86.80 36.86 60.20 61.29 AWQ 44.42 32.32 46.40 41.05 80.15 33.33 57.80 57.09 85.44 32.83 62.80 60.36 QUIP 42.30 29.87 40.40 37.52 5.69 25.75 0.00 10.48 64.40 31.31 0.00 31.90 4-bit (g128) Ours 48.22 32.93 44.80 41.98 84.29 36.36 56.80 59.15 87.87 34.34 63.20 61.80 Table 3: Reasoning accuracy (%) on GSM8K, GPQA, and MBPP benchmarks. We evaluate LLaMA3-8B, Qwen3-4B, and Qwen3-8B. All quantized methods are evaluated with 4-bit weights and a group size of 128 (g128) . Our method (denoted as Ours ) employs Random K Babai with Joint Target Activation (JTA) optimization . The unquantized baseline is reported in BF16 . Bold indicates the best result and underlining denotes the second-best. Models We consider two major LLM families, Qwen ( 40 ) and LLaMA ( 35 ; 21 ) , together with Mistral-7B ( 22 ) . This selection covers diverse model families, reasoning capabilities, and parameter sizes. Metrics and Datasets To test the basic text generation ability, we use the perplexity to measure each quantized model on C4 ( 28 ) and Wikitext2 ( 29 ) . Then we further evaluate on the zero shot accuary on ARC ( 16 ) ,boolq ( 37 ) ,HellaSwag ( 41 ) ,PIQA ( 9 ) and WinoGrande ( 31 ) For the last part, we test the reasoning ablility on GSM-8K ( 17 ) , GPQA-diamond ( 30 ) and MBPP ( 5 ) . Except the evalution of PPL, all other tasks are evaluated on LM-harness library ( 20 ) Perplexity Table 1 reports perplexity (PPL) across multiple LLaMA-2/3, Qwen-3, and Mistral models under group-wise weight-only quantization with activation precision fixed at 16-bit. At 4-bit, existing PTQ methods such as GPTQ and AWQ achieve reasonable performance on large LLaMA models but exhibit noticeable degradation or instability on harder architectures, particularly Qwen-0.6B and llama-3-8B, while RTN frequently diverges. In contrast, our method consistently attains the lowest or near-lowest perplexity across all model families, with clear improvements in challenging regimes. The advantage becomes more pronounced at 3-bit, where prior methods often suffer sharp performance drops or catastrophic failures, whereas our approach remains stable and shows smooth degradation relative to BP16. These results indicate that jointly optimizing quantization objectives and search strategies leads to substantially improved robustness under low-bit quantization, especially for smaller and more sensitive models.When group quantization is disabled (group size = 0), baseline methods such as GPTQ, AWQ, and QUIP exhibit a clear increase in quantization error, with substantial performance degradation and, in some cases, numerical instability—particularly for smaller and more sensitive models. In contrast, our method remains stable in this setting and consistently preserves low perplexity across all architectures. Zero-shot accuracy Table 2 compares BF16 and low-bit PTQ methods across three model families under both 4-bit and 3-bit settings. At 4 bits, all methods remain relatively close to BF16, but our approach consistently achieves the strongest or second-strongest performance across most tasks and models, yielding the highest average accuracy for all three backbones. Notably, the gains are more pronounced on reasoning-heavy benchmarks such as ARC-C, ARC-E, and Hella, indicating improved robustness beyond simple lexical or pattern-matching tasks. When moving to the more challenging 3-bit regime, performance gaps widen substantially: GPTQ and QUIP exhibit significant degradation, particularly on ARC and Hella, while our method degrades more gracefully and maintains clear advantages in average performance. This trend is consistent across model scales, from Qwen-3-4B to Qwen-3-8B, suggesting that the proposed approach scales favorably and is less sensitive to aggressive quantization. Overall, the results demonstrate that our method not only preserves accuracy under moderate compression but also provides superior stability in extreme low-bit settings, highlighting its effectiveness as a general and robust PTQ solution. Reasoning Table 3 reports reasoning accuracy on GSM8K, GPQA, and MBPP under 4-bit quantization across three model families. Compared to GPTQ, AWQ, and QUIP, our method consistently achieves the highest average accuracy for all backbones, with particularly strong gains on GSM8K and GPQA, which require multi-step numerical and factual reasoning. While AWQ remains competitive on MBPP for some models, its performance is less consistent across tasks, leading to lower overall averages. QUIP exhibits severe degradation on reasoning benchmarks, including complete failure on MBPP for Qwen models, highlighting its instability under reasoning-intensive workloads. In contrast, our approach maintains balanced performance across arithmetic, knowledge-intensive, and program synthesis tasks, closely tracking BF16 accuracy despite aggressive quantization. These results indicate that the proposed method better preserves structured reasoning capabilities under low-bit constraints, rather than overfitting to a single task type or model family. Figure 2: Ablation study on the candidate size K . We evaluate the perplexity on C4 and WikiText-2 datasets using Llama-3-8B with 4-bit quantization (group size 128). The results demonstrate the impact of increasing the search space K . Figure 3: Sensitivity analysis of hyperparameters \mu and \lambda . Evaluated on WikiText-2 (calibrated on C4), the plots show the perplexity trend when varying one parameter while fixing the other at 0.6. The U-shaped curve for \mu (left) confirms the necessity of balancing the two objectives, while \lambda (right) shows 0.6 as a robust operating point. Ablations We investigate the impact of the hyperparameter K by varying it within \{1,5,\dots,50\} under the setting of 4-bit Llama-3-8B with a group size of 128. As illustrated in Fig. 2 , the perplexity on both WikiText-2 and C4 exhibits a significant drop at K=5 . Beyond this point, while the performance continues to improve up to K=50 , the marginal gains become negligible. Based on these observations, we select K=5 as the default configuration for our method. We analyze the impact of \mu and \lambda on WikiText-2 in Fig. 3 . For \mu , performance is optimized at 0.6 but degrades at the boundaries ( 0.1,1.0 ). This confirms that neither Eq. 1 nor Eq. 4 alone is sufficient; a balanced combination is essential. For \lambda , despite higher variance, setting \lambda=0.6 yields a robust minimum. Consequently, we adopt (\mu=0.6,\lambda=0.6) as the default configuration for 3 bits setting. Similarly, we adopt (\mu=0.1,\lambda=0.2) for 4 bits setting. 5 Conclusion We presented a unified post-training quantization framework that reformulates layer-wise weight quantization as a structured integer optimization problem and solves it using a joint objective with Babai-type decoding. By integrating compensation-aware targets and controlled randomness, the proposed method consistently outperforms existing PTQ approaches across a wide range of models, tasks, and bit-widths. Extensive experiments on both general evaluation benchmarks and reasoning-intensive tasks demonstrate that our approach preserves accuracy more effectively under aggressive low-bit quantization, while remaining stable across model scales. These results suggest that principled optimization-based formulations provide a robust foundation for future low-bit quantization methods, bridging classical lattice decoding techniques and modern large language model compression. Limitations Our current framework does not yet incorporate weight permutation (e.g., GPTQ) or dynamic scaling, which are promising for future integration. Additionally, we presently use fixed hyperparameters ( \mu,\lambda ) and candidate size K for all layers. Future work will explore layer-wise adaptive strategies, specifically assigning distinct \mu,\lambda and varying the number of random candidates per layer to better match the sensitivity of different model components. Appendix A Appendix Algorithm 2 Parallel K -Path Computation via Vectorized Back-Substitution 0: Cholesky factor \mathbf{R}\in\mathbb{R}^{m\times m} , Continuous weights \bar{\mathbf{W}}\in\mathbb{R}^{m\times n} 0: Hyperparameters: K (candidates), B (block size) 0: Candidate Integer Weights \mathbf{Q}\in\mathbb{Z}^{(K)\times m\times n} 1: Initialization: 2: Initialize candidate centers \mathbf{C}\in\mathbb{R}^{(K)\times m\times n} by broadcasting \bar{\mathbf{W}} 3: Initialize \mathbf{Q} (storage for quantized values) { Iterate backwards in blocks for matrix-level efficiency } 4: for row block index j_{start}=m down to 1 step B do 5: Define current block J=[j_{start}-B:j_{start}] and future block F=[j_{start}:m] 6: 1. Global Vectorized Update (Matrix-Matrix Op) 7: if F is not empty then 8: Compute quantization error from processed rows: \Delta_{F}=\mathbf{C}_{:,F,:}-\mathbf{Q}_{:,F,:} 9: Propagate error to all K paths simultaneously using matrix multiplication: 10: \mathbf{C}_{:,J,:}\leftarrow\mathbf{C}_{:,J,:}+\frac{1}{\text{diag}(\mathbf{R})_{J}}\left(\mathbf{R}_{J,F}\cdot\Delta_{F}\right) 11: end if 12: 2. Local Parallel Quantization 13: for row i from j_{start} down to j_{start}-B do 14: Update center c_{:,i} using local neighbors within block J 15: Path Diversification (Vectorized Operation): 16: Path 0 (Greedy): \mathbf{q}_{0,i}\leftarrow\text{Round}(\mathbf{c}_{0,i}) 17: Path 1..K (Stochastic): \mathbf{q}_{k,i}\leftarrow\text{Sample}(\mathbf{c}_{k,i},\text{top-}K) 18: end for 19: end for 20: return \mathbf{Q} Algorithm 3 Quantization with JTA with random 1: Compute {\mathbf{s}} and \mathbf{z} 2: Compute the Cholesky factorization: \widetilde{\mathbf{X}}^{\top}\widetilde{\mathbf{X}}+\lambda^{2}\mathbf{I}=\mathbf{R}^{\top}\mathbf{R} 3: Solve the lower triangular system \mathbf{R}^{\top}\mathbf{u}=\mathbf{A}^{\top}\mathbf{y} and the upper triangular system \mathbf{R}\mathbf{v}=\mathbf{u} . 4: Compute \bar{\mathbf{q}}=\mathbf{v}\oslash\mathbf{s}+\mathbf{z} 5: Compute \bar{\mathbf{R}}=\mathbf{RD} 6: \mathbf{c}(m)=\hat{\mathbf{q}}(m) 7: \Pr(\mathbf{q}_{m}=v)\;=\;\frac{\exp\!\left(-\alpha\,\bar{\mathbf{R}}_{ii}\,(\mathbf{c}_{m}-v)^{2}\right)}{\sum_{u=0}^{|\mathbb{B}|}\exp\!\left(-\alpha\,\bar{\mathbf{R}}_{ii}\,(\mathbf{c}_{i}-u)^{2}\right)},\quad v\in\mathbb{B} 8: for i=m-1:-1:1 do 9: \mathbf{c}(i)=\bar{\mathbf{q}}(i)+\left(\sum_{j=i+1}^{m}\bar{\mathbf{R}}(i,j)(\bar{\mathbf{q}}(j)-\mathbf{q}(j))\right)/\bar{\mathbf{R}}(i,i) 10: \Pr(\mathbf{q}_{i}=v)\;=\;\frac{\exp\!\left(-\alpha\,\bar{\mathbf{R}}_{ii}\,(\mathbf{c}_{i}-v)^{2}\right)}{\sum_{u=0}^{|\mathbb{B}|}\exp\!\left(-\alpha\,\bar{\mathbf{R}}_{ii}\,(\mathbf{c}_{i}-u)^{2}\right)},\quad v\in\mathbb{B} 11: end for Algorithm 4 K-Best Randomized JTA Quantization 0: Input matrices \widetilde{\mathbf{X}},\mathbf{y},\mathbf{W} , regularization \lambda , bit-width wbit, number of trials K 0: Quantized vector \mathbf{q}^{\star} 1: Initialize best residual r^{\star}\leftarrow+\infty 2: Initialize \mathbf{q}^{\star}\leftarrow\mathbf{0} 3: for k=1 to K do 4: Run Algorithm 3 to obtain a candidate \mathbf{q}^{(k)} 5: Compute residual r^{(k)}=\left\|\mathbf{A}\mathbf{D}\mathbf{q}^{(k)}-\mathbf{b}\right\|_{2}^{2} 6: if r^{(k)}