Skip to content

Commit 4f65762

Browse files
committed
small style fix
1 parent df95a3a commit 4f65762

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

convert_hf_to_gguf.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5498,7 +5498,7 @@ def parse_args() -> argparse.Namespace:
54985498
)
54995499
parser.add_argument(
55005500
"--remote", action="store_true",
5501-
help="(Experimental) Read safetensors file remotely without downloading to disk. Config and tokenizer files will still be downloaded. To use this feature, you need to specify Hugging Face model repo name instead of a local directory. For example: 'HuggingFaceTB/SmolLM2-1.7B'",
5501+
help="(Experimental) Read safetensors file remotely without downloading to disk. Config and tokenizer files will still be downloaded. To use this feature, you need to specify Hugging Face model repo name instead of a local directory. For example: 'HuggingFaceTB/SmolLM2-1.7B-Instruct'",
55025502
)
55035503

55045504
args = parser.parse_args()
@@ -5542,9 +5542,8 @@ def main() -> None:
55425542

55435543
if args.remote:
55445544
from huggingface_hub import snapshot_download
5545-
args.remote = str(dir_model)
55465545
local_dir = snapshot_download(
5547-
repo_id=args.remote,
5546+
repo_id=str(dir_model),
55485547
allow_patterns=["LICENSE", "*.json", "*.md", "*.txt", "tokenizer.model"])
55495548
dir_model = Path(local_dir)
55505549
logger.info(f"Downloaded config and tokenizer to {local_dir}")
@@ -5596,7 +5595,8 @@ def main() -> None:
55965595
metadata_override=args.metadata, model_name=args.model_name,
55975596
split_max_tensors=args.split_max_tensors,
55985597
split_max_size=split_str_to_n_bytes(args.split_max_size), dry_run=args.dry_run,
5599-
small_first_shard=args.no_tensor_first_split, remote_hf_model_id=args.remote or None)
5598+
small_first_shard=args.no_tensor_first_split,
5599+
remote_hf_model_id=str(args.model) if args.remote else None)
56005600

56015601
if args.vocab_only:
56025602
logger.info("Exporting model vocab...")

0 commit comments

Comments
 (0)