Block floating point explained

Block floating point (BFP) is a method used to provide an arithmetic approaching floating point while using a fixed-point processor. BFP assigns a group of significands (the non-exponent part of the floating-point number) to a single exponent, rather than single significand being assigned its own exponent. BFP can be advantageous to limit space use in hardware to perform the same functions as floating-point algorithms, by reusing the exponent; some operations over multiple values between blocks can also be done with a reduced amount of computation.

The common exponent is found by data with the largest amplitude in the block. To find the value of the exponent, the number of leading zeros must be found (count leading zeros). For this to be done, the number of left shifts needed for the data must be normalized to the dynamic range of the processor used. Some processors have means to find this out themselves, such as exponent detection and normalization instructions.

Block floating-point algorithms were extensively studied by James Hardy Wilkinson.

BFP can be recreated in software for smaller performance gains.

Microscaling (MX) Formats

Microscaling (MX) formats are a type of Block Floating Point (BFP) data format specifically designed for AI and machine learning workloads. The MX format, endorsed and standardized by major industry players such as AMD, Arm, Intel, Meta, Microsoft, NVIDIA, and Qualcomm, represents a significant advancement in narrow precision data formats for AI.[1] [2] [3]

The MX format uses a single shared scaling factor (exponent) for a block of elements, significantly reducing the memory footprint and computational resources required for AI operations. Each block of k elements shares this common scaling factor, which is stored separately from the individual elements.

The initial MX specification introduces several specific formats, including MXFP8, MXFP6, MXFP4, and MXINT8. These formats support various precision levels:

MX formats have been demonstrated to be effective in a variety of AI tasks, including large language models (LLMs), image classification, speech recognition and recommendation systems.[4] For instance, MXFP6 closely matches FP32 for inference tasks after quantization-aware fine-tuning, and MXFP4 can be used for training generative language models with only a minor accuracy penalty.

The MX format has been standardized through the Open Compute Project (OCP) as Microscaling Formats (MX) Specification v1.0. An emulation libraries also has been published to provide details on the data science approach and select results of MX in action.

Hardware support

The following hardware supports BFP operations:

See also

Further reading

Notes and References

  1. Web site: Open Compute Project . 2024-06-03 . Open Compute Project . en.
  2. Rouhani . Bita Darvish . Microscaling Data Formats for Deep Learning . 2023-10-19 . 2310.10537 . Zhao . Ritchie . More . Ankit . Hall . Mathew . Khodamoradi . Alireza . Deng . Summer . Choudhary . Dhruv . Cornea . Marius . Dellinger . Eric. cs.LG .
  3. Web site: D'Sa . Rani Borkar, Reynold . 2023-10-17 . Fostering AI infrastructure advancements through standardization . 2024-06-03 . Microsoft Azure Blog . en-US.
  4. Rouhani . Bita . With Shared Microexponents, A Little Shifting Goes a Long Way . 2023-04-12 . 2302.08007 . Zhao . Ritchie . Elango . Venmugil . Shafipour . Rasoul . Hall . Mathew . Mesmakhosroshahi . Maral . More . Ankit . Melnick . Levi . Golub . Maximilian. cs.LG .
  5. Web site: Clarke . Peter . 2023-08-28 . Chiplet-base generative AI platform raises LLM performance . 2024-04-23 . eeNews Europe . en-US.
  6. [SPCL_Bcast] A chiplet based generative inference architecture with block floating point datatypes ]. en . 2024-04-23 . www.youtube.com.
  7. Web site: Tenstorrent AI Accelerators .
  8. Web site: Bonshor . Gavin . AMD Announces The Ryzen AI 300 Series For Mobile: Zen 5 With RDNA 3.5, and XDNA2 NPU With 50 TOPS . 2024-06-03 . www.anandtech.com.
  9. Web site: 2024-06-02 . AMD Extends AI and High-Performance Leadership in Data Center and PCs with New AMD Instinct, Ryzen and EPYC Processors at Computex 2024 . 2024-06-03 . Advanced Micro Devices, Inc. . en.