Spaces:
Sleeping
Sleeping
havinashpatil
Finalizing CodeArena RL Benchmark: frontend improvements, GRPO training scripts, and cleaned environment
03a7eb9 | # Installation script for PyTorch and fine-tuning dependencies | |
| # Run this to set up your environment correctly | |
| set -e # Exit on error | |
| echo "======================================" | |
| echo "CODEARENA FINE-TUNING SETUP" | |
| echo "======================================" | |
| echo "" | |
| # Check Python version | |
| python_version=$(python --version 2>&1 | awk '{print $2}') | |
| echo "β Python version: $python_version" | |
| echo "" | |
| # Detect CUDA/GPU | |
| echo "Checking GPU availability..." | |
| python -c " | |
| import torch | |
| if torch.cuda.is_available(): | |
| print(f'β GPU: {torch.cuda.get_device_name(0)}') | |
| print(f' VRAM: {torch.cuda.get_device_properties(0).total_memory / 1e9:.1f}GB') | |
| else: | |
| print('β No GPU detected - training will use CPU (very slow)') | |
| " || echo "GPU check failed (this is OK if running on CPU-only system)" | |
| echo "" | |
| # Install PyTorch with CUDA 12.1 support (compatible with modern GPUs) | |
| echo "Installing PyTorch..." | |
| pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121 -q | |
| echo "β PyTorch installed" | |
| echo "" | |
| # Install fine-tuning dependencies | |
| echo "Installing fine-tuning dependencies..." | |
| pip install -r requirements-finetune.txt -q | |
| echo "β Dependencies installed" | |
| echo "" | |
| # Verify installation | |
| echo "Verifying installation..." | |
| python -c " | |
| import torch | |
| import transformers | |
| import peft | |
| import trl | |
| import datasets | |
| print(f'β PyTorch: {torch.__version__}') | |
| print(f'β Transformers: {transformers.__version__}') | |
| print(f'β PEFT: {peft.__version__}') | |
| print(f'β TRL: {trl.__version__}') | |
| print(f'β Datasets: {datasets.__version__}') | |
| " | |
| echo "" | |
| echo "======================================" | |
| echo "SETUP COMPLETE" | |
| echo "======================================" | |
| echo "" | |
| echo "Next steps:" | |
| echo "1. Run fine-tuning:" | |
| echo " python quickstart_finetune.py" | |
| echo "" | |
| echo "2. Or directly specify model:" | |
| echo " python finetune_models.py --model llama3.2 --num-epochs 3" | |
| echo "" | |