#!/usr/bin/env python3.12
# I was created using A.I.
# I was tuned for 12GB Nvram without spill-over
import os
import fnmatch
# 1. Force the ultra-fast Rust downloader (bypasses tqdm progress bugs)
os.environ["HF_HUB_ENABLE_HF_TRANSFER"] = "1"
# 2. Quiet the verbose huggingface/tqdm warnings if desired
os.environ["HF_HUB_DISABLE_SYMLINKS_WARNING"] = "1"
from huggingface_hub import snapshot_download
# Defined queue configuration across all your system VRAM profiles (8, 10, 12, 14, 16)
DOWNLOAD_QUEUE = [
# ==================== 8GB VRAM TIER ====================
{
"name": "Qwen2.5-Coder-7B-Instruct (Q5_K_M) [~5.4 GB Ollama Equiv]",
"repo_id": "unsloth/Qwen2.5-Coder-7B-Instruct-GGUF",
"allow_patterns": ["*Q5_K_M*.gguf"],
"local_dir": "/home/x/hugging/8",
"max_workers": 3,
},
{
"name": "DeepSeek-R1-Distill-Qwen-1.5B (Q8_0) [~1.1 GB Ollama Equiv]",
"repo_id": "unsloth/DeepSeek-R1-Distill-Qwen-1.5B-GGUF",
"allow_patterns": ["*Q8_0*.gguf"],
"local_dir": "/home/x/hugging/8",
"max_workers": 3,
},
{
"name": "DeepSeek-Coder-6.7B-Instruct (Q5_K_M) [~3.8 GB Ollama Equiv]",
"repo_id": "bartowski/deepseek-coder-6.7b-instruct-GGUF",
"allow_patterns": ["*Q5_K_M*.gguf"],
"local_dir": "/home/x/hugging/8",
"max_workers": 3,
},
{
"name": "Qwen2.5-Coder-3B-Instruct (Q5_K_M) [~2.2 GB Ollama Equiv]",
"repo_id": "unsloth/Qwen2.5-Coder-3B-Instruct-GGUF",
"allow_patterns": ["*Q5_K_M*.gguf"],
"local_dir": "/home/x/hugging/8",
"max_workers": 3,
},
{
"name": "Qwen2.5-Coder-3B-Instruct (Q4_K_M) [~1.9 GB Ollama Equiv]",
"repo_id": "unsloth/Qwen2.5-Coder-3B-Instruct-GGUF",
"allow_patterns": ["*Q4_K_M*.gguf"],
"local_dir": "/home/x/hugging/8",
"max_workers": 3,
},
{
"name": "Qwen3-8B-Instruct (Q4_K_M) [~5.2 GB Ollama Equiv]",
"repo_id": "unsloth/Qwen3-8B-Instruct-GGUF",
"allow_patterns": ["*Q4_K_M*.gguf"],
"local_dir": "/home/x/hugging/8",
"max_workers": 4,
},
{
"name": "Qwen3-4B-Instruct (Q4_K_M) [~2.5 GB Ollama Equiv]",
"repo_id": "unsloth/Qwen3-4B-Instruct-GGUF",
"allow_patterns": ["*Q4_K_M*.gguf"],
"local_dir": "/home/x/hugging/8",
"max_workers": 2,
},
# ==================== 10GB VRAM TIER ====================
{
"name": "Qwen2.5-Coder-14B-Instruct (Q4_K_M) [~9.0 GB Ollama Equiv]",
"repo_id": "unsloth/Qwen2.5-Coder-14B-Instruct-GGUF",
"allow_patterns": ["*Q4_K_M*.gguf"],
"local_dir": "/home/x/hugging/10",
"max_workers": 4,
},
{
"name": "Qwen2.5-Coder-7B-Instruct (Q8_0) [~7.4 GB File]",
"repo_id": "unsloth/Qwen2.5-Coder-7B-Instruct-GGUF",
"allow_patterns": ["*Q8_0*.gguf"],
"local_dir": "/home/x/hugging/10",
"max_workers": 3,
},
{
"name": "Qwen3-14B-Instruct (Q4_K_M) [~9.3 GB Ollama Equiv]",
"repo_id": "unsloth/Qwen3-14B-Instruct-GGUF",
"allow_patterns": ["*Q4_K_M*.gguf"],
"local_dir": "/home/x/hugging/10",
"max_workers": 4,
},
{
"name": "DeepSeek-Coder-V2-Lite-16B (IQ4_XS) [~8.6 GB File]",
"repo_id": "bartowski/DeepSeek-Coder-V2-Instruct-GGUF",
"allow_patterns": ["*IQ4_XS*.gguf"],
"local_dir": "/home/x/hugging/10",
"max_workers": 4,
},
# ==================== 12GB VRAM TIER (YOUR 12GB SWEET SPOT) ====================
{
"name": "Qwen2.5-Coder-14B-Instruct (Q4_K_M) [~9.0 GB Ollama Equiv]",
"repo_id": "unsloth/Qwen2.5-Coder-14B-Instruct-GGUF",
"allow_patterns": ["*Q4_K_M*.gguf"],
"local_dir": "/home/x/hugging/12",
"max_workers": 4,
},
{
"name": "Qwen3-14B-Instruct (Q4_K_M) [~9.3 GB Ollama Equiv]",
"repo_id": "unsloth/Qwen3-14B-Instruct-GGUF",
"allow_patterns": ["*Q4_K_M*.gguf"],
"local_dir": "/home/x/hugging/12",
"max_workers": 4,
},
{
"name": "DeepSeek-Coder-V2-Lite-16B (Q5_K_M) [~11.0 GB Ollama Equiv]",
"repo_id": "bartowski/DeepSeek-Coder-V2-Instruct-GGUF",
"allow_patterns": ["*Q5_K_M*.gguf"],
"local_dir": "/home/x/hugging/12",
"max_workers": 4,
},
{
"name": "DeepSeek-Coder-6.7B-Instruct (Q8_0) [~7.2 GB File]",
"repo_id": "bartowski/deepseek-coder-6.7b-instruct-GGUF",
"allow_patterns": ["*Q8_0*.gguf"],
"local_dir": "/home/x/hugging/12",
"max_workers": 4,
},
{
"name": "Qwen3.6-35B-A3B (UD-IQ3_S)",
"repo_id": "unsloth/Qwen3.6-35B-A3B-GGUF",
"allow_patterns": ["*UD-IQ3_S*.gguf"],
"local_dir": "/home/x/hugging/12",
"max_workers": 8,
},
# ==================== 14GB VRAM TIER ====================
{
"name": "Qwen3.6-35B-A3B (UD-IQ4_XS)",
"repo_id": "unsloth/Qwen3.6-35B-A3B-GGUF",
"allow_patterns": ["*UD-IQ4_XS*.gguf"],
"local_dir": "/home/x/hugging/14",
"max_workers": 8,
},
{
"name": "Qwen2.5-Coder-14B-Instruct (Q5_K_M) [~10.1 GB File]",
"repo_id": "unsloth/Qwen2.5-Coder-14B-Instruct-GGUF",
"allow_patterns": ["*Q5_K_M*.gguf"],
"local_dir": "/home/x/hugging/14",
"max_workers": 6,
},
{
"name": "DeepSeek-Coder-V2-Lite-16B (Q5_K_M) [~11.0 GB Ollama Equiv]",
"repo_id": "bartowski/DeepSeek-Coder-V2-Instruct-GGUF",
"allow_patterns": ["*Q5_K_M*.gguf"],
"local_dir": "/home/x/hugging/14",
"max_workers": 5,
},
# ==================== 16GB VRAM TIER ====================
{
"name": "Qwen2.5-Coder-14B-Instruct (Q8_0) [~15.0 GB File]",
"repo_id": "unsloth/Qwen2.5-Coder-14B-Instruct-GGUF",
"allow_patterns": ["*Q8_0*.gguf"],
"local_dir": "/home/x/hugging/16",
"max_workers": 5,
},
{
"name": "DeepSeek-Coder-V2-Lite-16B (Q8_0) [~11.9 GB File]",
"repo_id": "bartowski/DeepSeek-Coder-V2-Instruct-GGUF",
"allow_patterns": ["*Q8_0*.gguf"],
"local_dir": "/home/x/hugging/16",
"max_workers": 6,
},
{
"name": "Qwen3.8-27B-UD (IQ3_S)",
"repo_id": "unsloth/Qwen3.8-27B-GGUF",
"allow_patterns": ["*IQ3_S*.gguf"],
"local_dir": "/home/x/hugging/16",
"max_workers": 6,
},
]
def main():
total_models = len(DOWNLOAD_QUEUE)
print(f"🚀 Initializing complete model sync pipeline: {total_models} items targets.")
print("="*70)
for index, target in enumerate(DOWNLOAD_QUEUE, start=1):
print(f"\n[{index}/{total_models}] Syncing -> {target['name']}")
print(f"📂 Location: {target['local_dir']}")
os.makedirs(target['local_dir'], exist_ok=True)
already_exists = False
try:
flat_files = os.listdir(target['local_dir'])
for filename in flat_files:
if os.path.isfile(os.path.join(target['local_dir'], filename)):
for pattern in target['allow_patterns']:
if fnmatch.fnmatch(filename, pattern):
already_exists = True
break
if already_exists:
break
except Exception:
pass
if already_exists:
print(f"⏭️ File matching {target['allow_patterns']} found at top level. Skipping download.")
continue
try:
snapshot_download(
repo_id=target["repo_id"],
allow_patterns=target["allow_patterns"],
local_dir=target["local_dir"],
max_workers=target["max_workers"]
)
print(f"✨ Successfully synced {target['name']}")
except Exception as e:
print(f"❌ Error downloading {target['name']}: {e}")
print("\n🎉 Global system profile synchronization complete!")
if __name__ == "__main__":
main()