Skip to content

Commit

Permalink
Update gemma2.py
Browse files Browse the repository at this point in the history
  • Loading branch information
danielhanchen committed Jul 31, 2024
1 parent cf1054c commit 8db7e80
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion unsloth/models/gemma2.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ def Gemma2Attention_fast_forward(

# FA uses 1 / sqrt for softmax_scale!
if not hasattr(self, "_flash_attention_softmax_scale"):
self._flash_attention_softmax_scale = 1.0 / self.config.query_pre_attn_scalar**0.5
self._flash_attention_softmax_scale = 1.0 / (self.config.query_pre_attn_scalar**0.5)
pass

Q = Q.transpose(1, 2)
Expand Down

0 comments on commit 8db7e80

Please sign in to comment.