Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions docs/source-pytorch/common/precision_basic.rst
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,14 @@ However, this setting can sometimes lead to unstable training.
Trainer(precision="16-true")
.. warning::

Float16 cannot represent values smaller than ~6e-5. Values like Adam's default ``eps=1e-8`` become zero, which can cause
NaN during training. Increase ``eps`` to 1e-4 or higher, and avoid extremely small values in your model weights and data.

.. note::

BFloat16 (``"bf16-mixed"`` or ``"bf16-true"``) has better numerical stability with a wider dynamic range.

----

Expand Down
Loading