输入输出微调,单机双卡3090如何设置.sh #537
Closed
Eternal-Yan
started this conversation in
General
Replies: 1 comment
-
#253 在这里咨询关于微调的问题 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
#! /usr/bin/env bash
set -ex
PRE_SEQ_LEN=128
LR=2e-2
NUM_GPUS=1
MAX_SOURCE_LEN=1024
MAX_TARGET_LEN=128
DEV_BATCH_SIZE=1
GRAD_ACCUMULARION_STEPS=32
MAX_STEP=1000
SAVE_INTERVAL=500
DATESTR=
date +%Y%m%d-%H%M%S
RUN_NAME=advertise_gen_pt
BASE_MODEL_PATH=THUDM/chatglm3-6b
DATASET_PATH=formatted_data/advertise_gen.jsonl
OUTPUT_DIR=output/${RUN_NAME}-${DATESTR}-${PRE_SEQ_LEN}-${LR}
mkdir -p $OUTPUT_DIR
torchrun --standalone --nnodes=1 --nproc_per_node=$NUM_GPUS finetune.py$PRE_SEQ_LEN 2>&1 | tee $ {OUTPUT_DIR}/train.log
--train_format input-output
--train_file $DATASET_PATH
--preprocessing_num_workers 1
--model_name_or_path $BASE_MODEL_PATH
--output_dir $OUTPUT_DIR
--max_source_length $MAX_SOURCE_LEN
--max_target_length $MAX_TARGET_LEN
--per_device_train_batch_size $DEV_BATCH_SIZE
--gradient_accumulation_steps $GRAD_ACCUMULARION_STEPS
--max_steps $MAX_STEP
--logging_steps 1
--save_steps $SAVE_INTERVAL
--learning_rate $LR
--pre_seq_len
Beta Was this translation helpful? Give feedback.
All reactions