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
Update rl.py
Daniel Hanea55289b5a81
diff --git a/unsloth/models/rl.py b/unsloth/models/rl.pyindex c4a835ed93d..932a29f78a0 100644--- a/unsloth/models/rl.py+++ b/unsloth/models/rl.py@@ -39,12 +39,12 @@ def PatchRL(FastLanguageModel):@contextmanagerdef unsloth_unwrap_model_for_generation(model, *args, **kwargs):# Must use for_inference to allow inference in Unsloth- print("$$$$$$$$$$$$$$$$$$$$$$$")with unwrap_model_for_generation(model, *args, **kwargs) as unwrapped_model:FastLanguageModel.for_inference(unwrapped_model)yield unwrapped_model# Return back to training modeFastLanguageModel.for_training (model)+ yield modelpassimport trl.trainer