8aeddebce9
- tests/test_instruct_check.py: cover load_by_category (bucketing/cap/seed
determinism/short-pool/blank-line) and _forecast_list (nested/flat/
dict/garbage). 8 tests pass.
- train_stage{1,2}.sh: export PYTHONPATH=src + PYTHONUNBUFFERED=1 so future
background runs stream logs live (current stage2 run is block-buffered).
25 lines
615 B
Bash
Executable File
25 lines
615 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# Stage ② SFT training (T4.1). Loads stage ① ckpt, enables LoRA(r=16) on q/v_proj.
|
|
set -euo pipefail
|
|
|
|
DATA="${1:-data/sft.jsonl}"
|
|
MAX_STEPS="${2:-10000}"
|
|
STAGE1_CKPT="${3:-checkpoints/stage1/stage1_final.pt}"
|
|
CKPT_DIR="${4:-checkpoints/stage2}"
|
|
|
|
cd "$(dirname "$0")/.."
|
|
export PYTHONPATH=src PYTHONUNBUFFERED=1
|
|
.venv/bin/python -m tsmm.train.stage2 \
|
|
--data "$DATA" \
|
|
--stage1_ckpt "$STAGE1_CKPT" \
|
|
--ckpt_dir "$CKPT_DIR" \
|
|
--max_steps "$MAX_STEPS" \
|
|
--bs 4 \
|
|
--grad_accum 8 \
|
|
--ctx 1024 \
|
|
--lr 1e-4 \
|
|
--lora_r 16 \
|
|
--log_every 20 \
|
|
--ckpt_every 2000 \
|
|
--tensorboard
|