Manuscript Offprint

arXiv:2608.24173

SandwichQuant: Which Parameters Matter Before and After Quantization?

Peng Xia, Junbiao Pang

Abstract

Quantization correction methods usually optimize weights, quantization parameters, or reconstruction objectives, while the underlying parameter subspaces responsible for effective correction remain unclear. In this work, we study quantization correction from a parameter subspace perspective and reveal that correction capability is highly non-uniform across parameter groups. By decomposing trainable parameters into backbone weights, normalization-affine parameters, and quantization parameters, we show that the low-dimensional normalization-affine subspace provides a highly efficient correction direction under matched budgets. Based on this finding, we propose SandwichQuant, a two-stage normalization-affine correction framework that performs adaptation before and after quantization. The pre-stage improves quantization robustness, while the post-stage compensates residual errors after the quantized graph is fixed. Extensive experiments on vision models and large language models demonstrate consistent improvements under various low-bit quantization settings, validating the effectiveness of subspace-aligned correction.

1 Introduction

Large language models (LLMs) have achieved remarkable performance across language understanding, generation, and reasoning, but their growing parameter counts make inference expensive in both memory and computation. Quantization alleviates this cost by mapping floating-point weights and activations to low-precision representations. Quantization-aware training (QAT) adapts a model under simulated low-precision arithmetic and often provides strong accuracy, but its training cost is increasingly prohibitive at LLM scale [21, 9, 5]. Post-training quantization (PTQ) is therefore the dominant deployment paradigm: it calibrates a pretrained model using limited data, without full retraining [38, 29, 48, 12, 32, 33]. Nevertheless, accuracy still degrades sharply at extreme precision, especially when weights, activations, and KV caches are quantized jointly. Improving this regime is commonly treated as a problem of finding better rounding decisions, quantization grids, transformations, or weight-compensation rules.

We expose a complementary source of robustness that remains largely hidden by this view. Once a quantizer has fixed its weights, rounding decisions, scales, zero points, and rotations, updating only the affine parameters of normalization layers can recover a large fraction of the remaining functional error. The same affine coordinates can also be adapted before PTQ, changing the response distribution presented to calibration. This raises a more basic question than how to design another quantizer: which parameter subspaces matter for correction, and should they act before PTQ, after PTQ, or on both sides?

To answer this question, we decompose the trainable state as Θ=(W,Φ,Ω)\Theta = (W, \Phi, \Omega), where WW denotes backbone weights, Φ\Phi normalization-affine parameters, and Ω\Omega quantizer parameters. We compare these subspaces under the same target quantized graph and matched optimization budgets, and study them through response analysis, controlled interventions, and task-aware error geometry. The evidence reveals that correction leverage is highly non-uniform: although Φ\Phi is orders of magnitude smaller than WW, each affine parameter broadcasts a channel-wise transformation across all tokens or spatial locations and can therefore redirect the response trajectory of many downstream layers. This leverage

∗^{*}Corresponding author.

is powerful but not unlimited. Affine adaptation can repair structured response mismatch and error propagation, but it cannot recreate information destroyed by severe clipping or rounding. Thus, functional recovery depends not simply on parameter count or feature reconstruction, but on whether the available subspace is aligned with the recoverable component of quantization error.

This finding motivates SANDWICHQUANT. For a base backend B\mathcal{B}, we first learn Φpre\Phi_{\text{pre}}, transfer only that affine state to the original dense checkpoint, and rerun PTQB\text{PTQ}_{\mathcal{B}} from scratch. We then freeze the completed low-bit graph and learn an independent Φpost\Phi_{\text{post}}. Thus Φpre→PTQB→Φpost\Phi_{\text{pre}} \to \text{PTQ}_{\mathcal{B}} \to \Phi_{\text{post}} separates distribution preconditioning from residual response correction. Both stages modify parameters already present in the network, adding neither an auxiliary inference branch nor a new deployment module. One-sided SANDWICHQUANT-PRE and SANDWICHQUANT-POST variants are retained as controlled components, rather than being reported as the complete method. Existing normalization tuning methods [26] demonstrate that affine parameters can improve quantized representations. However, they mainly treat normalization adaptation as a practical correction heuristic. In contrast, we study normalization affine parameters as one candidate subspace among the entire parameter space, establish matched-budget evidence against equally-sized weight subspaces, and analyze why this subspace has high correction leverage.

Our main contributions are:

