blob: 47c7243a13fada88a23f3cd9b4aa68ee32963928 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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.")
|