From f58f9ce2b63260a54ad02eb3c33fb9649ba5ee77 Mon Sep 17 00:00:00 2001 From: Manan Shah <52329525+Manan17@users.noreply.github.com> Date: Fri, 3 Apr 2026 16:44:01 -0500 Subject: [PATCH] removed bidirectional check for 31b (#4839) Co-authored-by: Manan17 --- unsloth/models/gemma4_text.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/unsloth/models/gemma4_text.py b/unsloth/models/gemma4_text.py index 894d3ea95b..e8b4371559 100644 --- a/unsloth/models/gemma4_text.py +++ b/unsloth/models/gemma4_text.py @@ -54,10 +54,6 @@ class ModelArgs(BaseModelArgs): use_bidirectional_attention: Optional[str] = None def __post_init__(self): - if self.use_bidirectional_attention is not None: - raise NotImplementedError( - "Gemma4 bidirectional attention modes are not implemented in mlx-lm." - ) if self.layer_types is None: self.layer_types = [ "sliding_attention" if (i + 1) % 6 else "full_attention"