.. _generation:

====================
torchtune.generation
====================

.. currentmodule:: torchtune.generation

.. autosummary::
    :toctree: generated/
    :nosignatures:

    generate
    generate_next_token
    sample
    get_causal_mask_from_padding_mask
    get_position_ids_from_padding_mask