[Generate Docs] Correct docs (#16133)
* [Generate Docs] Correct docs * Apply suggestions from code review Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com> Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
632ff3c39e
commit
8a96b0f10a
@@ -12,12 +12,13 @@ specific language governing permissions and limitations under the License.
|
|||||||
|
|
||||||
# Generation
|
# 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.
|
Each framework has a generate method for auto-regressive text generation implemented in their respective `GenerationMixin` class:
|
||||||
|
|
||||||
The `GenerationMixin` classes are inherited by the corresponding base model classes, *e.g.* [`PreTrainedModel`], [`TFPreTrainedModel`], and [`FlaxPreTrainedModel`] respectively, therefore exposing all
|
- PyTorch [`~generation_utils.GenerationMixin.generate`] is implemented in [`~generation_utils.GenerationMixin`].
|
||||||
methods for auto-regressive text generation to every model class.
|
- TensorFlow [`~generation_tf_utils.TFGenerationMixin.generate`] is implemented in [`~generation_tf_utils.TFGenerationMixin`].
|
||||||
|
- Flax/JAX [`~generation_flax_utils.FlaxGenerationMixin.generate`] is implemented in [`~generation_flax_utils.FlaxGenerationMixin`].
|
||||||
|
|
||||||
## GenerationMixn
|
## GenerationMixin
|
||||||
|
|
||||||
[[autodoc]] generation_utils.GenerationMixin
|
[[autodoc]] generation_utils.GenerationMixin
|
||||||
- generate
|
- generate
|
||||||
@@ -28,12 +29,12 @@ methods for auto-regressive text generation to every model class.
|
|||||||
- group_beam_search
|
- group_beam_search
|
||||||
- constrained_beam_search
|
- constrained_beam_search
|
||||||
|
|
||||||
## TFGenerationMixn
|
## TFGenerationMixin
|
||||||
|
|
||||||
[[autodoc]] generation_tf_utils.TFGenerationMixin
|
[[autodoc]] generation_tf_utils.TFGenerationMixin
|
||||||
- generate
|
- generate
|
||||||
|
|
||||||
## FlaxGenerationMixn
|
## FlaxGenerationMixin
|
||||||
|
|
||||||
[[autodoc]] generation_flax_utils.FlaxGenerationMixin
|
[[autodoc]] generation_flax_utils.FlaxGenerationMixin
|
||||||
- generate
|
- generate
|
||||||
|
|||||||
Reference in New Issue
Block a user