diff --git a/unsloth/models/llama.py b/unsloth/models/llama.py index 6de2d0e98c..359761c06a 100644 --- a/unsloth/models/llama.py +++ b/unsloth/models/llama.py @@ -1173,7 +1173,7 @@ class FastLlamaModel: # Downcast RoPE embedding to correct data type if (name.endswith("rotary_emb") or hasattr(module, "cos_cached")) \ and (module.cos_cached.dtype != correct_dtype): - + module.cos_cached = module.cos_cached.to(correct_dtype) module.sin_cached = module.sin_cached.to(correct_dtype) pass @@ -1216,8 +1216,6 @@ class FastLlamaModel: ) pass - if loftq_config is None: loftq_config = {} - import inspect signature = str(inspect.signature(LoraConfig)) SUPPORTS_LOFTQ = "loftq_config" in signature