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.

[pre-commit.ci] auto fixes from pre-commit.com hooks

pre-commit-ci[bot]18f335cec524
diff --git a/unsloth/models/rl.py b/unsloth/models/rl.py
index 11a5215c990..2f6aef2709c 100644
--- a/unsloth/models/rl.py
+++ b/unsloth/models/rl.py
@@ -46,10 +46,13 @@ torch_compile_options = {
# vLLM compatibility shim (TRL expects GuidedDecodingParams even if vLLM doesn't provide it)
try:
import vllm.sampling_params as _unsloth_vllm_sp
+
if not hasattr(_unsloth_vllm_sp, "GuidedDecodingParams"):
+
class GuidedDecodingParams:
def __init__(self, **kwargs):
self.kwargs = kwargs
+
_unsloth_vllm_sp.GuidedDecodingParams = GuidedDecodingParams
except Exception:
pass