Skip to content

Research Articles

Quantizer Calibration under Distribution Shift: Concurrent Changes

Dario Ivermere (Machine Learning Laboratory, Ivermere University), Beatriz Larchvale (Machine Learning Laboratory, Cairnwell Research Institute), Dario Alderwick (Machine Learning Laboratory, Ivermere University), Devon Alderwick (Machine Learning Laboratory, Ivermere University), Rowan Brookvala (Machine Learning Laboratory, Kestrelby Institute of Technology)

Vol. 8 No. 1 (2024) · pp. 29–42 · Published 4 May 2024

Abstract

The comparison uses a test fixture with overlapping transitions to evaluate two choices: choosing activation clipping thresholds from separate calibration strata and a single threshold derived from pooled inputs. All outcomes are synthetic. Each configuration is evaluated on the same 256 cases. In the 64 stress cases, activation outliers must become more frequent after calibration; both changes are replayed together as well as separately to distinguish an interaction from an isolated error. 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. The comparator passes 182 of 256 cases and the alternative passes 195. For the 64 stress cases alone, the counts are 37 and 47, respectively. The aggregate count does not establish that the alternative is preferable at every operating point. The practical trade-off is that wider clipping intervals preserve outliers but allocate fewer levels to common values. The result describes the chosen case mix. Before applying the finding, a follow-up benchmark would need to vary the share of difficult cases without relaxing the acceptance criteria.

Keywords: quantization, activation ranges, robustness, concurrent changes, 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. Chee, J., Cai, Y., Kuleshov, V., & De Sa, C. (2023). QuIP: 2-bit quantization of large language models with guarantees. arXiv:2307.13304.
  3. Frantar, E., Ashkboos, S., Hoefler, T., & Alistarh, D. (2023). GPTQ: Accurate post-training quantization for generative pre-trained transformers. International Conference on Learning Representations.
  4. 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.
  5. Korthikanti, V., et al. (2022). Reducing activation recomputation in large transformer models. arXiv:2205.05198.
  6. Larochelle, H., & Murray, I. (2011). The neural autoregressive distribution estimator. Proceedings of the 14th International Conference on Artificial Intelligence and Statistics, 29–37.
  7. Lin, J., Tang, J., Tang, H., Yang, S., Dang, X., & Han, S. (2023). AWQ: Activation-aware weight quantization for LLM compression and acceleration. arXiv:2306.00978v1. Source
  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. Panickssery, N., Gabrieli, N., Schulz, J., Tong, M., Hubinger, E., & Turner, A. M. (2023). Steering Llama 2 via contrastive activation addition. arXiv:2312.06681.
  11. Shen, S., et al. (2019). Q-BERT: Hessian based ultra low precision quantization of BERT. arXiv:1909.05840.
  12. Tian, K., et al. (2023). Just ask for calibration: Strategies for eliciting calibrated confidence scores from language models fine-tuned with human feedback. Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing, 5433–5442.
  13. Turner, A. M., et al. (2023). Activation addition: Steering language models without optimization. arXiv:2308.10248.
  14. Xiao, G., Lin, J., Seznec, M., Wu, H., Demouth, J., & Han, S. (2023). SmoothQuant: Accurate and efficient post-training quantization for large language models. Proceedings of the 40th International Conference on Machine Learning, PMLR 202, 38087–38099. Source
  15. 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.