Docs: fix generate-related rendering issues (#30600)
* does this work? * like this? * fix the other generate links * missing these
This commit is contained in:
@@ -21,7 +21,7 @@ more. It also plays a role in a variety of mixed-modality applications that have
|
||||
and vision-to-text. Some of the models that can generate text include
|
||||
GPT2, XLNet, OpenAI GPT, CTRL, TransformerXL, XLM, Bart, T5, GIT, Whisper.
|
||||
|
||||
Check out a few examples that use [`~transformers.generation_utils.GenerationMixin.generate`] method to produce
|
||||
Check out a few examples that use [`~generation.GenerationMixin.generate`] method to produce
|
||||
text outputs for different tasks:
|
||||
* [Text summarization](./tasks/summarization#inference)
|
||||
* [Image captioning](./model_doc/git#transformers.GitForCausalLM.forward.example)
|
||||
|
||||
@@ -382,7 +382,7 @@ Tokenize the text and return the `input_ids` as PyTorch tensors:
|
||||
>>> inputs = tokenizer(prompt, return_tensors="pt").input_ids
|
||||
```
|
||||
|
||||
Use the [`~transformers.generation_utils.GenerationMixin.generate`] method to generate text.
|
||||
Use the [`~generation.GenerationMixin.generate`] method to generate text.
|
||||
For more details about the different text generation strategies and parameters for controlling generation, check out the [Text generation strategies](../generation_strategies) page.
|
||||
|
||||
```py
|
||||
|
||||
@@ -355,7 +355,7 @@ Tokenize the text and return the `input_ids` as PyTorch tensors:
|
||||
>>> inputs = tokenizer(text, return_tensors="pt").input_ids
|
||||
```
|
||||
|
||||
Use the [`~transformers.generation_utils.GenerationMixin.generate`] method to create the summarization. For more details about the different text generation strategies and parameters for controlling generation, check out the [Text Generation](../main_classes/text_generation) API.
|
||||
Use the [`~generation.GenerationMixin.generate`] method to create the summarization. For more details about the different text generation strategies and parameters for controlling generation, check out the [Text Generation](../main_classes/text_generation) API.
|
||||
|
||||
```py
|
||||
>>> from transformers import AutoModelForSeq2SeqLM
|
||||
|
||||
@@ -364,7 +364,7 @@ Tokenize the text and return the `input_ids` as PyTorch tensors:
|
||||
>>> inputs = tokenizer(text, return_tensors="pt").input_ids
|
||||
```
|
||||
|
||||
Use the [`~transformers.generation_utils.GenerationMixin.generate`] method to create the translation. For more details about the different text generation strategies and parameters for controlling generation, check out the [Text Generation](../main_classes/text_generation) API.
|
||||
Use the [`~generation.GenerationMixin.generate`] method to create the translation. For more details about the different text generation strategies and parameters for controlling generation, check out the [Text Generation](../main_classes/text_generation) API.
|
||||
|
||||
```py
|
||||
>>> from transformers import AutoModelForSeq2SeqLM
|
||||
|
||||
Reference in New Issue
Block a user