Skip to content

[BUG] Transformers model padding should be to "longest" #663

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

Closed
pingzhili opened this issue Apr 7, 2025 · 1 comment
Closed

[BUG] Transformers model padding should be to "longest" #663

pingzhili opened this issue Apr 7, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@pingzhili
Copy link

Describe the bug

transformers model padding is not efficient,

padding="max_length", # we pad to the longest sequence

As the comments say, "we pad to the longest sequence", it should be padding="longest"

To Reproduce

lighteval accelerate \ "pretrained=gpt2" \ "leaderboard|truthfulqa:mc|0|0"

Expected behavior

The initial sequence length does not have to be that long (max length)

Version info

0.8.0

@pingzhili pingzhili added the bug Something isn't working label Apr 7, 2025
@pingzhili pingzhili changed the title [BUG] [BUG] Transformers model padding should be to "longest" Apr 7, 2025
@NathanHB
Copy link
Member

Hey ! Being fixed in #669

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants