[generate] clarify docstrings: when to inherit GenerationMixin (#36605)
This commit is contained in:
@@ -2178,6 +2178,9 @@ class PreTrainedModel(nn.Module, ModuleUtilsMixin, GenerationMixin, PushToHubMix
|
||||
"""
|
||||
Returns whether this model can generate sequences with `.generate()` from the `GenerationMixin`.
|
||||
|
||||
Under the hood, on classes where this function returns True, some generation-specific changes are triggered:
|
||||
for instance, the model instance will have a populated `generation_config` attribute.
|
||||
|
||||
Returns:
|
||||
`bool`: Whether this model can generate sequences with `.generate()`.
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user