You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The generation configuration to be used as base parametrization for the generation call. `**kwargs`
387
387
passed to generate matching the attributes of `generation_config` will override them. If
388
388
`generation_config` is not provided, the default will be used, which had the following loading
@@ -480,8 +480,8 @@ def generate(
480
480
`return_segments` is set True. In this case the generation outputs of each segment is added to each
481
481
segment.
482
482
force_unique_generate_call (`bool`, *optional*):
483
-
Whether to force a unique call to the underlying GenerationMixin's generate method. This is useful for assisted decoding and testing purposes to ensure
484
-
that only one call to generate is made and therefore decoder input token ids and eos token ids are returned.
483
+
Whether to force a unique call to the underlying GenerationMixin's [~generation.GenerationMixin.generate] method. This is useful for assisted decoding and testing purposes to ensure
484
+
that only one call to [~generation.GenerationMixin.generate] is made and therefore decoder input token ids and eos token ids are returned.
485
485
kwargs (`Dict[str, Any]`, *optional*):
486
486
Ad hoc parametrization of `generate_config` and/or additional model-specific kwargs that will be
487
487
forwarded to the `forward` function of the model. If the model is an encoder-decoder model, encoder
@@ -495,18 +495,18 @@ def generate(
495
495
- `torch.LongTensor` in all other cases, excluding the decoder input ids and end of sequence id.
`segments` is a list of lists (one list per batch element) of `segment`.
502
502
A `segment` is a dictionary with keys `start`, `end`, `tokens`, `idxs`, and `result`.
503
503
- `start`: the start timestamp of the segment.
504
504
- `end`: the end timestamp of the segment.
505
505
- `tokens`: the tokens of the segment, excluding the decoder input ids and end of sequence id.
506
-
- `idxs`: the start (included) and end (excluded) indices of the `tokens` of the segment in the underlying call to GenerationMixin's `generate` (present in `result`).
507
-
- `result`: the result of the underlying call to GenerationMixin's `generate`.
506
+
- `idxs`: the start (included) and end (excluded) indices of the `tokens` of the segment in the underlying call to GenerationMixin's [~generation.GenerationMixin.generate] (present in `result`).
507
+
- `result`: the result of the underlying call to GenerationMixin's [~generation.GenerationMixin.generate].
508
508
509
-
When `return_timestamps=True`, `return_dict_in_generate=True` applies to each call of the underlying GenerationMixin's `generate`, with outputs stored in `result` of each `segment`.
509
+
When `return_timestamps=True`, `return_dict_in_generate=True` applies to each call of the underlying GenerationMixin's [~generation.GenerationMixin.generate], with outputs stored in `result` of each `segment`.
510
510
511
511
Example:
512
512
@@ -543,7 +543,7 @@ def generate(
543
543
```
544
544
545
545
- *Shortform transcription*: If passed mel input features are <= 30 seconds, there are two possibilities:
546
-
- `return_timestamps=False`: the whole audio will be transcribed with a single call to GenerationMixin's generate.
546
+
- `return_timestamps=False`: the whole audio will be transcribed with a single call to GenerationMixin's [~generation.GenerationMixin.generate].
547
547
- `return_timestamps=True`: the audio will be transcribed using the same logic as long-form transcription.
0 commit comments