From 2aa87bd8f14451db033056402b7d39ad28736bbf Mon Sep 17 00:00:00 2001 From: Daniel Han Date: Mon, 10 Feb 2025 23:33:15 -0800 Subject: [PATCH] Auto patching --- unsloth/models/llama.py | 2 ++ unsloth/models/rl.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/unsloth/models/llama.py b/unsloth/models/llama.py index a337472a3e..c50f65e4bd 100644 --- a/unsloth/models/llama.py +++ b/unsloth/models/llama.py @@ -2739,3 +2739,5 @@ class FastLlamaModel: pass pass +from .rl import PatchFastRL +PatchFastRL(FastLanguageModel = FastLlamaModel) diff --git a/unsloth/models/rl.py b/unsloth/models/rl.py index e89e657fab..31a745e0d1 100644 --- a/unsloth/models/rl.py +++ b/unsloth/models/rl.py @@ -453,5 +453,5 @@ pass def PatchFastRL(algorithm = "GRPO", FastLanguageModel = None): if FastLanguageModel is not None: PatchRL(FastLanguageModel) patch_trl_rl_trainers() - PatchRLStatistics(algorithm) + if algorithm is nont None: PatchRLStatistics(algorithm) pass