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