E2M-ATQ: Asymmetric Ternary Quantizer
- The paper introduces E2M-ATQ, a calibration-aware ternarization method that minimizes layer-output error by converting rotated full-precision weights into asymmetric ternary representations.
- It employs a two-stage process that first stabilizes ternary codes with a Euclidean warm-start and then refines parameters via calibration-induced manifold relocation.
- Empirical results within TWLA show that E2M-ATQ significantly improves metrics like perplexity and MMLU on LLMs under extreme quantization conditions.
Euclidean-to-Manifold Asymmetric Ternary Quantizer (E2M-ATQ) is the ternarization core of TWLA, a post-training quantization framework for LLMs that achieves 1.58-bit weight compression and 4-bit activation quantization while maintaining high accuracy. Within that framework, E2M-ATQ converts a full-precision weight matrix into an asymmetric ternary representation designed not merely to approximate weights in parameter space, but to minimize layer-output error on calibration data. Its defining features are a row-wise asymmetric parameterization, a two-stage optimization that moves from Euclidean weight fitting to calibration-induced manifold relocation, and a row-wise closed-form refinement once the ternary support is fixed (Zhao et al., 11 Jun 2026).
1. Position within the TWLA pipeline
E2M-ATQ is the module that turns TWLA from rotated full-precision weights into true ternary weights. In the pipeline, it appears after KOTMS and before ILA-AMP. KOTMS first rotates each layer’s weights into a more ternary-friendly coordinate system and suppresses activation outliers through the shared orthogonal transform. E2M-ATQ then performs the actual ternarization of the rotated weights, producing the ternary codes and row-wise scale and shift parameters. ILA-AMP finally allocates activation bitwidths across layers using a budgeted, interaction-aware objective. In this sense, E2M-ATQ is the component that makes the W1.58 part of the W1.58A4 regime possible (Zhao et al., 11 Jun 2026).
| Order | Module | Function |
|---|---|---|
| 1 | KOTMS | Rotates weights and suppresses activation outliers |
| 2 | E2M-ATQ | Produces ternary codes and row-wise scale/shift |
| 3 | ILA-AMP | Allocates activation bitwidths across layers |
The rationale for introducing E2M-ATQ follows from two limitations of naive ternary quantization. First, pretrained LLM weights are described as often unimodal and biased, so direct ternary projection incurs large approximation error. Second, weight-domain reconstruction error is not identical to layer-output error; for PTQ, preservation of the forward pass on calibration activations is the relevant criterion. E2M-ATQ addresses both issues by separating stable ternary-code discovery from calibration-aware continuous relocation.
2. Asymmetric ternary parameterization
E2M-ATQ uses an asymmetric ternary form because pretrained LLM weights often have non-zero row-wise means, making symmetric ternarization too restrictive. The quantized weight matrix is written as
where is the quantized weight matrix, is the row-wise shift, is the row-wise scale, is the ternary codebook matrix, and is the all-one vector (Zhao et al., 11 Jun 2026).
The shift is initialized with the row mean,
For row , the quantization levels therefore become
This permits adaptation to biased weight distributions rather than forcing the codebook to be centered at zero. The construction also clarifies why the method is termed asymmetric: the three levels are translated by , so their center need not coincide with the origin. A plausible implication is that this row-wise shift expands the class of weight distributions that can be matched without changing the ternary alphabet itself.
3. Euclidean warm-start and ternary-code stabilization
The first stage of E2M-ATQ minimizes Euclidean reconstruction error through the objective
0
This stage serves as a warm-start that identifies a stable ternary pattern in ordinary Frobenius geometry before any calibration-aware refinement is attempted (Zhao et al., 11 Jun 2026).
Initialization uses standard TWN-style row-wise thresholding,
1
together with the least-squares scale estimate
2
The stage proceeds by coordinate-descent-like updates over the shift 3, the scale 4, and the ternary codes 5. With residual 6, residual-mean correction is applied as
7
For a single row, the objective is
8
and the update order 9 is proven to be monotone:
0
The significance of this stage is primarily algorithmic. It stabilizes the discrete ternary structure in Euclidean space, thereby avoiding an immediate and potentially unstable optimization of discrete and calibration-weighted variables simultaneously.
4. Manifold relocation under calibration-induced geometry
After the ternary pattern stabilizes, E2M-ATQ freezes it:
1
The second stage then optimizes only 2 using calibration activations 3 and the layer-output objective
4
Introducing the activation second moment
5
this can be rewritten as
6
This is the manifold-aware objective: 7 changes the geometry from ordinary Euclidean norm to a calibration-induced metric (Zhao et al., 11 Jun 2026).
With 8 fixed, the feasible set becomes an affine stratum parameterized by the continuous variables 9. The relocation step is described as projecting 0 onto the affine constraint set induced by a fixed 1 and solving row-wise normal equations. For row 2, the optimality conditions yield the 3 system
4
The row-wise solution has an exact closed form in the TWLA formulation, and the final quantized matrix is expressed as
5
The expression “Euclidean-to-Manifold” refers precisely to this transition: first stabilize the discrete ternary stratum under Frobenius geometry, then relocate the continuous parameters on the geometry induced by calibration statistics.
5. Feasible-set structure, stabilization, and edge cases
E2M-ATQ treats the ternary codebook as creating a stratified feasible set. Once 6 is fixed, quantized weights are restricted to an affine set parameterized by 7. This is the basis for the “manifold” language in the method description. The geometry of that set is induced by the activation second moment 8 through the trace form 9, so the relocation step weights directions according to how input structure affects layer outputs rather than according to raw Euclidean distance alone (Zhao et al., 11 Jun 2026).
The appendix introduces practical stabilization rules. The moment matrix is regularized as
0
If the determinant of the 1 system is too small, the method falls back to the Euclidean warm-start values. The determinant is written as
2
with
3
The degenerate all-zero ternary row is handled explicitly by
4
These design details indicate that E2M-ATQ is not only a conceptual reformulation of ternarization but also a numerically guarded procedure for PTQ settings in which calibration covariance structure may be ill-conditioned.
6. Relation to prior ternary methods and empirical interpretation
TWLA contrasts E2M-ATQ with prior ternarization approaches such as TWN-style methods and PT5-LLM. TWN-style methods mostly rely on direct thresholding and least-squares scaling in Euclidean weight space. PT6-LLM appears as a ternarization baseline for comparison. Traditional ternary methods are described as generally assuming a symmetric or near-symmetric weight distribution and as not explicitly accounting for row-wise bias or output-error calibration. By contrast, E2M-ATQ uses asymmetric ternary levels with row-wise shift 7, optimizes on a calibration-induced metric rather than only weight-space error, and separates discrete-code stabilization from continuous relocation (Zhao et al., 11 Jun 2026).
The method is also positioned carefully relative to the heavy-tailed activation problem. Strictly speaking, heavy-tailed behavior is primarily an activation problem in TWLA, and KOTMS is the module that addresses it. E2M-ATQ instead operates on the weight side by reducing layer-output distortion introduced by ternarization. This distinction addresses a common misunderstanding: E2M-ATQ is not the component responsible for suppressing activation outliers, even though it is important for end-to-end accuracy preservation.
Ablation results in TWLA attribute a material contribution to E2M-ATQ. E2M-ATQ alone improves over the no-module baseline. KOTMS alone also helps, but E2M-ATQ tends to give larger gains on the reported metrics. The combination E2M-ATQ + KOTMS performs best among the two-module combinations, while the full three-module system with ILA-AMP is required to recover strong accuracy under 4-bit activations. On LLaMA2-13B with 16-bit activations, moving from no module to E2M-ATQ alone is reported to drop C4 perplexity dramatically and improve MMLU. On Qwen3-14B, E2M-ATQ combined with KOTMS gives much better MMLU than either alone. Under 4-bit activations, E2M-ATQ is necessary but not sufficient.
Taken together, these results support a specific interpretation of E2M-ATQ. It is the mechanism that adapts ternary weight quantization to biased, unimodal pretrained LLM weights and to the calibration-induced structure of layer outputs. This suggests that its main contribution is not simply ternary compression in isolation, but a calibration-aware reparameterization and relocation strategy that makes ternary weights viable within the broader W1.58A4 TWLA design.