summaryrefslogtreecommitdiff
path: root/scripts/download_llama.py
diff options
context:
space:
mode:
authorYurenHao0426 <blackhao0426@gmail.com>2025-12-17 04:29:37 -0600
committerYurenHao0426 <blackhao0426@gmail.com>2025-12-17 04:29:37 -0600
commite43b3f8aa36c198b95c1e46bea2eaf3893b13dc3 (patch)
tree6ce8a00d2f8b9ebd83c894a27ea01ac50cfb2ff5 /scripts/download_llama.py
Initial commit (clean history)HEADmain
Diffstat (limited to 'scripts/download_llama.py')
-rw-r--r--scripts/download_llama.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/scripts/download_llama.py b/scripts/download_llama.py
new file mode 100644
index 0000000..47c7243
--- /dev/null
+++ b/scripts/download_llama.py
@@ -0,0 +1,16 @@
+from huggingface_hub import snapshot_download
+import os
+
+model_id = "meta-llama/Llama-3.1-8B-Instruct"
+local_dir = "models/llama-3.1-8b-instruct"
+
+os.makedirs(local_dir, exist_ok=True)
+
+print(f"Downloading {model_id} to {local_dir}...")
+snapshot_download(
+ repo_id=model_id,
+ local_dir=local_dir,
+ # token=os.getenv("HF_TOKEN"), # Assuming token is in env or cached
+)
+print("Download complete.")
+