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

The bug in getting attention weight #302

Open
SjokerLily opened this issue Jun 20, 2024 · 0 comments
Open

The bug in getting attention weight #302

SjokerLily opened this issue Jun 20, 2024 · 0 comments

Comments

@SjokerLily
Copy link

I try to get the attention weight of the model like this:
outputs = self.model( vision_x=vision_x, lang_x=lang_x, attention_mask=attention_mask, clear_conditioned_layers=clear_conditioned_layers, past_key_values=past_key_values, use_cache=(past_key_values is not None), output_attentions=True, )
However, the attention weight tuple it returns is tuple of None.
I step into the code and find out it might be a bug in MPT codes in "huggingface/modules/transformers_modules/". The parameter output_attentions has been omitted during the calling of function MPTBlock. forward() in blocks.py.
I try to fix this bug but when running it, the code returns back to its original version.
Is there any solution to it?

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

1 participant