Skip to content

Commit 87363a6

Browse files
committed
Update vision.py
1 parent b75698c commit 87363a6

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

unsloth/models/vision.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -120,9 +120,8 @@ def unsloth_base_fast_generate(
120120
pass
121121
pass
122122
key = NUM_LOGITS_TO_KEEP[arch]
123-
if key is not None:
124-
if key not in kwargs:
125-
kwargs[key] = 1
123+
if key is not None and key not in kwargs:
124+
kwargs[key] = 1
126125
else:
127126
pass
128127
# kwargs.pop("logits_to_keep", None)

0 commit comments

Comments
 (0)