Studio: honor the 'none' gradient checkpointing option in training (#7128)

This commit is contained in:
oobabooga 2026-07-15 10:19:20 -03:00 committed by GitHub
commit 5531347307
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -931,7 +931,7 @@ class UnslothTrainer:
use_gradient_checkpointing = "unsloth"
elif use_gradient_checkpointing in ("true", "1", "yes"):
use_gradient_checkpointing = True
elif use_gradient_checkpointing in ("false", "0", "no"):
elif use_gradient_checkpointing in ("false", "0", "no", "none", "off"):
use_gradient_checkpointing = False
else:
# Invalid value -> "unsloth"