• We formulate quantization correction over the coordinate groups W, Φ\Phi, and Ω\Omega, and show that, under the studied quantization settings, a substantial portion of recoverable quantization error can be addressed within the low-dimensional normalization-affine subspace.

• We explain this concentration through response propagation, same-budget subspace controls, functional interventions, and task-aware error geometry. The resulting picture separates correctable response mismatch from irreversible low-bit information loss.

• We introduce SANDWICHQUANT, a two-sided affine framework that combines quantization preconditioning with frozen-graph post-correction. Across three LLM families, multiple PTQ backends, weight-only W3A16, and joint W2A4KV4, the complete pipeline consistently lowers perplexity and improves mean zero-shot accuracy without introducing an additional inference-time module or operator.

References (55)

  • Intrinsic dimensionality explains the effectiveness of language model fine-tuning
  • QuaRot: Outlier-free 4-bit inference in rotated LLMs
  • BitFit: Simple parameter-efficient fine-tuning for transformer-based masked language models
  • LSQ+: Improving low-bit quantization through learnable offsets and better initialization
  • Training dynamics impact post-training quantization robustness
  • Sharp minima can generalize for deep nets
  • Learned step size quantization
  • Sharpness-aware minimization for efficiently improving generalization
  • Training batchnorm and only batchnorm: On the expressive power of random features in CNNs
  • GPTQ: Accurate post-training quantization for generative pre-trained transformers
  • Quantization without tears
  • Distilling the Knowledge in a Neural Network
  • Parameter-efficient transfer learning for NLP. In Proceedings of the 36th International Conference on Machine Learning, pages 2790–2799, 2019
  • LoRA: Low-rank adaptation of large language models
  • OSTQuant: Refining large language model quantization with orthogonal and scaling transformations for better distribution fitting
  • LS-ViT: Least-squares hessian based block reconstruction for low-bit post-training quantization of vision transformers
  • Batch normalization: Accelerating deep network training by reducing internal covariate shift
  • Averaging weights leads to wider optima and better generalization
  • Quantization and training of neural networks for efficient integer-arithmetic-only inference
  • AIQViT: Architecture-informed post-training quantization for vision transformers
  • On large-batch training for deep learning: Generalization gap and sharp minima
  • ASAM: Adaptive sharpness-aware minimization for scale-invariant learning of deep neural networks
  • Measuring the intrinsic dimension of objective landscapes
  • Norm tweaking: High-performance low-bit quantization of large language models
  • SVDQuant: Absorbing outliers by low-rank components for 4-bit diffusion models
  • Rethinking residual errors in compensation-based LLM quantization
  • BRECQ: Pushing the limit of post-training quantization by block reconstruction
  • MQBench: Towards reproducible and deployable model quantization benchmark
  • GPTAQ: Efficient finetuning-free quantization for asymmetric calibration
  • AWQ: Activation-aware weight quantization for on-device LLM compression and acceleration
  • SpinQuant: LLM quantization with learned rotations
  • Understanding the generalization benefit of normalization layers: Sharpness reduction
  • The Llama 3 Herd of Models
  • Normalization layers are all that sharpness-aware minimization needs
  • Data-free quantization through weight equalization and bias correction
  • Up or down? adaptive rounding for post-training quantization
  • Overcoming oscillations in quantization-aware training
  • Towards quantization-aware training for ultra-low-bit reasoning LLMs
  • Relative flatness and generalization
  • Qwen3 Technical Report
  • How does batch normalization help optimization? In Advances in Neural Information Processing Systems, volume 31, 2018
  • DartQuant: Efficient rotational distribution calibration for LLM quantization
  • FlatQuant: Flatness matters for LLM quantization
  • Llama 2: Open Foundation and Fine-Tuned Chat Models
  • Tent: Fully test-time adaptation by entropy minimization
  • QDrop: Randomly dropping quantization for extremely low-bit post-training quantization
  • FIMA-Q: Post-training quantization for vision transformers by fisher information matrix approximation
  • APHQ-ViT: Post-training quantization with average perturbation hessian based reconstruction for vision transformers
  • SmoothQuant: Accurate and efficient post-training quantization for large language models
  • QSCA: Quantization with self-compensating auxiliary for monocular depth estimation
  • Robust training of neural networks at arbitrary precision and sparsity
  • Root mean square layer normalization
  • Qronos: Correcting the past by shaping the future in post-training quantization
  • Fine-tuning happens in tiny subspaces: Exploring intrinsic task-specific subspaces of pre-trained language models
  • First-order error matters: Accurate compensation for quantized large language models