English

SAMP: A Model Inference Toolkit of Post-Training Quantization for Text Processing via Self-Adaptive Mixed-Precision

Machine Learning 2023-12-19 v2 Computation and Language

Abstract

The latest industrial inference engines, such as FasterTransformer and TurboTransformers, have verified that half-precision floating point (FP16) and 8-bit integer (INT8) quantization can greatly improve model inference speed. However, the existing INT8 quantization methods are too complicated, and improper usage will lead to model performance damage greatly. In this paper, we develop a toolkit for users to easily quantize their models for inference, in which Self-Adaptive Mixed-Precision (SAMP) is proposed to automatically control quantization rate by a mixed-precision architecture to balance model accuracy and efficiency. Experimental results show that our SAMP toolkit has a higher speedup than PyTorch and FasterTransformer while ensuring the required accuracy. In addition, SAMP is based on a modular design, decoupling the tokenizer, embedding, encoder and target layers, which allows users to handle various downstream tasks and can be seamlessly integrated into PyTorch.

Keywords

Cite

@article{arxiv.2209.09130,
  title  = {SAMP: A Model Inference Toolkit of Post-Training Quantization for Text Processing via Self-Adaptive Mixed-Precision},
  author = {Rong Tian and Zijing Zhao and Weijie Liu and Haoyan Liu and Weiquan Mao and Zhe Zhao and Kan Zhou},
  journal= {arXiv preprint arXiv:2209.09130},
  year   = {2023}
}

Comments

This paper was accepted by EMNLP2023

R2 v1 2026-06-28T01:40:08.465Z