Download scripts_full/phaseD.sh from dasLOL/mt92-extract-work: direct link, hf CLI and curl.
- Browser
- Download file 1.23 kB
-
https://huggingface.co/dasLOL/mt92-extract-work/resolve/main/scripts_full/phaseD.sh
- Command line
-
hf download hf://dasLOL/mt92-extract-work/scripts_full/phaseD.sh
-
curl -L -o phaseD.sh https://huggingface.co/dasLOL/mt92-extract-work/resolve/main/scripts_full/phaseD.sh
1.23 kB
| # phase D: coverage sweep for classify (generalisation rises with coverage, so lower than the first-order pick) | |
| cd $HOME/mt92 | |
| export TOKENIZERS_PARALLELISM=false OMP_NUM_THREADS=8 | |
| set -a; . ./.env; set +a | |
| export CAL=ex/cl_train0.jsonl | |
| LOG=$HOME/mt92/phaseD.log | |
| say() { echo "[$(date -u +%H:%M:%S)] $*" | tee -a $LOG; } | |
| acc() { ./venv/bin/python evalcl.py $1 ex/$2.jsonl 2>&1 | grep -oE "ACCURACY [0-9.]+" | awk '{print $2}'; } | |
| tr() { [ -d $1 ] || OUT=$1 BASE=$2 EPOCHS=$3 LR=8e-5 TRAIN=$4 ./venv/bin/python sft.py > train_$1.log 2>&1 | |
| V=$(acc $1 cl_validation_all); T=$(acc $1 cl_test_all); say "$1 ($2, $3 ep, $4): val $V test $T comb $(python3 -c "print(round(0.667*$T+0.333*$V,4))")"; } | |
| tr cld2_40 p2c 16 ex/cl_full40.jsonl | |
| tr cld2_50 p2c 16 ex/cl_full50.jsonl | |
| tr clb8_30 p8c 8 ex/cl_full30.jsonl | |
| tr clb8_45 p8c 8 ex/cl_full45.jsonl | |
| tr clc16_30 p16c 4 ex/cl_full30.jsonl | |
| tr clc16_45 p16c 4 ex/cl_full45.jsonl | |
| tr cla4_30 p4c 10 ex/cl_full30.jsonl | |
| say "PHASE_D_DONE" | |
| ./venv/bin/python - <<PY | |
| import os | |
| from huggingface_hub import HfApi | |
| HfApi(token=os.environ["HF_TOKEN"]).upload_file(path_or_fileobj="$LOG", path_in_repo="scripts_full/phaseD.log", repo_id="dasLOL/mt92-extract-work", commit_message="phaseD log") | |
| PY | |