4-bit floating point FP4

https://www.johndcook.com/blog/2026/04/17/fp4/

Article

  • Explains FP4 floating point format: 1 sign, 2 exponent, 1 mantissa bit
  • Covers trade-offs: no NaN/Inf support in basic variants; very limited precision
  • Relevant to LLM quantization (NVFP4, MXFP4 formats)

Discussion

  • Commenters note FP4 lacks NaN/Inf; suggest palette/lookup-table approach instead
  • Discussion of minifloats history and x87 80-bit legacy
  • One commenter notes this was an April Fools joke format nine years ago

Discuss on HN


Type Link
Added Apr 20, 2026
Modified Apr 20, 2026