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.
Python agentaichatgptdeepseekfine-tuninggemmaimage-generationllamallmllmsopenaipythonqwenreinforcement-learningself-hostedstable-diffusiontext-to-speechttsuiunsloth
Handle older unsloth-zoo without reset_unsloth_gradient_checkpointing_buffers
danielhanchend1d9832e7053
diff --git a/unsloth/models/rl.py b/unsloth/models/rl.pyindex 9ea57e32d39..88aeeda8a1e 100644--- a/unsloth/models/rl.py+++ b/unsloth/models/rl.py@@ -234,7 +234,10 @@ from transformers.training_args import ParallelMode# Also patches W&B since multiple runs must use wandb.finish()import functoolsfrom types import MethodType-from unsloth_zoo.gradient_checkpointing import reset_unsloth_gradient_checkpointing_buffers+try:+ from unsloth_zoo.gradient_checkpointing import reset_unsloth_gradient_checkpointing_buffers+except:+ def reset_unsloth_gradient_checkpointing_buffers(): passdef prepare_for_training_mode(f):@functools.wraps(f)def wrapper(self, *args, **kwargs):