A NaN in the loss would point towards an overflow in the model.
Are you training the model from scratch and do you know, if the current config is converging properly in float32? Note that an exploding loss would cause NaN outputs in all numerical formats, but way earlier in float16 due to the smaller range compared to float32.