Download examples/lora_tiny.sh from koreashin/simcheongi: direct link, hf CLI and curl.
- Browser
- Download file 1.16 kB
-
https://huggingface.co/koreashin/simcheongi/resolve/main/examples/lora_tiny.sh
- Command line
-
hf download hf://koreashin/simcheongi/examples/lora_tiny.sh
-
curl -L -o lora_tiny.sh https://huggingface.co/koreashin/simcheongi/resolve/main/examples/lora_tiny.sh
1.16 kB
| # Tiny LoRA run on a SYNTHETIC dataset: train -> adapter -> load / merge -> evaluate (pipeline check). | |
| # bash examples/lora_tiny.sh [MODEL] [WORKDIR] | |
| set -euo pipefail | |
| cd "$(dirname "$0")/.." | |
| MODEL=${1:-koreashin/simcheongi} | |
| WORK=${2:-./_tiny_runs} | |
| DEVICE=${DEVICE:-cuda} | |
| python tools/make_fake_dataset.py --out "$WORK/fake_bc" --episodes 4 --decisions 12 --val-episodes 1 | |
| python train_lora.py --init "$MODEL" --data "$WORK/fake_bc" --out "$WORK/lora_tiny" --device "$DEVICE" \ | |
| --steps 20 --batch 2 --lr 2e-4 --warmup 2 --workers 2 --log-every 1 --save-every 0 --keep-every 0 \ | |
| --lora-rank 16 --lora-alpha 16 | |
| python merge_lora.py --base "$MODEL" --adapter "$WORK/lora_tiny/final" --out "$WORK/lora_tiny_merged" | |
| python eval_offline.py --model "$MODEL" --data "$WORK/fake_bc" --split train --device "$DEVICE" | |
| python eval_offline.py --model "$MODEL" --adapter "$WORK/lora_tiny/final" --data "$WORK/fake_bc" --split train --device "$DEVICE" | |
| python eval_offline.py --model "$WORK/lora_tiny_merged" --data "$WORK/fake_bc" --split train --device "$DEVICE" | |
| echo "adapter: $WORK/lora_tiny/final merged model: $WORK/lora_tiny_merged" | |