#!/bin/bash # Download a test model for AMD GPU runner echo "=== Downloading Test Model for AMD GPU ===" echo "" MODEL_DIR="models" MODEL_FILE="$MODEL_DIR/current_model.gguf" # Create directory if it doesn't exist mkdir -p "$MODEL_DIR" echo "Downloading SmolLM-135M (GGUF format)..." echo "This is a small, fast model perfect for testing AMD GPU acceleration" echo "" # Download SmolLM GGUF model wget -O "$MODEL_FILE" \ "https://huggingface.co/TheBloke/SmolLM-135M-GGUF/resolve/main/smollm-135m.Q4_K_M.gguf" \ --progress=bar if [[ $? -eq 0 ]]; then echo "" echo "โœ… Model downloaded successfully!" echo "๐Ÿ“ Location: $MODEL_FILE" echo "๐Ÿ“Š Size: $(du -h "$MODEL_FILE" | cut -f1)" echo "" echo "๐Ÿš€ Ready to start AMD GPU runner:" echo "docker-compose up -d amd-model-runner" echo "" echo "๐Ÿงช Test the API:" echo "curl http://localhost:11434/completion \\" echo " -H 'Content-Type: application/json' \\" echo " -d '{\"prompt\": \"Hello, how are you?\", \"n_predict\": 50}'" else echo "" echo "โŒ Download failed!" echo "Try manually downloading a GGUF model from:" echo "- https://huggingface.co/TheBloke" echo "- https://huggingface.co/ggml-org/models" echo "" echo "Then place it at: $MODEL_FILE" fi