From 13d593183aa2feaba82f3f37ca64315a96a3799a Mon Sep 17 00:00:00 2001 From: metame Date: Fri, 5 Apr 2024 17:02:22 +0800 Subject: [PATCH] fix chat with lora --- litgpt/chat/base.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/litgpt/chat/base.py b/litgpt/chat/base.py index 81229ddd2a..cb3f2aa901 100644 --- a/litgpt/chat/base.py +++ b/litgpt/chat/base.py @@ -137,9 +137,9 @@ def main( checkpoint_path = checkpoint_dir / "lit_model.pth" # Merge if this is a raw LoRA checkpoint - if (checkpoint_path / "lit_model.pth.lora").is_file() and not checkpoint_path.is_file(): + if (checkpoint_dir / "lit_model.pth.lora").is_file() and not checkpoint_path.is_file(): print("Merging LoRA weights with the base model. This won't take long and is a one-time-only thing.") - merge_lora(checkpoint_path) + merge_lora(checkpoint_dir) with fabric.init_module(empty_init=True): model = GPT(config)