Unofficial Hacker News companion — get notified on comment replies, and more.

FP64 Is All You Want, INT8 Is All You Need, FP4/6/8 Is All You Have (opens external site)

249 points by peter_d_sherman 3 days ago | arxiv.org | 61 comments on HN | Vote on HN (opens Hacker News) |

View full thread · View on Hacker News

Comment thread (11)

  1. Yikes. Is this paper supposed to be read by humans or agents? Seems like the authors spent very little time doing any kind of readability checks. The results do look super impressive though. can anyone more in the know on why one wants fp64 matmuls in practice? Iiuc doing it at low bit and aggregating into bf16 was good enough eg when computing dot products even on pretty long vectors.
    Replies (4)
    1. Don't judge based only on LLMs. They are a special case coming from having a good amount of compression bias baked into their design. There are heaps of applications in scientific computing where you really need fp64 matmuls. The biggest issue comes with ill-conditioned matrices, where a low-precision matmul can cause catastrophic cancellation.
    2. In my corner of physics, the biggest theory breakthrough came from abandoning fp128 quad-precision and going to arbitrary precision libraries with tens to hundreds of (decimal!) digits.
      Replies (2)
      1. Sounds like something was wrong with the way the theory was realized in software.
        Replies (2)
        1. COBOL compilers rely on arbitrary precision, and GNU COBOL links in GNU MP to achieve it.

          https://archive.ph/K2TX3

          Replies (1)
          1. cobol has _fixed_ arbitrary precision, BCD encoded arbitrary fixed size numbers.

            they happened to use gnu MP, yes, but for cobol, dynamic arbitrary float precision or "never overflow" ints are not the point.

        2. Well yeah, but it sounds like what was wrong was the level of precision used. It's not always possible to work around numerical issues arising from finite precision.
      2. Say more! :-)
        Replies (1)
        1. The challenge is to calculate properties of three-body atomic or molecular systems (He, Li+, H2+,...) with extreme precision to allow comparisons with accurate measurements (we are doing such measurements). The starting point is to solve the Schrödinger equation, but in the three-body case, this is not possible analytically. This is one of the oldest problems in computational quantum mechanics, and the first numerical results were worked out already in 1928 by Hylleraas. It turns out that the approaches with the best convergence properties tend to be numerically unstable. The modern solution is to simply power through these numerical problems using arbitrary precision libraries with tons of digits.
    3. Unlike ML/AI computations, any not too simple physical model requires computations with an FP64 precision, and sometimes even higher. For input and output experimental data, FP32 is normally enough, but any arithmetic operations done with such FP32 input data would lose information unless they are done with FP64.

      Not only the precision must be around that of FP64, but also the exponent range must be wide enough to make unlikely overflows and underflows, which is a condition not satisfied by FP32.

      Sometimes it is possible to use mixed precision, i.e. to do some computations with FP64 and others with FP32, but the right combination varies from a problem to another and a lot of work is necessary to determine an optimum distribution of the computations over the different precisions. It is much easier to use FP64 everywhere.

      In electronics, where one frequently has to solve systems of the so-called "stiff" ordinary differential equations (e.g. in SPICE analyses), using numbers with insufficient precision frequently either prevents convergence or leads to "hallucinated" incorrect solutions.

      The idea frequently pushed by those who try to support NVIDIA and its followers, that one should find an approximate solution in FP32, which should do most of the work, and then the accuracy of that solution should be improved with FP64 with a little additional work, frequently fails for electronics problems and other stiff problems, because the low-precision computations may converge to a different solution, whose improvement does not lead to the correct solution obtained with high-precision computations.

    4. > Is this paper supposed to be read by humans or agents?

      That question is going to be increasingly relevant. And some will be intentionally written not for humans.

      I often just pass the paper to agent and ask it to make me what the paper describes.