Skip to content

Local UI to run and train LLMs and diffusion models. Supports GGUF, MLX, Qwen3.8, DeepSeek-V4.1, MiniMax-H3, Gemma 4, FLUX and more.

Remove duplicate TRL vLLM generation patch (#9764)

alkinunb84dc2839439
diff --git a/unsloth/models/rl.py b/unsloth/models/rl.py
index fac0a211b51..c5a7f1c881a 100644
--- a/unsloth/models/rl.py
+++ b/unsloth/models/rl.py
@@ -4329,16 +4329,6 @@ def patch_trl_vllm_generation():
return
-def patch_trl_vllm_generation():
- # trl moved vllm stuff to trl/generation/vllm_generation.py
- # We need to min_p patch it to not instantiate another vLLM instance if we already have one with fast_inference
- # Find the instance of self.llm = LLM(..) (multiline) and wrap it around an if clause
- for function in RL_ADDITIONAL_FUNCTIONS["vllm_generation"]:
- logger.info(f"Unsloth: Patching trl VLLMGeneration with function: {function.__name__}")
- function()
- return
-
-
def PatchFastRL(algorithm = None, FastLanguageModel = None):
if FastLanguageModel is not None:
PatchRL(FastLanguageModel)