Update rl.py

This commit is contained in:
Daniel Han 2025-02-06 04:29:04 -08:00
commit 3cb045ba00

View file

@ -47,8 +47,8 @@ def PatchRL(FastLanguageModel):
from contextlib import contextmanager
@contextmanager
def unsloth_unwrap_model_for_generation(model, accelerator):
with unwrap_model_for_generation(model, accelerator) as unwrapped_model:
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)