|
export WANDB_MODE=disabled |
|
export CUDA_LAUNCH_BLOCKING=1 |
|
|
|
ROOT=/home/jovyan/workspace |
|
DATASET=Instruments |
|
BASE_MODEL=$ROOT/Llama-2-7b-hf |
|
DATA_PATH=$ROOT |
|
INDEX=$ROOT/$DATASET/Instruments.index.json |
|
OUTPUT_DIR=./Ins/Llama-2-7b |
|
|
|
mkdir -p $OUTPUT_DIR |
|
|
|
torchrun --nproc_per_node=8 finetune.py \ |
|
--base_model $BASE_MODEL \ |
|
--output_dir $OUTPUT_DIR \ |
|
--dataset $DATASET \ |
|
--data_path $DATA_PATH \ |
|
--per_device_batch_size 6 \ |
|
--gradient_accumulation_steps 2 \ |
|
--learning_rate 5e-5 \ |
|
--epochs 4 \ |
|
--weight_decay 0.01 \ |
|
--save_and_eval_strategy epoch \ |
|
--bf16 \ |
|
--deepspeed ./config/ds_z2_bf16.json \ |
|
--dataloader_num_workers 4 \ |
|
--only_train_response \ |
|
--tasks seqrec,item2index,index2item,fusionseqrec,itemsearch,preferenceobtain \ |
|
--train_prompt_sample_num 1,1,1,1,1,1 \ |
|
--train_data_sample_num 0,0,0,0,0,0 \ |
|
--index_file $INDEX |
|
|
|
cd convert |
|
nohup ./convert.sh $OUTPUT_DIR >convert.log 2>&1 & |
|
cd .. |