Skip to content

Commit

Permalink
fix outfile
Browse files Browse the repository at this point in the history
  • Loading branch information
ngxson committed Jul 8, 2024
1 parent 802565c commit 95b3eb0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions convert_lora_to_gguf.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def parse_args() -> argparse.Namespace:
description="Convert a huggingface PEFT LoRA adapter to a GGML compatible file")
parser.add_argument(
"--outfile", type=Path,
help="path to write to; default: based on input.",
help="path to write to; default: based on input. {ftype} will be replaced by the outtype.",
)
parser.add_argument(
"--outtype", type=str, choices=["f32", "f16", "bf16", "q8_0"], default="f16",
Expand Down Expand Up @@ -77,7 +77,7 @@ def parse_args() -> argparse.Namespace:
fname_out = args.outfile
else:
# output in the same directory as the model by default
fname_out = dir_lora / 'ggml-lora.gguf'
fname_out = dir_lora / 'ggml-lora-{ftype}.gguf'

if os.path.exists(input_model):
lora_model = torch.load(input_model, map_location="cpu")
Expand Down

0 comments on commit 95b3eb0

Please sign in to comment.