Skip to content

Commit

Permalink
fix code quality
Browse files Browse the repository at this point in the history
  • Loading branch information
irenedea committed Jan 23, 2024
1 parent de1601c commit 854c31c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
4 changes: 2 additions & 2 deletions llmfoundry/utils/model_download_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def download_from_hf_hub(
model: str,
save_dir: str,
prefer_safetensors: bool = True,
tokenizers_only: bool = False,
tokenizer_only: bool = False,
token: Optional[str] = None,
):
"""Downloads model files from a Hugging Face Hub model repo.
Expand Down Expand Up @@ -102,7 +102,7 @@ def download_from_hf_hub(
f'No supported model weights found in repo {model}.' +
' Please make sure the repo contains either safetensors or pytorch weights.'
)

allow_patterns = TOKENIZER_FILES if tokenizer_only else None

download_start = time.time()
Expand Down
8 changes: 6 additions & 2 deletions scripts/misc/download_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,5 +119,9 @@ def parse_args() -> argparse.Namespace:
tokenizer_only=args.tokenizer_only,
prefer_safetensors=args.prefer_safetensors)
elif download_from == 'oras':
download_from_oras(args.model, args.config_file, args.credentials_dir,
args.save_dir, tokenizers_only=args.tokenizer_only, args.concurrency)
download_from_oras(args.model,
args.config_file,
args.credentials_dir,
args.save_dir,
tokenizer_only=args.tokenizer_only,
concurrency=args.concurrency)

0 comments on commit 854c31c

Please sign in to comment.