Gemma2FlashAttention2 missing sliding_window variable

#8
by emozilla - opened

Gemma2FlashAttention2.forward checks self.sliding_window, but this variable is not set in it's __init__ or in the __init__ of the parent Gemma2Attention, causing a crash when trying to use Flash Attention 2. Simple solution is to just add

self.sliding_window = self.config.sliding_window to Gemma2FlashAttention2.__init__ (line 303)

Where is Gemma2FlashAttention2.init
?

Google org

Hi @emozilla @zokica , Please try again with the latest transformers version v4.42.3 or v4.42.4. and let us know if the issue still persists. Thank you.

Your need to confirm your account before you can post a new comment.

Sign up or log in to comment