-
Notifications
You must be signed in to change notification settings - Fork 31.6k
Open
Labels
WIPLabel your PR/Issue with WIP for some long outstanding Issues/PRs that are work in progressLabel your PR/Issue with WIP for some long outstanding Issues/PRs that are work in progress
Description
The expectation for the prepare_inputs_for_generation function to be overridden can be made clearer by changing
transformers/src/transformers/generation_utils.py
Lines 369 to 374 in 700cee3
| def prepare_inputs_for_generation(self, input_ids: torch.LongTensor, **kwargs) -> Dict[str, Any]: | |
| """ | |
| Implement in subclasses of :class:`~transformers.PreTrainedModel` for custom behavior to prepare inputs in the | |
| generate method. | |
| """ | |
| return {"input_ids": input_ids} |
to raise a NotImplementedError that provides the information mentioned in the function's comment.
patrickvonplaten
Metadata
Metadata
Assignees
Labels
WIPLabel your PR/Issue with WIP for some long outstanding Issues/PRs that are work in progressLabel your PR/Issue with WIP for some long outstanding Issues/PRs that are work in progress