deepseekv2lite_densemixer / download_original.py
autoprogrammer's picture
Upload DeepSeekV2Lite DenseMixer model
f10caa3 verified
#!/usr/bin/env python3
"""
Download original DeepSeek-V2-Lite model and copy to our directory
"""
import os
from huggingface_hub import snapshot_download
import shutil
# Download original model
print("Downloading original DeepSeek-V2-Lite model...")
original_path = snapshot_download(
repo_id="deepseek-ai/DeepSeek-V2-Lite",
cache_dir="/tmp/deepseek_download"
)
print(f"Downloaded to: {original_path}")
# Target directory
target_dir = "/mnt/weka/home/shibo.hao/feng/code/junxia/deepseekv2lite"
# Files to copy (only model weights, keep our custom files)
files_to_copy = [
"model-00001-of-000004.safetensors",
"model-00002-of-000004.safetensors",
"model-00003-of-000004.safetensors",
"model-00004-of-000004.safetensors",
"model.safetensors.index.json"
]
# Copy files
print("Copying model weight files...")
for filename in files_to_copy:
src = os.path.join(original_path, filename)
dst = os.path.join(target_dir, filename)
if os.path.exists(src):
print(f"Copying {filename}...")
shutil.copy2(src, dst)
# Check file size
size = os.path.getsize(dst)
print(f" Size: {size / (1024**3):.2f} GB")
else:
print(f"Warning: {filename} not found in original model")
print("Done! Model weights copied successfully.")