Skip to content

Research Articles

Quantizer Calibration under Distribution Shift: Heterogeneous Partitions

Hana Vesperwick (Machine Learning Laboratory, Eastmarsh Institute for Applied Computing), Imani Wrenford (Machine Learning Laboratory, Kestrelby Institute of Technology), Anika Oakhaven (Machine Learning Laboratory, Eastmarsh Institute for Applied Computing), Kian Saltmere (Machine Learning Laboratory, Eastmarsh Institute for Applied Computing), Kenji Crestmere (Machine Learning Laboratory, Glenwick University)

Vol. 7 No. 1 (2023) · pp. 58–70 · Published 5 March 2023

Abstract

For a collection of partitions with different input and resource profiles, we construct a synthetic comparison between choosing activation clipping thresholds from separate calibration strata and a single threshold derived from pooled inputs. Each configuration is evaluated on the same 240 cases. In the 60 stress cases, activation outliers must become more frequent after calibration; held-out partitions are selected before configuration so that tuning cannot target their particular failure cases. A case counts as a pass only if it meets this criterion: quantized predictions must stay within the declared error tolerance on each stratum. The comparison holds the training and selection splits fixed across alternatives; evaluation cases are not reused for tuning. Compute or memory assigned to an alternative counts toward its budget even if training does not finish. Across the full set, 183 cases meet the criterion with the first configuration and 174 with the second. The stress cases account for 43 and 33 passes, respectively. The stress results should be read alongside the full-set results rather than treated as a general performance guarantee. The practical trade-off is that wider clipping intervals preserve outliers but allocate fewer levels to common values. The paired design makes the comparison interpretable within the fixture. It does not establish the size of the effect in an independent deployment.

Keywords: quantization, activation ranges, robustness, heterogeneous partitions, synthetic evaluation

References

  1. Bhojanapalli, S., Chakrabarti, A., Glasner, D., Li, D., Unterthiner, T., & Veit, A. (2021). Understanding robustness of transformers for image classification. Proceedings of the IEEE/CVF International Conference on Computer Vision, 10231–10241.
  2. Carlini, N., & Wagner, D. (2017). Towards evaluating the robustness of neural networks. Proceedings of the 2017 IEEE Symposium on Security and Privacy, 39–57.
  3. Frantar, E., Ashkboos, S., Hoefler, T., & Alistarh, D. (2022). GPTQ: Accurate post-training quantization for generative pre-trained transformers. arXiv:2210.17323.
  4. Hendrycks, D., & Dietterich, T. (2019). Benchmarking neural network robustness to common corruptions and perturbations. International Conference on Learning Representations.
  5. Hendrycks, D., & Dietterich, T. G. (2018). Benchmarking neural network robustness to common corruptions and surface variations. arXiv:1807.01697.
  6. Jiang, Z., Araki, J., Ding, H., & Neubig, G. (2021). How can we know when language models know? On the calibration of language models for question answering. Transactions of the Association for Computational Linguistics, 9, 962–977.
  7. Korthikanti, V., et al. (2022). Reducing activation recomputation in large transformer models. arXiv:2205.05198.
  8. Liu, E. Z., et al. (2021). Just train twice: Improving group robustness without training group information. Proceedings of the 38th International Conference on Machine Learning, 6781–6792.
  9. Nagel, M., Fournarakis, M., Amjad, R. A., Bondarenko, Y., van Baalen, M., & Blankevoort, T. (2021). A white paper on neural network quantization. arXiv:2106.08295.
  10. Shen, S., et al. (2019). Q-BERT: Hessian based ultra low precision quantization of BERT. arXiv:1909.05840.
  11. Shrikumar, A., Greenside, P., & Kundaje, A. (2017). Learning important features through propagating activation differences. Proceedings of the 34th International Conference on Machine Learning, 3145–3153.
  12. Song, Y., & Ermon, S. (2019). Generative modeling by estimating gradients of the data distribution. Advances in Neural Information Processing Systems, 32, 11918–11930.
  13. Xiao, G., Lin, J., Seznec, M., Demouth, J., & Han, S. (2022). SmoothQuant: Accurate and efficient post-training quantization for large language models. arXiv:2211.10438.
  14. Yao, Z., et al. (2022). ZeroQuant: Efficient and affordable post-training quantization for large-scale transformers. Advances in Neural Information Processing Systems, 35, 27168–27183.