Skip to content

Commit

Permalink
Pin revision of Phi-1.5 (Lightning-AI#762)
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrei-Aksionov authored Nov 21, 2023
1 parent 64371ab commit a2400f9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions scripts/download.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ def download_from_hub(
elif from_safetensors:
raise ValueError("`--from_safetensors=True` won't have an effect with `--tokenizer_only=True`")

# contains revisions that are known to work without issues
hf_model_revision_map = {"microsoft/phi-1_5": "92557d03bb12543040c8bb5f0475cbdd9968f05f"}
directory = checkpoint_dir / repo_id
snapshot_download(
repo_id,
Expand All @@ -57,6 +59,7 @@ def download_from_hub(
resume_download=True,
allow_patterns=download_files,
token=access_token,
revision=hf_model_revision_map.get(repo_id),
)

# convert safetensors to PyTorch binaries
Expand Down

0 comments on commit a2400f9

Please sign in to comment.