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 vision.py

Daniel Hanb8500b055d91
diff --git a/unsloth/models/vision.py b/unsloth/models/vision.py
index 9c174e3a7dd..e3fa946b7ad 100644
--- a/unsloth/models/vision.py
+++ b/unsloth/models/vision.py
@@ -102,6 +102,8 @@ def unsloth_base_fast_generate(
global NUM_LOGITS_TO_KEEP
if arch not in NUM_LOGITS_TO_KEEP:
m = self
+ # Find which is needed ie
+ # num_logits_to_keep or logits_to_keep
while hasattr(m, "model"):
if hasattr(m, "forward"):
keys = inspect.signature(m.forward).parameters.keys()