Papers
Topics
Authors
Recent
Search
2000 character limit reached

E2M-ATQ: Asymmetric Ternary Quantizer

Updated 6 July 2026
  • 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

Wˉ=μ1+diag(α)T,T{1,0,1}n×m,\bar{\mathbf{W}} = \boldsymbol{\mu}\,\mathbf{1}^{\top} + \mathrm{diag}(\boldsymbol{\alpha})\,\mathbf{T}, \qquad \mathbf{T}\in\{-1,0,1\}^{n\times m},

where WˉRn×m\bar{\mathbf{W}}\in\mathbb{R}^{n\times m} is the quantized weight matrix, μRn\boldsymbol{\mu}\in\mathbb{R}^{n} is the row-wise shift, αRn\boldsymbol{\alpha}\in\mathbb{R}^{n} is the row-wise scale, T\mathbf{T} is the ternary codebook matrix, and 1Rm\mathbf{1}\in\mathbb{R}^{m} is the all-one vector (Zhao et al., 11 Jun 2026).

The shift is initialized with the row mean,

μ=1mj=1mW:j.\boldsymbol{\mu}=\frac{1}{m}\sum_{j=1}^{m}\mathbf{W}_{:j}.

For row ii, the quantization levels therefore become

αi+μi,μi,+αi+μi.-\alpha_i+\mu_i,\quad \mu_i,\quad +\alpha_i+\mu_i.

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 μi\mu_i, 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

WˉRn×m\bar{\mathbf{W}}\in\mathbb{R}^{n\times m}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,

WˉRn×m\bar{\mathbf{W}}\in\mathbb{R}^{n\times m}1

together with the least-squares scale estimate

WˉRn×m\bar{\mathbf{W}}\in\mathbb{R}^{n\times m}2

The stage proceeds by coordinate-descent-like updates over the shift WˉRn×m\bar{\mathbf{W}}\in\mathbb{R}^{n\times m}3, the scale WˉRn×m\bar{\mathbf{W}}\in\mathbb{R}^{n\times m}4, and the ternary codes WˉRn×m\bar{\mathbf{W}}\in\mathbb{R}^{n\times m}5. With residual WˉRn×m\bar{\mathbf{W}}\in\mathbb{R}^{n\times m}6, residual-mean correction is applied as

WˉRn×m\bar{\mathbf{W}}\in\mathbb{R}^{n\times m}7

For a single row, the objective is

WˉRn×m\bar{\mathbf{W}}\in\mathbb{R}^{n\times m}8

and the update order WˉRn×m\bar{\mathbf{W}}\in\mathbb{R}^{n\times m}9 is proven to be monotone:

μRn\boldsymbol{\mu}\in\mathbb{R}^{n}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:

μRn\boldsymbol{\mu}\in\mathbb{R}^{n}1

The second stage then optimizes only μRn\boldsymbol{\mu}\in\mathbb{R}^{n}2 using calibration activations μRn\boldsymbol{\mu}\in\mathbb{R}^{n}3 and the layer-output objective

μRn\boldsymbol{\mu}\in\mathbb{R}^{n}4

Introducing the activation second moment

μRn\boldsymbol{\mu}\in\mathbb{R}^{n}5

this can be rewritten as

μRn\boldsymbol{\mu}\in\mathbb{R}^{n}6

This is the manifold-aware objective: μRn\boldsymbol{\mu}\in\mathbb{R}^{n}7 changes the geometry from ordinary Euclidean norm to a calibration-induced metric (Zhao et al., 11 Jun 2026).

With μRn\boldsymbol{\mu}\in\mathbb{R}^{n}8 fixed, the feasible set becomes an affine stratum parameterized by the continuous variables μRn\boldsymbol{\mu}\in\mathbb{R}^{n}9. The relocation step is described as projecting αRn\boldsymbol{\alpha}\in\mathbb{R}^{n}0 onto the affine constraint set induced by a fixed αRn\boldsymbol{\alpha}\in\mathbb{R}^{n}1 and solving row-wise normal equations. For row αRn\boldsymbol{\alpha}\in\mathbb{R}^{n}2, the optimality conditions yield the αRn\boldsymbol{\alpha}\in\mathbb{R}^{n}3 system

αRn\boldsymbol{\alpha}\in\mathbb{R}^{n}4

The row-wise solution has an exact closed form in the TWLA formulation, and the final quantized matrix is expressed as

αRn\boldsymbol{\alpha}\in\mathbb{R}^{n}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 αRn\boldsymbol{\alpha}\in\mathbb{R}^{n}6 is fixed, quantized weights are restricted to an affine set parameterized by αRn\boldsymbol{\alpha}\in\mathbb{R}^{n}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 αRn\boldsymbol{\alpha}\in\mathbb{R}^{n}8 through the trace form αRn\boldsymbol{\alpha}\in\mathbb{R}^{n}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

T\mathbf{T}0

If the determinant of the T\mathbf{T}1 system is too small, the method falls back to the Euclidean warm-start values. The determinant is written as

T\mathbf{T}2

with

T\mathbf{T}3

The degenerate all-zero ternary row is handled explicitly by

T\mathbf{T}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 PTT\mathbf{T}5-LLM. TWN-style methods mostly rely on direct thresholding and least-squares scaling in Euclidean weight space. PTT\mathbf{T}6-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 T\mathbf{T}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.

Definition Search Book Streamline Icon: https://streamlinehq.com
References (1)

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to Euclidean-to-Manifold Asymmetric Ternary Quantizer (E2M-ATQ).