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

Daniel Handa93a2237af2
diff --git a/unsloth/models/loader.py b/unsloth/models/loader.py
index ece8af2821f..85416b81bd3 100644
--- a/unsloth/models/loader.py
+++ b/unsloth/models/loader.py
@@ -132,9 +132,12 @@ class FastLanguageModel(FastLlamaModel):
model_type = model_config.model_type
if model_type == "llama":
- scaling_type1 = model_config.rope_scaling.get("type", None)
- scaling_type2 = model_config.rope_scaling.get("rope_type", None)
- scaling_type = scaling_type1 if scaling_type1 is not None else scaling_type2
+ scaling_type = None
+ if getattr(model_config, "rope_scaling", None) is not None:
+ scaling_type1 = model_config.rope_scaling.get("type", None)
+ scaling_type2 = model_config.rope_scaling.get("rope_type", None)
+ scaling_type = scaling_type1 if scaling_type1 is not None else scaling_type2
+ pass
if scaling_type == "llama3" and not SUPPORTS_LLAMA31:
raise ImportError(