From 68baacfbc6b186aa623fff14ba15867e4cfd99a9 Mon Sep 17 00:00:00 2001 From: Daniel Han Date: Wed, 19 Mar 2025 02:41:43 -0700 Subject: [PATCH] Update vision.py --- unsloth/models/vision.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unsloth/models/vision.py b/unsloth/models/vision.py index 0497ce4379..bc830efd67 100644 --- a/unsloth/models/vision.py +++ b/unsloth/models/vision.py @@ -185,7 +185,7 @@ def unsloth_base_fast_generate( # Use hybrid if sliding window seen, otherwise try static cache_implementation = getattr(self.config, "cache_implementation", None) if cache_implementation is None: - swa = getattr(getattr(model.config, "text_config", model.config), "sliding_window", None) + swa = getattr(getattr(self.config, "text_config", self.config), "sliding_window", None) if swa == 0 or type(swa) is not int: cache_implementation = "static" else: