mirror of
https://github.com/KoboldAI/KoboldAI-Client.git
synced 2025-06-05 21:59:24 +02:00
PEFT: Change directory structure to be inside model
This commit is contained in:
@@ -215,7 +215,15 @@ class HFTorchInferenceModel(HFInferenceModel):
|
|||||||
# PEFT Loading. This MUST be done after all save_pretrained calls are
|
# PEFT Loading. This MUST be done after all save_pretrained calls are
|
||||||
# finished on the main model.
|
# finished on the main model.
|
||||||
if utils.args.peft:
|
if utils.args.peft:
|
||||||
peft_local_path = os.path.join("models/peft", utils.args.peft.replace("/", "_"))
|
local_peft_dir = os.path.join(m_self.get_local_model_path(), "peft")
|
||||||
|
|
||||||
|
# Make PEFT dir if it doesn't exist
|
||||||
|
try:
|
||||||
|
os.makedirs(local_peft_dir)
|
||||||
|
except FileExistsError:
|
||||||
|
pass
|
||||||
|
|
||||||
|
peft_local_path = os.path.join(local_peft_dir, utils.args.peft.replace("/", "_"))
|
||||||
logger.debug(f"Loading PEFT '{utils.args.peft}', possible local path is '{peft_local_path}'.")
|
logger.debug(f"Loading PEFT '{utils.args.peft}', possible local path is '{peft_local_path}'.")
|
||||||
|
|
||||||
peft_installed_locally = True
|
peft_installed_locally = True
|
||||||
|
@@ -1,2 +0,0 @@
|
|||||||
PEFT models will be stored in this directory when downloaded.
|
|
||||||
Please don't be too mean to this directory.
|
|
Reference in New Issue
Block a user