Skip to content

Commit

Permalink
Add checkpoint_dir command-line arg to download script. (#664)
Browse files Browse the repository at this point in the history
Co-authored-by: Carlos Mocholí <[email protected]>
  • Loading branch information
jyegerlehner and carmocca authored Nov 18, 2023
1 parent 05b041a commit 7dbf02e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scripts/download.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ def download_from_hub(
access_token: Optional[str] = os.getenv("HF_TOKEN"),
from_safetensors: bool = False,
tokenizer_only: bool = False,
checkpoint_dir: Path = Path("checkpoints"),
) -> None:
if repo_id is None:
from lit_gpt.config import configs
Expand Down Expand Up @@ -48,7 +49,7 @@ def download_from_hub(
elif from_safetensors:
raise ValueError("`--from_safetensors=True` won't have an effect with `--tokenizer_only=True`")

directory = Path("checkpoints") / repo_id
directory = checkpoint_dir / repo_id
snapshot_download(
repo_id,
local_dir=directory,
Expand Down

0 comments on commit 7dbf02e

Please sign in to comment.