pet icon indicating copy to clipboard operation
pet copied to clipboard

Token indices sequence length is longer than the specified maximum sequence length for this model

Open Claymore715 opened this issue 2 years ago • 2 comments

below is my parameters,how counld I fix it

!python "/content/drive/MyDrive/pet-master/cli.py" --method pet
--pattern_ids 0 1 2 3 4
--data_dir "/content/drive/MyDrive/pet-master/data/yahoo_answers_csv"
--model_type roberta
--model_name_or_path roberta-large
--task_name yahoo
--output_dir "/content/drive/MyDrive/pet-master/output_dir"
--do_train
--do_eval
--pet_max_seq_length 1500
--sc_max_seq_length 1500

Claymore715 avatar Apr 27 '22 09:04 Claymore715

Hi, I got the same problem. May I ask whether you resolved this issue? And how? Thanks a lot

1jiahe avatar Mar 06 '23 22:03 1jiahe

Hi, I got the same problem and I solve it by adding Truncation=True and max_length=[max_len] in two encode functions: Snipaste_2023-03-07_09-30-56

As far as I can see this is just a warning message to inform you that the input text is too long, but it doesn't affect the training result, only the output is a bit annoying.

thatmee avatar Mar 07 '23 01:03 thatmee