Hacker News new | ask | show | jobs
by ekelsen 25 days ago
There's a reason we keep around an fp32 copy of the weights?

This issue was recognized a decade ago when we first started training with fp16.

1 comments

Thanks for the comment - you're right, of course.

I read a bit more into the history of fp32 master copies, like in Mixed Precision Training (Micikevicius et al., ICLR 2018, https://arxiv.org/abs/1710.03740), it says that an fp16 update is lost once the weight is ~2048× larger than it. I've updated the post with a citation to that paper.

bf16's shorter mantissa moves that to ~512×, which is significant.

The point of the post is narrower: a lot of published fine-tuning code doesn't keep a master copy at all. So what does that do? It gives you a magnitude mask where only the smallest weights (those under 512xlr) are updating. Which I thought was an interesting inductive bias that wasn't really noted.

I think the finding that lots of people are ignoring best practices and it's working anyway due to a mechanism those authors didn't intend or realise is cool!

The title and a skim of the beginning didn't give me an idea that's where the article was going and I stopped reading further at first.

That's useful feedback. I added introductory material in response to feedback from a colleague, but I suppose that didn't help "get to the point". I think the audience for my work is experts + experience practitioners, so the accessibility / novelty tradeoff was not a good one.