Computer Arithmetic

How are the two FP8 formats, E4M3 (4 exponent, 3 significand bits) and E5M2 (5 exponent, 2 significand bits), usually used?

  1. AE4M3 for weights and activations, E5M2 for gradients
  2. BBoth have the same precision and range, so they are used interchangeably
  3. CE4M3 is used as an integer and E5M2 as a floating-point number
Show answer and explanation

Answer: A. E4M3 for weights and activations, E5M2 for gradients

How the scarce 8 bits are split between exponent and significand determines the format's character. E4M3 has one more significand bit, giving more precision but less range; E5M2 has one more exponent bit, giving more range but less precision. E4M3 is therefore typically used for weights and activations, whose magnitudes are fairly uniform, and E5M2 for gradients, whose magnitudes vary widely. Both are floating-point formats, not integers.

  • A. Correct. E4M3 for precision and E5M2 for range.
  • B. The exponent–significand split differs, so precision and range differ.
  • C. Both are floating-point formats.
Practice this topic Back to topic

More Computer Arithmetic questions

  1. In AI inference, what is the main benefit of converting (quantizing) weights from FP32 to INT8?
  2. Data ranging from −6.35 to 6.35 is quantized to symmetric INT8 (−127 to 127) centered at zero, with scale = maximum absolute value ÷ 127. Which integer represents 1.0?
  3. Why is fixed-point rather than floating-point arithmetic often used in small microcontrollers and DSPs?
  4. Which gives the resolution and range of the 16-bit signed fixed-point Q15 format (15 fraction bits)?
  5. When two fixed-point numbers with 8 fraction bits are multiplied using an integer multiplier, how should the result be handled?