maskbit
maskbit copied to clipboard
16bit mixed precision & bf16
What is your experience with lower precisions like mixed fp16 or bf16 ? Does this affect the perfomance drastically?
I didn't experiment with fp16/bf16 a lot in the final stages of this project, so I can't really say.
Instead we use is TF32, which is 19bit I think. You can read more on this here: https://blogs.nvidia.com/blog/tensorfloat-32-precision-format/
It is enabled in our codecase as follows:
# Enable TF32 on Ampere GPUs
if config.training.enable_tf32:
torch.backends.cuda.matmul.allow_tf32 = True
torch.backends.cudnn.benchmark = True
torch.backends.cudnn.deterministic = False
okay thanks!