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 Han44810d787653
diff --git a/unsloth/models/rl.py b/unsloth/models/rl.pyindex b1ee649c841..4e7fcfa7a49 100644--- a/unsloth/models/rl.py+++ b/unsloth/models/rl.py@@ -78,15 +78,6 @@ from dataclasses import dataclass, fieldfrom packaging.version import Versionimport torch-# https://github.com/huggingface/transformers/blob/main/src/transformers/trainer_utils.py#L126-def neftune_post_forward_hook(module, input, output):- if module.training:- dims = torch.tensor(output.size(1) * output.size(2))- mag_norm = module.neftune_noise_alpha / torch.sqrt(dims)- output = output + torch.zeros_like(output).uniform_(-mag_norm, mag_norm)- return output-pass-@dataclassclass Unsloth{RLConfig_name}({RLConfig_name}):"""