-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Automatically refresh models & Download model checkpoints (#17)
- Loading branch information
1 parent
a3a352c
commit 279227d
Showing
4 changed files
with
67 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
"""Download checkpoint.""" | ||
import argparse | ||
import os | ||
|
||
import tqdm | ||
|
||
|
||
def run_cmd(cmd): | ||
print(cmd) | ||
os.system(cmd) | ||
|
||
|
||
if __name__ == "__main__": | ||
parser = argparse.ArgumentParser() | ||
parser.add_argument("--output-dir", type=str, default="alpaca-13b-ckpt") | ||
args = parser.parse_args() | ||
|
||
output_dir = args.output_dir | ||
os.makedirs(output_dir, exist_ok=True) | ||
|
||
files = [ | ||
"gs://skypilot-chatbot/chatbot/13b/ckpt/added_tokens.json", | ||
"gs://skypilot-chatbot/chatbot/13b/ckpt/config.json", | ||
"gs://skypilot-chatbot/chatbot/13b/ckpt/pytorch_model-00001-of-00006.bin", | ||
"gs://skypilot-chatbot/chatbot/13b/ckpt/pytorch_model-00002-of-00006.bin", | ||
"gs://skypilot-chatbot/chatbot/13b/ckpt/pytorch_model-00003-of-00006.bin", | ||
"gs://skypilot-chatbot/chatbot/13b/ckpt/pytorch_model-00004-of-00006.bin", | ||
"gs://skypilot-chatbot/chatbot/13b/ckpt/pytorch_model-00005-of-00006.bin", | ||
"gs://skypilot-chatbot/chatbot/13b/ckpt/pytorch_model-00006-of-00006.bin", | ||
"gs://skypilot-chatbot/chatbot/13b/ckpt/pytorch_model.bin.index.json", | ||
"gs://skypilot-chatbot/chatbot/13b/ckpt/special_tokens_map.json", | ||
"gs://skypilot-chatbot/chatbot/13b/ckpt/tokenizer.model", | ||
"gs://skypilot-chatbot/chatbot/13b/ckpt/tokenizer_config.json", | ||
] | ||
|
||
for filename in tqdm.tqdm(files): | ||
run_cmd(f"gsutil cp {filename} {output_dir}") |