Spaces:
Build error
Build error
File size: 2,280 Bytes
9b4ef96 |
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 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 |
#!/bin/bash
echo "π Alternative Models Setup"
echo "==========================="
# Check if virtual environment exists
if [ ! -d "venv" ]; then
echo "π¦ Virtual environment not found. Creating..."
chmod +x setup.sh
./setup.sh
else
echo "β
Virtual environment found"
fi
# Activate virtual environment
echo "π§ Activating virtual environment..."
source venv/bin/activate
# Check HuggingFace token
if [ -z "$HUGGINGFACE_TOKEN" ]; then
echo "β οΈ HUGGINGFACE_TOKEN not set"
echo "Please set your token:"
echo "export HUGGINGFACE_TOKEN='your_token_here'"
echo ""
read -p "Enter your HuggingFace token: " token
if [ ! -z "$token" ]; then
export HUGGINGFACE_TOKEN="$token"
echo "β
Token set"
else
echo "β No token provided. Exiting..."
exit 1
fi
else
echo "β
HuggingFace token found"
fi
# Create directories
echo "π Creating directories..."
mkdir -p models data configs logs
# Show model options
echo ""
echo "π Model Options Available:"
echo "1. Llama 3.2 1B Instruct - Lightweight and fast"
echo "2. Qwen3 4B Instruct - Good performance, reasonable size"
echo "3. DialoGPT Medium - Conversational AI model"
echo ""
# Ask user preference
read -p "Which model would you like to use? (1-3): " model_choice
case $model_choice in
1)
echo "π― Selected: Llama 3.2 1B Instruct"
;;
2)
echo "π― Selected: Qwen3 4B Instruct"
;;
3)
echo "π― Selected: DialoGPT Medium"
;;
*)
echo "β Invalid choice. Using default: Llama 3.2 1B Instruct"
model_choice=1
;;
esac
echo ""
echo "π Starting model download..."
python scripts/download_alternative_models.py
echo ""
echo "π Setup Complete!"
echo "=================="
echo ""
echo "π Next steps:"
echo "1. Review configuration: ls configs/"
echo "2. Start fine-tuning: python scripts/finetune_lora.py"
echo "3. Test model: python scripts/test_model.py"
echo "4. Or use Novita AI: python scripts/novita_ai_setup.py"
echo ""
echo "π‘ Tips:"
echo "- Always activate venv: source venv/bin/activate"
echo "- Monitor GPU usage: nvidia-smi"
echo "- Check logs: tail -f logs/training.log"
echo ""
echo "π Ready to start fine-tuning!"
|