Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Claymore715 opened this issue Apr 27, 2022 · 2 comments

Comments

@Claymore715
Copy link

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

@1jiahe
Copy link

1jiahe commented Mar 6, 2023

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

@thatmee
Copy link

thatmee commented Mar 7, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants