zhengshi119

Results 5 comments of zhengshi119

I meet the same question, Could anyone can help me? Thank you very much!

> --per_device_train_batch_size 1 需要改为大于1 当per_device_train_batch_size==4时,出现问题:Cannot handle batch sizes > 1 if no padding token is defined,这是为什么?

> set padding token = 0 出问题:ValueError: Cannot set a non-string value as the PAD token 我在代码添加 tokenizer.pad_token = 0 的位置: if tokenizer.pad_token_id is None: if tokenizer.unk_token_id is not None:...

> 用的啥模型?为啥pad token都没设置?是非标准模型吗 模型是Meta-Llama-3.1-8B

是llama3 的 pad token的问题, 在在以下json文件添加pad_token就没问题了 ![image](https://github.com/user-attachments/assets/0f8761d9-e973-49fc-9d36-20d574c060b5) 修改完之后,不会出现忽高忽低的情况,但是step==30时,就已经loss=0,eval_loss接近0 ![image](https://github.com/user-attachments/assets/454b59b6-2d0c-402c-9eda-ed2ef8939b1f) 为什么step才30,loss就接近0 了,这是为什么? 我的sh如下: CUDA_VISIBLE_DEVICES=0,1,2,3 python reward_modeling.py \ --model_type llama \ --model_name_or_path ./test_5/merged-sft \ --train_file_dir ./test_4/data/reward \ --validation_file_dir ./test_4/data/reward \ --per_device_train_batch_size 2 \...