Update rl.py

This commit is contained in:
Daniel Han 2025-02-05 07:28:16 -08:00
commit bf6c6a678d

View file

@ -37,7 +37,7 @@ 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):
with unwrap_model_for_generation(model, accelerator) as unwrapped_model:
# Put the model in inference mode.
FastLanguageModel.for_inference(unwrapped_model)