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 Han79f345d48483
diff --git a/unsloth/models/rl.py b/unsloth/models/rl.py
index a216f4f3872..ecd394cea03 100644
--- a/unsloth/models/rl.py
+++ b/unsloth/models/rl.py
@@ -21,6 +21,7 @@ from typing import Any, Callable, Dict, List, Literal, Optional, Tuple, Union
import inspect
import os
import re
+import torch
from unsloth_zoo.compiler import create_new_function
from unsloth_zoo.logging_utils import PatchRLStatistics
from .rl_replacements import (