Skip to content

Please support transformer==4.28.1 in the lib #323

Description

@jzySaber1996

The new version of transformer==4.28.1 cannot use the .generate() function in text generation. The exception is:
File "...\transformers\generation\utils.py", line 1210, in generate self._validate_model_class() File "...\lib\site-packages\transformers\generation\utils.py", line 1070, in _validate_model_class if not self.can_generate(): File "...\lib\site-packages\torch\nn\modules\module.py", line 1729, in __getattr__ raise AttributeError(f"'{type(self).__name__}' object has no attribute '{name}'") AttributeError: 'PromptForGeneration' object has no attribute 'can_generate'
The same issue also happens here issues:277

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions