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 vision.py

Daniel Han29e4870a45aa
diff --git a/unsloth/models/vision.py b/unsloth/models/vision.py
index 4466128a28e..f17096af73b 100644
--- a/unsloth/models/vision.py
+++ b/unsloth/models/vision.py
@@ -690,6 +690,8 @@ class FastBaseModel:
embeddings = model.get_output_embeddings()
if hasattr(embeddings, "training"): embeddings.training = False
pass
+ # Must disable returning hidden states in the case for GRPO
+ os.environ["UNSLOTH_RETURN_HIDDEN_STATES"] = "0"
return model
pass