In Defense of Pure 16-Bit Floating-Point Neural Networks
As a practitioner specializing in extremely fast-training neural networks, seeing a paper in 2023 considering fp32 as a gold standard over pure non-mixed fp16&#x2F;bp16 is a bit shocking to me and feels dated&#x2F;distracting from the discussion. They make good points but unless I am hopelessly misinformed, it&#x27;s been pretty well established at this point in a number of circles that fp32 is overkill for the majority of uses for many modern-day practitioners. Loads of networks train directly in bfloat16 as the standard -- a lot of the modern LLMs among them. Mixed precision is very much no longer needed, not even with fp16 if you&#x27;re willing to tolerate some range hacks. If you don&#x27;t want the range hacks, just use bfloat16 directly. The complexity is not worth it, adds not much at all, and the dynamic loss scaler a lot of people use is just begging for more issues.<p>Both of the main repos that I&#x27;ve published in terms of speed benchmarks train directly in pure fp16 and bf16 respectively without any fp32 frippery, if you want to see an example of both paradigms successfully feel free to take a look (I&#x27;ll note that bf16 is simpler on the whole for a few reasons, generally seamless): <a href="https:&#x2F;&#x2F;github.com&#x2F;tysam-code&#x2F;hlb-CIFAR10">https:&#x2F;&#x2F;github.com&#x2F;tysam-code&#x2F;hlb-CIFAR10</a> [for fp16] and <a href="https:&#x2F;&#x2F;github.com&#x2F;tysam-code&#x2F;hlb-gpt">https:&#x2F;&#x2F;github.com&#x2F;tysam-code&#x2F;hlb-gpt</a> [for bf16]<p>Personally from my experience, I think fp16&#x2F;bf16 is honestly a bit too expressive for what we need, fp8 seems to do just fine and I think will be quite alright with some accommodations, just as with pure fp16. The what and the how of that is a story for a different day (and at this point, the max pooling operation is basically one of the slowest now).<p>You&#x27;ll have to excuse my frustration a bit, it just is a bit jarring to see a streetsign from way in the past fly forward in the wind to hit you in the face before tumbling on its merry way. And additionally in the comment section the general discussion doesn&#x27;t seem to talk about what seems to be a pretty clearly-established consensus in certain research circles. It&#x27;s not really too much of a debate anymore, it works and we&#x27;re off to bigger and better problems that I think we should talk about. I guess in one sense it does justify the paper&#x27;s utility, but also a bit frustrating because it normalizes the conversation as a few notches back from where I personally feel that it actually is at the moment.<p>We&#x27;ve got to move out of the past, this fp32 business to me personally is like writing a Relu-activated VGG network in Keras on Tensorflow. Phew.<p>And while we&#x27;re at it, if I shall throw my frumpy-grumpy hat right back into the ring, this is an information-theoretic problem! Not enough discussion of Shannon and co. Let&#x27;s please fix that too. See my other rants for x-references to that, should you be so-inclined to punish yourself in that manner.