train.py 执行失败,出现 TypeError: Object of type Tensor is not JSON serializable
I am running the trainer like this:
torchrun --nproc_per_node={PROCS} --master_port=8080 train.py
--model_name_or_path {MODEL}
--data_path ./alpaca_data.json
--bf16 True
--output_dir {OUTPUT}
--num_train_epochs 1
--per_device_train_batch_size {BATCH}
--per_device_eval_batch_size {BATCH}
--gradient_accumulation_steps {GRADIENT}
--evaluation_strategy 'no'
--save_strategy 'steps' --save_steps 2000
--save_total_limit 1
--learning_rate 2e-5 --weight_decay 0.
--warmup_ratio 0.03
--lr_scheduler_type 'cosine'
--logging_steps 1
--tf32 True
--deepspeed
…
内容来源: tatsu-lab/stanford_alpaca