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.

peft_config before model_config (#3342)

DoubleMathew35ff0f456490
diff --git a/unsloth/models/loader.py b/unsloth/models/loader.py
index ff6d8fa7aaf..c5b06369d32 100644
--- a/unsloth/models/loader.py
+++ b/unsloth/models/loader.py
@@ -213,7 +213,7 @@ class FastLanguageModel(FastLlamaModel):
peft_error = str(error)
is_peft = False
pass
- model_types = get_transformers_model_type(model_config or peft_config)
+ model_types = get_transformers_model_type(peft_config or model_config)
if len(model_types) == 1:
model_type = model_types[0]
else:
@@ -626,7 +626,7 @@ class FastModel(FastBaseModel):
peft_error = str(error)
is_peft = False
pass
- model_types = get_transformers_model_type(model_config or peft_config)
+ model_types = get_transformers_model_type(peft_config or model_config)
model_types_all = ",".join(model_types)
# Check versions