Skip to content

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.

Update rl.py

Daniel Han8c181dfdbec0
diff --git a/unsloth/models/rl.py b/unsloth/models/rl.py
index 3a9d651d111..c9ea9222726 100644
--- a/unsloth/models/rl.py
+++ b/unsloth/models/rl.py
@@ -60,7 +60,7 @@ def PatchRL(FastLanguageModel):
def unsloth_unwrap_model_for_generation(model, *args, **kwargs):
with unwrap_model_for_generation(model, *args, **kwargs) as unwrapped_model:
# Put the model in inference mode.
- FastLanguageModel.for_inference(unwrapped_model)
+ FastLanguageModel.for_inference(model)
# We must use .clone for Unsloth since we force inference_mode
# Rather we should have used no_grad