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
Precision issues
Daniel Han8cfe8a57e627
diff --git a/unsloth/models/_utils.py b/unsloth/models/_utils.pyindex 4ebde13b8cf..10ba3530daf 100644--- a/unsloth/models/_utils.py+++ b/unsloth/models/_utils.py@@ -12,7 +12,7 @@# See the License for the specific language governing permissions and# limitations under the License.-__version__ = "2025.3.12"+__version__ = "2025.3.13"__all__ = ["SUPPORTS_BFLOAT16",diff --git a/unsloth/models/rl.py b/unsloth/models/rl.pyindex e412c3a5a00..c450ef6df54 100644--- a/unsloth/models/rl.py+++ b/unsloth/models/rl.py@@ -238,9 +238,8 @@ def _patch_trl_rl_trainers(trainer_file = "grpo_trainer"):"use_fp16 = getattr(args, 'fp16', False)\n"\"force_float32 = False\n"\"if os.environ.get('UNSLOTH_FORCE_FLOAT32', '0') == '1':\n"\- " if use_bf16 or use_fp16:\n"\- " print('Unsloth: Switching to float32 training since model cannot work with float16')\n"\- " force_float32 = True\n"\+ " print('Unsloth: Switching to float32 training since model cannot work with float16')\n"\+ " force_float32 = True\n"\"mixed_precision_dtype = os.environ.get('UNSLOTH_MIXED_PRECISION', 'float32')\n"\"dtype = getattr(model.config, 'torch_dtype', None)\n"\"if dtype is None: dtype = model.get_input_embeddings().dtype\n"\