# Generation The methods for auto-regressive text generation, namely [`~generation_utils.GenerationMixin.generate`] (for the PyTorch models), [`~generation_tf_utils.TFGenerationMixin.generate`] (for the TensorFlow models) and [`~generation_flax_utils.FlaxGenerationMixin.generate`] (for the Flax/JAX models), are implemented in [`~generation_utils.GenerationMixin`], [`~generation_tf_utils.TFGenerationMixin`] and [`~generation_flax_utils.FlaxGenerationMixin`] respectively. The `GenerationMixin` classes are inherited by the corresponding base model classes, *e.g.* [`PreTrainedModel`], [`TFPreTrainedModel`], and [`FlaxPreTrainedModel`] respectively, therefore exposing all methods for auto-regressive text generation to every model class. ## GenerationMixn [[autodoc]] generation_utils.GenerationMixin - generate - greedy_search - sample - beam_search - beam_sample - group_beam_search - constrained_beam_search ## TFGenerationMixn [[autodoc]] generation_tf_utils.TFGenerationMixin - generate ## FlaxGenerationMixn [[autodoc]] generation_flax_utils.FlaxGenerationMixin - generate