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

which version of transformer and datasets package do we need for this repo? #81

Open
ghost opened this issue Mar 28, 2024 · 2 comments
Open

Comments

@ghost
Copy link

ghost commented Mar 28, 2024

I got this error

AttributeError: 'Int8OPTDecoder' object has no attribute '_use_flash_attention_2'

when I run smoothquant_opt_real_int8 and the eval for model_smoothquant = Int8OPTForCausalLM.from_pretrained('mit-han-lab/opt-30b-smoothquant', torch_dtype=torch.float16, device_map='auto')

I first got the error of "AttributeError: type object 'OPTDecoder' has no attribute '_prepare_decoder_attention_mask'" so I commented out "OPTDecoder._prepare_decoder_attention_mask" from opt.py file. Then this error occured.

If I simply add self._use_flash_attention_2 = False to 'Int8OPTDecoder' class, what would happen?

What's the right way of fixing it?

@ghost ghost changed the title AttributeError: 'Int8OPTDecoder' object has no attribute '_use_flash_attention_2' which version of transformer package do we need for this repo? Mar 28, 2024
@ghost ghost changed the title which version of transformer package do we need for this repo? which version of transformer and datasets package do we need for this repo? Mar 28, 2024
@ghost
Copy link
Author

ghost commented Mar 28, 2024

I installed transformers==4.34.0 and datasets==2.14.5 and it worked

@msz12345
Copy link

msz12345 commented Apr 3, 2024

congratulations! I just want to say maybe you can try use transformers==4.33.0,about the error use_flash_attention2 we tried many ways but this make it at last.

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