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.

fix: add support for init_lora_weights="corda" in get_peft_model (#3794)

lif8ab0c0c913d2
diff --git a/unsloth/models/_utils.py b/unsloth/models/_utils.py
index abc83805621..ccb547f58e6 100644
--- a/unsloth/models/_utils.py
+++ b/unsloth/models/_utils.py
@@ -1981,9 +1981,10 @@ def validate_loftq_config(loftq_config, lora_dropout, bias, init_lora_weights, m
type(init_lora_weights) is bool
or init_lora_weights == "gaussian"
or init_lora_weights == "loftq"
+ or init_lora_weights == "corda"
):
raise ValueError(
- 'Unsloth: `init_lora_weights` must be either [True, False, "gaussian", "loftq"].'
+ 'Unsloth: `init_lora_weights` must be either [True, False, "gaussian", "loftq", "corda"].'
)
if init_lora_weights == "loftq":
diff --git a/unsloth/models/llama.py b/unsloth/models/llama.py
index 1d7695b9aa4..762445b5e8e 100644
--- a/unsloth/models/llama.py
+++ b/unsloth/models/llama.py
@@ -2779,9 +2779,10 @@ class FastLlamaModel:
type(init_lora_weights) is bool
or init_lora_weights == "gaussian"
or init_lora_weights == "loftq"
+ or init_lora_weights == "corda"
):
raise ValueError(
- 'Unsloth: `init_lora_weights` must be either [True, False, "gaussian", "loftq"].'
+ 'Unsloth: `init_lora_weights` must be either [True, False, "gaussian", "loftq", "corda"].'
)
if init_lora_weights == "loftq":