File size: 1,126 Bytes
811e03d
 
 
 
1ff7e9f
 
 
 
811e03d
 
 
1ff7e9f
811e03d
 
 
 
 
1ff7e9f
811e03d
 
 
1ff7e9f
811e03d
 
1ff7e9f
811e03d
 
 
 
 
1ff7e9f
811e03d
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
export WANDB_MODE=disabled
export CUDA_LAUNCH_BLOCKING=0

DATASET=Instruments
BASE_MODEL=/home/jovyan/workspace/Llama-7b
RQVAE_MODEL=/home/jovyan/workspace/LC-Rec/index/Ins/Apr-04-2025_07-12-04/best_collision_model.pth
DATA_PATH=/home/jovyan/workspace
OUTPUT_DIR=./Ins

mkdir -p $OUTPUT_DIR

torchrun --nproc_per_node=4 pre-train.py \
    --base_model $BASE_MODEL \
    --rqvae_model $RQVAE_MODEL \
    --output_dir $OUTPUT_DIR \
    --dataset $DATASET \
    --data_path $DATA_PATH \
    --per_device_batch_size 8 \
    --gradient_accumulation_steps 2 \
    --learning_rate 5e-4 \
    --model_max_length 1024 \
    --epochs 1 \
    --weight_decay 0.01 \
    --save_and_eval_strategy epoch \
    --deepspeed ./config/ds_z2_bf16.json \
    --dataloader_num_workers 4 \
    --only_train_response \
    --tasks seqrec,itemsearch,inters2title,inters2description,preferenceobtain,item2index,index2item,intertitles2item,query2item \
    --train_prompt_sample_num 1,1,1,1,1,1,1,1,1 \
    --train_data_sample_num 0,0,0,0,0,0,0,0,0 \
    --bf16 &>>$OUTPUT_DIR/log.txt

cd convert
nohup ./convert.sh $OUTPUT_DIR >convert.log 2>&1 &
cd ..