Prithvik-1 commited on
Commit
47f1a10
·
verified ·
1 Parent(s): 88fc841

Upload start_training.sh with huggingface_hub

Browse files
Files changed (1) hide show
  1. start_training.sh +50 -0
start_training.sh ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/bash
2
+ # Start CodeLlama fine-tuning with optimized hyperparameters
3
+
4
+ cd /workspace/ftt/codellama-migration
5
+
6
+ BASE_MODEL="/workspace/ftt/codellama-migration/models/base-models/CodeLlama-7B-Instruct"
7
+ DATASET="datasets/processed/split/train.jsonl"
8
+ OUTPUT_DIR="training-outputs/codellama-fifo-v1"
9
+
10
+ echo "======================================================================"
11
+ echo "🚀 Starting CodeLlama Fine-Tuning"
12
+ echo "======================================================================"
13
+ echo "Base Model: $BASE_MODEL"
14
+ echo "Dataset: $DATASET"
15
+ echo "Output: $OUTPUT_DIR"
16
+ echo "======================================================================"
17
+
18
+ # Create output directory
19
+ mkdir -p "$OUTPUT_DIR"
20
+
21
+ # Activate virtual environment if needed
22
+ if [ -f /venv/main/bin/activate ]; then
23
+ source /venv/main/bin/activate
24
+ fi
25
+
26
+ # Start training with optimized hyperparameters
27
+ python3 scripts/training/finetune_codellama.py \
28
+ --base-model "$BASE_MODEL" \
29
+ --dataset "$DATASET" \
30
+ --output-dir "$OUTPUT_DIR" \
31
+ --resume-from-checkpoint auto \
32
+ --max-length 1536 \
33
+ --num-epochs 5 \
34
+ --batch-size 2 \
35
+ --gradient-accumulation 4 \
36
+ --learning-rate 2e-5 \
37
+ --lora-r 48 \
38
+ --lora-alpha 96 \
39
+ --lora-dropout 0.15 \
40
+ --warmup-ratio 0.1 \
41
+ --eval-steps 25 \
42
+ --save-steps 25 \
43
+ --early-stopping-patience 5 \
44
+ --logging-steps 5
45
+
46
+ echo ""
47
+ echo "======================================================================"
48
+ echo "✅ Training Complete!"
49
+ echo "======================================================================"
50
+