dasLOL commited on
Commit
c26b74d
·
verified ·
1 Parent(s): 2a3b392

slate stage5.sh

Browse files
Files changed (1) hide show
  1. scripts_full/stage5.sh +26 -0
scripts_full/stage5.sh ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/bash
2
+ # stage5: slate models from the train-only base m_lr8
3
+ # c28: 28 layers, 60% of val/test -> hotkey 1/1 (uid 169)
4
+ # b16: 16 layers, 35% of val/test -> hotkey hata/4 (uid 52)
5
+ # d8 : 8 layers, 70% of val/test -> hotkey hata/5 (uid 53)
6
+ set -e
7
+ cd $HOME/mt92
8
+ export TOKENIZERS_PARALLELISM=false
9
+ set -a; . ./.env; set +a
10
+ curl -s -L https://huggingface.co/dasLOL/mt-extract-3g/resolve/main/manifest.json -o manifest_template.json
11
+ [ -d p16m ] || ./venv/bin/python prune.py m_lr8 p16m 16 2>&1 | grep -E 'dropping|saved'
12
+ [ -d p8m ] || ./venv/bin/python prune.py m_lr8 p8m 8 2>&1 | grep -E 'dropping|saved'
13
+ train() { # name base epochs set
14
+ echo "##### $1: base $2, $3 epochs, $4"
15
+ [ -d $1 ] || OUT=$1 BASE=$2 EPOCHS=$3 LR=8e-5 TRAIN=$4 ./venv/bin/python sft.py 2>&1 | tr '\r' '\n' | grep -E "train_loss|saved|Error|error"
16
+ for s in val_all test_all gen_holdout; do ./venv/bin/python evalset.py $1 ex/$s.jsonl; done
17
+ ./venv/bin/python backup_now.py $1 > backup_$1.log 2>&1 && echo "$1 backed up"
18
+ bash ./build_final.sh $1 32 > build_$1.log 2>&1 && grep -E "MICRO|artifact|TTFT" build_$1.log
19
+ cp manifest_template.json onnx_$1/final/manifest.json
20
+ ./venv/bin/python calib.py onnx_$1/final 60 > calib_$1.log 2>&1; grep -v "^probe" calib_$1.log | tr -d "\n"; echo
21
+ ./venv/bin/python up_art.py onnx_$1/final onnx_$1 > up_$1.log 2>&1 && echo "staged onnx_$1"
22
+ }
23
+ train c28 m_lr8 4 ex/full60.jsonl
24
+ train b16 p16m 4 ex/full35.jsonl
25
+ train d8 p8m 8 ex/full70.jsonl
26
+ echo STAGE5_DONE