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 Haneed2ac7329a8
diff --git a/unsloth/models/rl.py b/unsloth/models/rl.pyindex b51be3b7fa3..26c73a7b141 100644--- a/unsloth/models/rl.py+++ b/unsloth/models/rl.py@@ -41,8 +41,8 @@ def PatchRL(FastLanguageModel):# Must use for_inference to allow inference in UnslothFastLanguageModel.for_inference(model)try:- unwrapped_model = unwrap_model_for_generation(model, *args, **kwargs)- yield unwrapped_model+ with unwrap_model_for_generation(model, *args, **kwargs) as unwrapped_model:+ yield unwrapped_modelfinally:# Finally return back trainingFastLanguageModel.for_training(model)