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.

Update rl.py

Daniel Han5129cf3049bd
diff --git a/unsloth/models/rl.py b/unsloth/models/rl.py
index 9980d327891..e977d2f91eb 100644
--- a/unsloth/models/rl.py
+++ b/unsloth/models/rl.py
@@ -551,6 +551,7 @@ def patch_functions(RLTrainer, trainer_file, RLTrainer_name, all_imports, import
# Fix guided_decoding
sampling_params = sampling_params.replace(
"guided_decoding=guided_decoding,",
+ 'guided_decoding='\
'GuidedDecodingParams(backend="outlines", regex=args.vllm_guided_decoding_regex) '\
'if getattr(args, "vllm_guided_decoding_regex", None) is not None else None',
)