From 7e7fc35625bf11e428f56978cb78c2590f852610 Mon Sep 17 00:00:00 2001 From: Daniel Han Date: Wed, 5 Feb 2025 06:50:14 -0800 Subject: [PATCH] Update rl.py --- unsloth/models/rl.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unsloth/models/rl.py b/unsloth/models/rl.py index d77a4b3784..3129488f32 100644 --- a/unsloth/models/rl.py +++ b/unsloth/models/rl.py @@ -39,7 +39,7 @@ def PatchRL(FastLanguageModel): @contextmanager def unsloth_unwrap_model_for_generation(model, *args, **kwargs): # Must use for_inference to allow inference in Unsloth - with unwrap_model_for_generation(model, accelerator) as unwrapped_model: + with unwrap_model_for_generation(model, *args, **kwargs) as unwrapped_model: FastLanguageModel.for_inference(unwrapped_model) try: yield unwrapped_model