Change8

2025-03

📦 unsloth
15 features🐛 7 fixes🔧 4 symbols

Summary

The March release introduces full support for finetuning Gemma 3 models and significantly expands model compatibility, including Mixtral and vision models, alongside preliminary support for 8bit and full finetuning. This version also brings Windows support and removes the compilation requirement for GGUF exports.

Migration Steps

  1. To upgrade, run: `pip install --upgrade --force-reinstall --no-cache-dir unsloth unsloth_zoo`.
  2. If using Pixtral, update transformers: `pip install --no-deps git+https://github.com/huggingface/transformers.git`.
  3. When saving GGUF files, note that only quantization types Q8_0, BF16, and F16 are currently supported: `model.save_pretrained_gguf("path", quantization_type = "Q8_0")`.

✨ New Features

  • Enabled finetuning for Gemma 3 models (1B, 4B, 12B, and 27B).
  • Implemented automatic switching to float32 precision during Gemma 3 finetuning when float16 causes high loss/infinite gradients on specific hardware (e.g., T4, 2080 series). Bfloat16 remains supported.
  • Introduced preliminary support for full-finetuning via `full_finetuning = True` in FastModel.from_pretrained.
  • Introduced preliminary support for 8bit finetuning via `load_in_8bit = True` in FastModel.from_pretrained.
  • Expanded Unsloth Auto Model support to nearly all models, including vision and text models (e.g., Mixtral, Gemma 3, Granite 3.2, Cohere, OLMo, Reka) without custom implementations.
  • Enabled Windows support via standard `pip install unsloth` by utilizing `triton-windows`.
  • Added support for training on completions/responses only for vision models using `UnslothVisionDataCollator`.
  • GGUF conversions (16bit and 8bit) no longer require compiling (no need to install GCC/Visual Studio).
  • Vision models now auto-resize images, preventing OOM errors and allowing sequence length truncation.
  • Achieved an additional +10% less VRAM usage and >10% speedup boost for 4bit training (on top of existing optimizations). 8bit and full finetuning also benefit.
  • GRPO now supports loading non-Unsloth uploaded models in 4bit to reduce VRAM usage.
  • Added new training logs showing parameter counts and total batch size.
  • Vision models now support normal text training, allowing non-vision notebooks to work with them.
  • Complete gradient accumulation bug fix coverage implemented for all models.
  • DoRA, Dropout, and other PEFT methods are expected to work correctly.

🐛 Bug Fixes

  • Fixed issues causing very high training loss during Gemma 3 finetuning, including tokenization issues.
  • Fixed Pixtral and Llava finetuning issues; nearly all vision models are now supported out-of-the-box.
  • Fixed issues preventing Colabs and cloud instances (like Runpod) from working.
  • Fixed Layernorm when num_cols is not a power of 2.
  • Fixed GRPO with Mistral and importing issues.
  • Fixed key error in GRPOTrainer.
  • Fixed GGUF saving breaks on Windows WSL (llama-quantize).

🔧 Affected Symbols

FastModel.from_pretrainedUnslothVisionDataCollatormodel.save_pretrained_ggufSFTTrainer