#!/usr/bin/env bash set -euo pipefail # Run from the package root in an existing compatible AMD ROCm environment. # Replace these paths with your own isolated TRAIN and DEV JSONL files. : "${TRAIN:?Set TRAIN to your training JSONL}" : "${DEV:?Set DEV to your development JSONL}" : "${OUTPUT:?Set OUTPUT to a fresh run directory}" NATIVE="${NATIVE:-./native}" MANIFEST_SHA256="${MANIFEST_SHA256:-f288d873999832a3f37c6a7c4268c2ab309691e621794dbf7acab891acbbb7e6}" export PYTHONPATH="${PWD}${PYTHONPATH:+:${PYTHONPATH}}" export PYTHONDONTWRITEBYTECODE=1 HF_HUB_OFFLINE=1 TRANSFORMERS_OFFLINE=1 TOKENIZERS_PARALLELISM=false python -m decision_finetune validate-jsonl --train "$TRAIN" --dev "$DEV" --selection macro-nll # Device visibility is supplied by the caller, e.g. ROCR_VISIBLE_DEVICES=0. python -m decision_finetune train \ --native "$NATIVE" --manifest-sha256 "$MANIFEST_SHA256" \ --train "$TRAIN" --dev "$DEV" --output "$OUTPUT" \ --epochs 4 --logical-batch-size 64 --micro-batch-size 8 --seed 20260921 \ --encoder-lr 2.5e-5 --head-lr 1e-4 --lr-min 1e-6 \ --weight-decay 0.01 --clip-norm 1 --score-rps-weight 0.1 \ --warmup-ratio 0.1 --selection macro-nll --selection-tolerance 1e-8 \ --cpu-threads 2 --max-reserved-gib 64