<commit_before>.. testsetup:: *

    from pytorch_lightning.trainer.trainer import Trainer


16-bit training
=================
Lightning offers 16-bit training for CPUs, GPUs and TPUs.

GPU 16-bit
-----------
16 bit precision can cut your memory footprint by half.
If using volta architecture GPUs it can give a dramatic training speed-up as well.

.. note:: PyTorch 1.6+ is recommended for 16-bit

Native torch
^^^^^^^^^^^^
When using PyTorch 1.6+ Lightning uses the native amp implementation to support 16-bit.

.. testcode::

    # turn on 16-bit
    trainer = Trainer(precision=16)

Apex 16-bit
^^^^^^^^^^^
If you are using an earlier version of PyTorch Lightnign uses Apex to support 16-bit.
<commit_msg>lightning typo (#2228)<commit_after>.. testsetup:: *

    from pytorch_lightning.trainer.trainer import Trainer


16-bit training
=================
Lightning offers 16-bit training for CPUs, GPUs and TPUs.

GPU 16-bit
-----------
16 bit precision can cut your memory footprint by half.
If using volta architecture GPUs it can give a dramatic training speed-up as well.

.. note:: PyTorch 1.6+ is recommended for 16-bit

Native torch
^^^^^^^^^^^^
When using PyTorch 1.6+ Lightning uses the native amp implementation to support 16-bit.

.. testcode::

    # turn on 16-bit
    trainer = Trainer(precision=16)

Apex 16-bit
^^^^^^^^^^^
If you are using an earlier version of PyTorch Lightning uses Apex to support 16-bit.

{'fraction_non_alphanumeric': 0.1324456902592852, 'fraction_numerical': 0.036440084092501754, 'mean_word_length': 3.621359223300971, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3700967', 'n_tokens_mistral': 484, 'n_tokens_neox': 424, 'n_words': 178}