Update llama.py
This commit is contained in:
parent
44f405a009
commit
b23ef893b9
1 changed files with 6 additions and 0 deletions
|
|
@ -2462,6 +2462,12 @@ class FastLlamaModel:
|
|||
model,
|
||||
use_gradient_checkpointing = True,
|
||||
):
|
||||
if os.environ.get("UNSLOTH_USE_NEW_MODEL", "0") == "1":
|
||||
return FastBaseModel.patch_peft_model(
|
||||
model = model,
|
||||
use_gradient_checkpointing = use_gradient_checkpointing,
|
||||
)
|
||||
pass
|
||||
if not isinstance(model, PeftModelForCausalLM):
|
||||
raise TypeError(
|
||||
"Unsloth: Your model needs to call `.get_peft_model` first!"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue