From ab4a69f5d8a22c47e7e1e27ea6a6fac48bf4e3b4 Mon Sep 17 00:00:00 2001 From: Daniel Han Date: Thu, 10 Jul 2025 17:18:40 -0700 Subject: [PATCH] Update llama.py --- unsloth/models/llama.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/unsloth/models/llama.py b/unsloth/models/llama.py index 8ccdeba353..f24b6b7e17 100644 --- a/unsloth/models/llama.py +++ b/unsloth/models/llama.py @@ -2222,7 +2222,7 @@ class FastLlamaModel: bias = "none", layers_to_transform = None, layers_pattern = None, - use_gradient_checkpointing = True, + use_gradient_checkpointing = "unsloth", random_state = 3407, max_seq_length = 2048, # not used anymore use_rslora = False, @@ -2679,7 +2679,7 @@ class FastLlamaModel: @staticmethod def patch_peft_model( model, - use_gradient_checkpointing = True, + use_gradient_checkpointing = "unsloth", ): if os.environ.get("UNSLOTH_USE_NEW_MODEL", "0") == "1": return FastBaseModel.patch_peft_model(