Last active
April 15, 2025 17:51
-
-
Save vadimkantorov/70e5d6285155cf2fe784dfce74d9ba89 to your computer and use it in GitHub Desktop.
Downloads DeepSeek model weights from HF without weight file duplication in .git/lfs/objects
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
sudo apt-get install git-lfs | |
git lfs install | |
# git clone https://huggingface.co/deepseek-ai/DeepSeek-V3-0324 | |
# du -sh DeepSeek-V3-0324 | |
# # 1.3T DeepSeek-V3-0324/ | |
# du -sh DeepSeek-V3-0324/.git/lfs | |
# # 642G DeepSeek-V3-0324/.git/lfs | |
# https://github.com/git-lfs/git-lfs/discussions/6029 | |
GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/deepseek-ai/DeepSeek-V3-0324 | |
git lfs fetch | |
#git lfs dedup # not available on most Linux filesystems, makes use of some copy-on-write (CoW) filesystem reflink features https://learn.microsoft.com/en-us/windows/win32/fileio/block-cloning | |
cd DeepSeek-V3-0324 | |
git lfs ls-files -l | while read SHA DASH FILEPATH; do rm "$FILEPATH" && ln ".git/lfs/objects/${SHA:0:2}/${SHA:2:2}/$SHA" "$FILEPATH"; done | |
#python -m pip install huggingface_hub[hf_transfer,cli] hf_transfer --user --break-system-packages | |
#HF_HUB_ENABLE_HF_TRANSFER=1 python -c 'import huggingface_hub; huggingface_hub.snapshot_download(repo_id="deepseek-ai/DeepSeek-V3-0324",local_dir="deepseek-ai/DeepSeek-V3-0324",allow_patterns=["*.safetensors"])' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment