-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
66 lines (58 loc) · 1.74 KB
/
Copy pathsetup.sh
File metadata and controls
66 lines (58 loc) · 1.74 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#!/bin/bash
# Quick setup script for DeepSeek MoE training
echo "🚀 Setting up DeepSeek MoE Training Environment"
echo "=================================================="
# Check Python version
python_version=$(python3 --version 2>&1)
echo "🐍 Python: $python_version"
# Check CUDA
if command -v nvidia-smi &> /dev/null; then
echo "🖥️ NVIDIA GPU detected:"
nvidia-smi --query-gpu=name,memory.total --format=csv,noheader,nounits | head -1
else
echo "⚠️ No NVIDIA GPU detected - training will use CPU"
fi
# Install requirements
echo ""
echo "📦 Installing requirements..."
pip install -r requirements.txt
# Create directories
echo ""
echo "📁 Creating directories..."
mkdir -p checkpoints
mkdir -p logs
mkdir -p dataset_cache
# Download small test dataset (optional)
echo ""
echo "📥 Setting up test data..."
python3 -c "
import os
try:
from datasets import load_dataset
print('Downloading small test dataset...')
dataset = load_dataset('HuggingFaceH4/CodeAlpaca_20K', split='train[:100]')
print(f'Test dataset loaded: {len(dataset)} samples')
print('✅ Dataset setup successful!')
except Exception as e:
print(f'❌ Dataset setup failed: {e}')
print('Will use synthetic data instead')
"
echo ""
echo "🎯 Setup complete! You can now run training with:"
echo ""
echo "# Basic training with real data:"
echo "python3 train_moe.py"
echo ""
echo "# Python-only training:"
echo "python3 train_moe.py --python-only"
echo ""
echo "# Synthetic data (faster):"
echo "python3 train_moe.py --use-synthetic"
echo ""
echo "# Custom configuration:"
echo "python3 train_moe.py --max-steps 5000 --batch-size 2"
echo ""
echo "📊 Monitor training with:"
echo "tensorboard --logdir logs"
echo ""
echo "🎉 Happy training!"