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.
Python agentaichatgptdeepseekfine-tuninggemmaimage-generationllamallmllmsopenaipythonqwenreinforcement-learningself-hostedstable-diffusiontext-to-speechttsuiunsloth
Update rl.py
Daniel Han55e8c086ddd2
diff --git a/unsloth/models/rl.py b/unsloth/models/rl.pyindex f754fa953cf..38f9ab5a0c7 100644--- a/unsloth/models/rl.py+++ b/unsloth/models/rl.py@@ -575,7 +575,9 @@ def patch_functions(RLTrainer, trainer_file, RLTrainer_name, all_imports, import# Add extra arguments to SamplingParamsextra = "**getattr(getattr(args, 'vllm_sampling_params', vLLMSamplingParams())), '_set_kwargs', {})"- sampling_params = sampling_params.replace(")", "," + extra + "," + ")")+ # Backwards replace+ to_replace = "," + extra + "," + ")"+ sampling_params = to_replace.join(sampling_params.rsplit(")", 1))# Strip multiple commassampling_params = re.sub(r"[\,][\s]{0,}\,", ",", sampling_params)