arXiv · 2306.06965
NF4 Isn't Information Theoretically Optimal (and that's Good)
Abstract
This note shares some simple calculations and experiments related to absmax-based blockwise quantization, as used in Dettmers et al., 2023. Their proposed NF4 data type is said to be information theoretically optimal for representing normally distributed weights. I show that this can't quite be the case, as the distribution of the values to be quantized depends on the block-size. I attempt to apply these insights to derive an improved code based on minimizing the expected L1 reconstruction error, rather than the quantile based method. This leads to improved performance for larger quantization block sizes, while both codes perform similarly at smaller block sizes.
Explore related subjects
Keep this discovery
Davis Yoshida. 2023-06-12. NF4 Isn't Information Theoretically Optimal (and that's Good). https://arxiv.org/abs/2306.06965
Cite the original work for its findings. Save a collection to share your selection of sources.