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

Standard FT does not work #30

Open
YaNgZhAnG-V5 opened this issue Jan 25, 2024 · 4 comments
Open

Standard FT does not work #30

YaNgZhAnG-V5 opened this issue Jan 25, 2024 · 4 comments

Comments

@YaNgZhAnG-V5
Copy link

Hi, thank for the great work!

When I tried to run your baseline evaluation script with:

TASK=SST-2 K=16 SEED=42 BS=8 LR=1e-5 MODEL=roberta-large bash finetune.sh

the script will break during evaluation with this error message:
TypeError: repeat(): argument 'repeats' (position 1) must be tuple of ints, but found element of type NoneType at pos 0

Can you check the standard FT script to see if there is any issue?

@gaotianyu1350
Copy link
Member

Hi, are you using multi-gpu setup? Also, can you share your pytorch/transformers versions?

@YaNgZhAnG-V5
Copy link
Author

Thanks for reaching back! I am using the single-gpu setup. For the environment setting, I am using torch 2.1.2+cu118 and transformers 4.37.1

@gaotianyu1350
Copy link
Member

Hi, can you try transformers==4.28.1, this is the version of transformers that we used to test the code base.

@aparna-aketi
Copy link

I had the same issue with transformers==4.44.2. The problem is with get_eval_dataloader function in the Trainer class. The output eval_dataloader has batch_size attribute as None. However, the eval_dataloader.batch_sampler.batch_size has the right batch-size value. I fixed it by modified the batch_size variable to dataloader.batch_sampler.batch_size in prediction_loop() function of the Transformer's Trainer class. I am not sure if there is a better way to fix this bug without modifying the transformers library.

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