The amounts of data that need to be transmitted, processed, and stored by the modern deep neural networks have reached truly enormous volumes in the last few years calling for the invention of new paradigms both in hardware and software development. One of the most promising and rapidly advancing frontiers here is the creation of new data formats. In this work we focus on the family of block floating point numerical formats due to their combination of wide dynamic range, numerical accuracy, and efficient hardware implementation of inner products using simple integer arithmetic. These formats are characterized by a block of mantissas with a shared scale factor. The basic Block Floating Point (BFP) format quantizes the block scales into the nearest powers of two on the right. Its simple modification - Scaled BFP (SBFP) - stores the same scales in full precision and thus allows higher accuracy. In this paper, we study the statistical behavior of both these formats rigorously. We develop asymptotic bounds on the inner product error in SBFP- and BFP-quantized normally distributed vectors. Next, we refine those asymptotic results to finite dimensional settings and derive high-dimensional tight bounds for the same errors. Based on the obtained results we introduce a performance metric assessing accuracy of any block format. This metric allows us to determine the optimal parameters, such as the block size, yielding highest accuracy. In particular, we show that if the precision of the BFP format is fixed at 4 bits, the optimal block size becomes 64. All theoretical derivations are supported by numerical experiments and studies on the weights of publicly available pretrained neural networks.
翻译:需要由现代深度神经网络传输、处理和储存的数据数量在过去几年里达到了真正巨大的数量,要求发明硬件和软件开发方面的新范例。在这里最有希望和迅速推进的前沿之一是创建新的数据格式。在这项工作中,我们侧重于块浮点数字格式的组合,因为它们具有广泛的动态范围、数字准确性以及使用简单的全数算术对内产品高效硬件实施。这些格式的特点是一组带有共同比例系数的曼蒂萨。基本布林浮点(BFP)格式将块规模量化成最接近的二号数字实验。它简单的修改-缩放的BFP(SFP)-完全精确地储存相同的尺度,从而能够提高准确性。在本文中,我们严格地研究这两种格式的统计行为。我们在SBFP-和BFP-光度通常分布的矢量中,将那些块规模的缩放结果改进到最接近的基数级数,如果我们获得的精确度定度的深度设置,则通过我们方位的精确度的精确度的精确度来公开评估。