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 Hand05e13c70cf5
diff --git a/unsloth/models/rl.py b/unsloth/models/rl.py
index 1b2f348541d..f36598b0ac3 100644
--- a/unsloth/models/rl.py
+++ b/unsloth/models/rl.py
@@ -94,6 +94,7 @@ from typing import *
from dataclasses import dataclass, field
from packaging.version import Version
import torch
+import numpy as np
from contextlib import nullcontext
from torch.nn import functional as F
torch_compile_options = {{