bfloat16(也常写作 BF16)是一种 16 位浮点数格式,常用于机器学习训练与推理。它的特点是:保留与 32 位浮点数(FP32)相同的指数位宽(动态范围大),但尾数精度较低,因此在许多深度学习计算中能在较小内存与更高速度下保持较稳定的数值范围。
/ˈbiːfloʊt sɪkˈstiːn/
Bfloat16 is widely used to speed up deep learning training.
bfloat16 被广泛用于加速深度学习训练。
By storing activations in bfloat16 while accumulating in fp32, the model can train faster without losing too much accuracy.
将激活值以 bfloat16 存储、同时用 fp32 做累加,模型通常能在不过多损失精度的情况下更快训练。
bfloat16 中的 “b” 通常被解释为 “brain”(与早期面向神经网络/“大脑”计算的语境相关),整体可理解为 “brain floating point 16”。该格式与 Google 的 TPU 生态及深度学习加速实践关系密切,设计目标是在硬件上以较低成本支持大规模神经网络计算。