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

Nanotron greedy_until() fix #344

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

vsabolcec
Copy link

Evaluating a nanotron checkpoint on a benchmark with a GreedyUntil request crashes with the following error message:

0: [rank0]:   File "/usr/local/lib/python3.10/dist-packages/lighteval/models/nanotron_model.py", line 1137, in greedy_until
0: [rank0]:     max_gen = max(item[1].generation_size for item in dataset)
0: [rank0]:   File "/usr/local/lib/python3.10/dist-packages/lighteval/models/nanotron_model.py", line 1137, in <genexpr>
0: [rank0]:     max_gen = max(item[1].generation_size for item in dataset)
0: [rank0]: TypeError: 'GreedyUntilRequest' object is not subscriptable

There is a bug in max_gen = max(item[1].generation_size for item in dataset) because dataset is GenerativeTaskDatasetNanotron whose __iter__() yields items directly without the index. This PR works around the issue in greedy_until() for the nanotron model.

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

Successfully merging this pull request may close these issues.

2 participants