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
Bug fix
Daniel Hanf197aa2b0a9d
diff --git a/unsloth/models/llama.py b/unsloth/models/llama.pyindex b3b49a0436b..722b50d27af 100644--- a/unsloth/models/llama.py+++ b/unsloth/models/llama.py@@ -2024,6 +2024,14 @@ class FastLlamaModel:**kwargs,):if os.environ.get("UNSLOTH_USE_NEW_MODEL", "0") == "1":+ # Check for other PEFT args in kwargs+ for (peft_arg, flag) in (+ ("finetune_vision_layers", False),+ ("finetune_language_layers", True),+ ("finetune_attention_modules", True),+ ("finetune_mlp_modules", True),+ ):+ if peft_arg not in kwargs: kwargs[peft_arg] = flagreturn FastBaseModel.get_peft_model(model = model,r = r,@@ -2031,10 +2039,6 @@ class FastLlamaModel:lora_alpha = lora_alpha,lora_dropout = lora_dropout,bias = bias,- finetune_vision_layers = False,- finetune_language_layers = True,- finetune_attention_modules = True,- finetune_mlp_modules = True,layers_to_transform = layers_to_transform,layers_pattern = layers_pattern,use_gradient_checkpointing = use_gradient_checkpointing,diff --git a/unsloth/models/loader.py b/unsloth/models/loader.pyindex 670e0825808..c2bf51c791b 100644--- a/unsloth/models/loader.py+++ b/unsloth/models/loader.py@@ -642,6 +642,7 @@ class FastModel(FastBaseModel):trust_remote_code = trust_remote_code,)model_types = ["siglip"] + model_types+ print("model_types", model_types)# Set forced float32 env flagos.environ["UNSLOTH_FORCE_FLOAT32"] = "0"diff --git a/unsloth/models/mapper.py b/unsloth/models/mapper.pyindex cf250dd4987..07523ffd6a4 100644--- a/unsloth/models/mapper.py+++ b/unsloth/models/mapper.py@@ -728,6 +728,16 @@ __INT_TO_FLOAT_MAPPER = \"mistralai/Mistral-Small-3.1-24B-Base-2503","unsloth/Mistral-Small-3.1-24B-Base-2503-bnb-4bit",),+ "unsloth/orpheus-3b-0.1-pretrained-unsloth-bnb-4bit" : (+ "unsloth/Mistral-Small-3.1-24B-Base-2503",+ "canopylabs/orpheus-3b-0.1-pretrained",+ "unsloth/orpheus-3b-0.1-pretrained-bnb-4bit",+ ),+ "unsloth/orpheus-3b-0.1-ft-unsloth-bnb-4bit" : (+ "unsloth/Mistral-Small-3.1-24B-Base-2503",+ "canopylabs/orpheus-3b-0.1-ft",+ "unsloth/orpheus-3b-0.1-ft-bnb-4bit",+ ),}INT_TO_FLOAT_MAPPER = {}diff --git a/unsloth/models/vision.py b/unsloth/models/vision.pyindex a566f023b5c..6244a6146d7 100644--- a/unsloth/models/vision.py+++ b/unsloth/models/vision.py@@ -242,6 +242,11 @@ class FastBaseModel:use_gradient_checkpointing = "unsloth",**kwargs,):+ if model_types is None:+ raise RuntimeError(+ "Unsloth: Please use FastModel or FastVisionModel and not use FastBaseModel directly!"+ )+os.environ["UNSLOTH_USE_NEW_MODEL"] = "1"if trust_remote_code:print(