Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GPT2LMHeadModel does not support an attention implementation through torch.nn.functional.scaled_dot_product_attention yet #14

Open
hanjidani opened this issue Sep 18, 2024 · 3 comments

Comments

@hanjidani
Copy link

`---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
in <cell line: 21>()
19
20 print("=> Creating model")
---> 21 model = VideoRecap(old_args, eval_only=True)
22 model = model.cuda()
23 model.load_state_dict(state_dict, strict=True)

5 frames
/usr/local/lib/python3.10/dist-packages/transformers/modeling_utils.py in _check_and_enable_sdpa(cls, config, hard_check_only)
1729 if hard_check_only:
1730 if not cls._supports_sdpa:
-> 1731 raise ValueError(
1732 f"{cls.name} does not support an attention implementation through torch.nn.functional.scaled_dot_product_attention yet."
1733 " Please request the support for this architecture: huggingface/transformers#28005. If you believe"

ValueError: GPT2LMHeadModel does not support an attention implementation through torch.nn.functional.scaled_dot_product_attention yet. Please request the support for this architecture: huggingface/transformers#28005. If you believe this error is a bug, please open an issue in Transformers GitHub repository and load your model with the argument attn_implementation="eager" meanwhile. Example: model = AutoModel.from_pretrained("openai/whisper-tiny", attn_implementation="eager")

`

Here is the output of the demo file while trying to load VideoRecap model under the Clip Caption section.

Which version of the PyTorchcan run it?

@yanlai00
Copy link

yanlai00 commented Oct 9, 2024

Same issue here!

Edit: Using the provided conda-pack environment resolves the problem.

@dwin222
Copy link

dwin222 commented Oct 10, 2024

Same issue here!

Edit: Using the provided conda-pack environment resolves the problem.

Could you please provide more detailed instructions on how to resolve this issue?

@hanjidani
Copy link
Author

Same issue here!

Edit: Using the provided conda-pack environment resolves the problem.

How should I do this? What is suitable conda pack for this repo?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants