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|
| 6 |
+
|
| 7 |
+
## π Key Paths
|
| 8 |
+
|
| 9 |
+
### **Base Model**
|
| 10 |
+
```
|
| 11 |
+
codellama-migration/models/base-models/CodeLlama-7B-Instruct/
|
| 12 |
+
```
|
| 13 |
+
**Status:** β³ Downloading (~10-15 minutes)
|
| 14 |
+
|
| 15 |
+
### **Processed Dataset**
|
| 16 |
+
```
|
| 17 |
+
codellama-migration/datasets/processed/elinnos_fifo_codellama_v1.jsonl
|
| 18 |
+
```
|
| 19 |
+
**Status:** β
Ready (94 samples)
|
| 20 |
+
|
| 21 |
+
### **Training Output Directory**
|
| 22 |
+
```
|
| 23 |
+
codellama-migration/training-outputs/
|
| 24 |
+
```
|
| 25 |
+
**Status:** β³ Waiting for training
|
| 26 |
+
|
| 27 |
+
### **Updated Inference Script**
|
| 28 |
+
```
|
| 29 |
+
codellama-migration/scripts/inference/inference_codellama.py
|
| 30 |
+
```
|
| 31 |
+
**Status:** β
Updated with code extraction
|
| 32 |
+
|
| 33 |
+
### **Progress Tracker**
|
| 34 |
+
```
|
| 35 |
+
codellama-migration/MIGRATION_PROGRESS.md
|
| 36 |
+
```
|
| 37 |
+
**Status:** β
Updated in real-time
|
| 38 |
+
|
| 39 |
+
---
|
| 40 |
+
|
| 41 |
+
## π§ Training Command (When Ready)
|
| 42 |
+
|
| 43 |
+
```bash
|
| 44 |
+
cd /workspace/ftt
|
| 45 |
+
|
| 46 |
+
# Split dataset first
|
| 47 |
+
python3 -c "
|
| 48 |
+
import json
|
| 49 |
+
import random
|
| 50 |
+
random.seed(42)
|
| 51 |
+
samples = [json.loads(l) for l in open('codellama-migration/datasets/processed/elinnos_fifo_codellama_v1.jsonl')]
|
| 52 |
+
random.shuffle(samples)
|
| 53 |
+
train = samples[:75]
|
| 54 |
+
with open('codellama-migration/datasets/processed/train.jsonl', 'w') as f:
|
| 55 |
+
for s in train:
|
| 56 |
+
f.write(json.dumps(s) + '\n')
|
| 57 |
+
"
|
| 58 |
+
|
| 59 |
+
# Training command (adjust paths when model is downloaded)
|
| 60 |
+
cd semicon-finetuning-scripts
|
| 61 |
+
python3 models/msp/ft/finetune_mistral7b.py \
|
| 62 |
+
--base-model /workspace/ftt/codellama-migration/models/base-models/CodeLlama-7B-Instruct \
|
| 63 |
+
--dataset /workspace/ftt/codellama-migration/datasets/processed/train.jsonl \
|
| 64 |
+
--output-dir /workspace/ftt/codellama-migration/training-outputs/mistral-finetuned-codellama-v1 \
|
| 65 |
+
--max-length 2048
|
| 66 |
+
```
|
| 67 |
+
|
| 68 |
+
**Recommended Parameters:**
|
| 69 |
+
- Epochs: 5 (instead of 3)
|
| 70 |
+
- Learning Rate: 2e-5 (instead of 5e-5)
|
| 71 |
+
- LoRA Rank: 64 (instead of 32)
|
| 72 |
+
- LoRA Alpha: 128 (instead of 64)
|
| 73 |
+
|
| 74 |
+
---
|
| 75 |
+
|
| 76 |
+
## π Training Parameters Reference
|
| 77 |
+
|
| 78 |
+
| Parameter | Old Value | New Value |
|
| 79 |
+
|-----------|-----------|-----------|
|
| 80 |
+
| **Epochs** | 3 | **5** |
|
| 81 |
+
| **Learning Rate** | 5e-5 | **2e-5** |
|
| 82 |
+
| **LoRA Rank** | 32 | **64** |
|
| 83 |
+
| **LoRA Alpha** | 64 | **128** |
|
| 84 |
+
| **Temperature** | 0.7 | **0.3** |
|
| 85 |
+
|
| 86 |
+
---
|
| 87 |
+
|
| 88 |
+
## π Monitoring Downloads
|
| 89 |
+
|
| 90 |
+
```bash
|
| 91 |
+
# Check download progress
|
| 92 |
+
tail -f codellama-migration/download_log.txt
|
| 93 |
+
|
| 94 |
+
# Check if download is complete
|
| 95 |
+
ls -lh codellama-migration/models/base-models/CodeLlama-7B-Instruct/
|
| 96 |
+
|
| 97 |
+
# Expected files when complete:
|
| 98 |
+
# - config.json
|
| 99 |
+
# - tokenizer.json
|
| 100 |
+
# - tokenizer_config.json
|
| 101 |
+
# - pytorch_model-*.bin (or .safetensors)
|
| 102 |
+
```
|
| 103 |
+
|
| 104 |
+
---
|
| 105 |
+
|
| 106 |
+
## β
Completed Tasks Checklist
|
| 107 |
+
|
| 108 |
+
- [x] Folder structure created
|
| 109 |
+
- [x] Dataset reformatted (94 samples)
|
| 110 |
+
- [x] Inference script updated
|
| 111 |
+
- [x] Training script symlinks created
|
| 112 |
+
- [x] Progress tracker created
|
| 113 |
+
- [ ] Model downloaded (in progress)
|
| 114 |
+
- [ ] Dataset split (train/val/test)
|
| 115 |
+
- [ ] Training completed
|
| 116 |
+
- [ ] Testing completed
|
| 117 |
+
|
| 118 |
+
---
|
| 119 |
+
|
| 120 |
+
## π― Next Steps
|
| 121 |
+
|
| 122 |
+
1. **Wait for model download** (~10-15 minutes)
|
| 123 |
+
- Monitor: `tail -f codellama-migration/download_log.txt`
|
| 124 |
+
|
| 125 |
+
2. **Split dataset** into train/val/test
|
| 126 |
+
- 75 training / 9 validation / 10 test
|
| 127 |
+
|
| 128 |
+
3. **Start training** with CodeLlama
|
| 129 |
+
- Use updated parameters
|
| 130 |
+
- Output to `codellama-migration/training-outputs/`
|
| 131 |
+
|
| 132 |
+
4. **Test** on 3 training + 3 test samples
|
| 133 |
+
- Compare with previous Mistral results
|
| 134 |
+
|
| 135 |
+
---
|
| 136 |
+
|
| 137 |
+
**For detailed progress, see:** `MIGRATION_PROGRESS.md`
|
| 138 |
+
|
| 139 |
+
|