Skip to content

Local UI to run and train LLMs and diffusion models. Supports GGUF, MLX, Qwen3.8, DeepSeek-V4.1, MiniMax-H3, Gemma 4, FLUX and more.

Update gemma2.py

Daniel Han1d04daaad8d8
diff --git a/unsloth/models/gemma2.py b/unsloth/models/gemma2.py
index 4a6f3e97cc9..0f0a0207176 100644
--- a/unsloth/models/gemma2.py
+++ b/unsloth/models/gemma2.py
@@ -169,7 +169,7 @@ pass
def Gemma2DecoderLayer_fast_forward(
self,
hidden_states: torch.Tensor,
- causal_mask: Optional[xformers.attn_bias.BlockDiagonalCausalMask] = None,
+ causal_mask: Optional[BlockDiagonalCausalMask] = None,
attention_mask: Optional[torch.Tensor] = None,
position_ids: Optional[torch.LongTensor] = None,
past_key_value: Optional[Tuple[torch.Tensor]] = None,