Quantization reduces the model's hardware costs, such as data movement, storage, and operations like multiply and addition. It also affects the model's behavior by degrading the output quality. Therefore, there is a need for methods that preserve the model's behavior when quantizing model parameters. More exotic numerical encodings, such as block-scaled number formats, have shown advantages for utilizing a fixed bit budget to encode model parameters. This paper presents error diffusion (ED), a hyperparameter-free method for post-training quantization with support for block-scaled data formats. Our approach does not rely on backpropagation or Hessian information. We describe how to improve the quantization process by viewing the neural model as a composite function and diffusing the quantization error in every layer. In addition, we introduce TensorCast, an open-source library based on PyTorch to emulate a variety of number formats, including the block-scaled ones, to aid the research in neural model quantization. We demonstrate the efficacy of our algorithm through rigorous testing on various architectures, including vision and large language models (LLMs), where it consistently delivers competitive results. Our experiments confirm that block-scaled data formats provide a robust choice for post-training quantization and could be used effectively to enhance the practical deployment of advanced neural networks.
A Comprehensive Evaluation on Quantization Techniques for Large Language Models
School of Computer Science and Technology, Tongji University(同济大学计算机科学与技术学院);School of Engineering Math and Technology, University of Bristol(布里斯托大学工程数学与技术学院)
OScaR: The Occam's Razor for Extreme KV Cache Quantization in LLMs and Beyond
Tsinghua University(清华大学);Meituan LongCat Team(美团LongCat团队);The University of Hong Kong(香港大学);The University of Edinburgh(爱丁堡大学);UCAS(中国科学技术大学);The Hong Kong Polytechnic University(香港理工大学)
P3-LLM: An Integrated NPU-PIM Accelerator for Edge LLM Inference Using Hybrid Numerical Formats
Department of Electrical and Computer Engineering, Cornell University(康奈尔大学电气与计算机工程系);EAST-MICAS, KU Leuven(KU莱顿大学EAST-MICAS);Department of Electrical Engineering, Stanford University(斯坦福大学电气工程系)
AHCQ-SAM: Toward Accurate and Hardware-Compatible Post-Training Segment Anything Model Quantization
Department of Electronics and Electrical Engineering, Keio University(庆应义塾大学电子与电气工程系);School of Computer Science and Technology, Hainan University(海南大学计算机科学与技术学院);Key Laboratory of Multimedia Trusted Perception and Efficient Computing, Ministry of Education of China, Xiamen University(厦门大学多媒体可信感知与高效计算教育部重点实验室)
Layer-Wise High-Impact Parameter Ratio Optimization in Post-Training Quantization for Large Language Models
Department of Data Science and AI, Monash University, Australia(墨尔本大学数据科学与人工智能系);Centre for Vision, Speech and Signal Processing, University of Surrey, UK(萨里大学视觉、语音与信号处理中心)
Block Rotation is All You Need for MXFP4 Quantization
Nanjing University of Science and Technology(南京理工大学);School of Artificial Intelligence, University of Chinese Academy of Sciences(中国科学院大学人工智能学院);Zhongguancun Academy(中关村学院);School of Computer Science, University of Sydney(悉尼大学计算机科学学院)
LGQ: Learnable Geometric Quantization for Image Tokenization
Luddy School of Informatics, Computing and Engineering, Indiana University Bloomington(印第安纳大学布卢明顿分校信息学、计算与工程学院);Department of Computer Science, University of Illinois Springfield(伊利诺伊大学斯普林菲尔德分校计算机科学系);College of Science and Engineering, Hamad Bin Khalifa University, Doha, Qatar(哈马德·本·卡伊夫大学多哈校区科学与工程学院)
Shedding the Bits: Pushing the Boundaries of Quantization with Minifloats on FPGAs
School of Computing, National University of Singapore(新加坡国立大学计算机学院);AMD Research and Advanced Development(AMD研究与高级开发部);Tampere University(坦佩雷大学);AMD(AMD公司)
Achieving binary weight and activation for LLMs using Post-Training Quantization
MAIS, Institute of Automation, Chinese Academy of Sciences(自动化研究所,中国科学院);School of Artificial Intelligence, University of Chinese Academy of Sciences(中国科学院大学人工智能学院);Central Media Technology Institute, Huawei Technologies Ltd.(华为技术有限公司媒体技术研究所)
AMD(超威半导体公司);Fermi National Accelerator Laboratory(费米国家加速器实验室);Massachusetts Institute of Technology(麻省理工学院);European Organization for Nuclear Research (CERN)(欧洲核子研究组织(CERN));Heidelberg University(海德堡大学);Harvard University(哈佛大学);University of Washington(华盛顿大学)