local-script-backup / train_ar_conditioned.sh
Ouzhang's picture
Upload folder using huggingface_hub
b2632a6 verified
Raw
History Blame Contribute Delete
1.12 kB
#!/usr/bin/env bash
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
source "${SCRIPT_DIR}/../00_setup/env.sh"
cd "${GENERATOR_DIR}"
python3 src/tasks/downstream/fine_tuning.py \
--model_name "${GENERATOR_BASE_MODEL}" \
--parquet_path "${CONDITIONED_DEEPSTARR_DIR}/train.parquet" \
--sequence_col conditioned_sequence \
--conditioned_input \
--output_dir "${RESULT_ROOT}/checkpoints/deepstarr_sft_conditioned" \
--saved_model_dir "${AR_COND_MODEL}" \
--tmp_dir "${RUN_ROOT}/tmp/deepstarr_sft_conditioned" \
--epochs "${AR_EPOCHS:-3}" \
--batch_size "${AR_BATCH_SIZE:-4}" \
--gradient_accumulation "${AR_GRAD_ACCUM:-1}" \
--lr "${AR_LR:-5e-5}" \
--max_token_length "${AR_MAX_TOKEN_LENGTH:-256}" \
--attn_implementation "${ATTN_IMPLEMENTATION:-sdpa}" \
--bf16 \
--report_to none \
--run_name deepstarr_sft_conditioned
for filename in modeling_generator.py tokenizer.py; do
if [[ -f "${GENERATOR_BASE_MODEL}/${filename}" && ! -f "${AR_COND_MODEL}/${filename}" ]]; then
cp "${GENERATOR_BASE_MODEL}/${filename}" "${AR_COND_MODEL}/${filename}"
fi
done