From 2d8ade517b2dd7b8f05199149d0f790c0181b804 Mon Sep 17 00:00:00 2001 From: Kotha Dhakshin <179742818+Dhakshin2007@users.noreply.github.com> Date: Tue, 7 Apr 2026 17:52:45 +0530 Subject: [PATCH] fix: correct misleading ValueError message in Attention._call_ The error message raised when `attn_type` is neither LOCAL_SLIDING nor GLOBAL incorrectly said "AttentionType.GLOBAL or AttentionType.GLOBAL" due to a copy-paste mistake. The first enum name should be AttentionType.LOCAL_SLIDING, not AttentionType.GLOBAL. --- gemma/gm/nn/_modules.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gemma/gm/nn/_modules.py b/gemma/gm/nn/_modules.py index b1bbc789..4c7648ce 100644 --- a/gemma/gm/nn/_modules.py +++ b/gemma/gm/nn/_modules.py @@ -269,7 +269,7 @@ def __call__( attn_mask *= sliding_mask elif self.attn_type != AttentionType.GLOBAL: raise ValueError( - 'Attn_type must be either AttentionType.GLOBAL or' + 'Attn_type must be either AttentionType.LOCAL_SLIDING or' f' AttentionType.GLOBAL not {self.attn_type}' )