-
Notifications
You must be signed in to change notification settings - Fork 228
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
Add batch evaluation support when batch_size > 1 #36
Open
infinitylogesh
wants to merge
13
commits into
bigcode-project:main
Choose a base branch
from
infinitylogesh:multi_batch
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
ae085e2
adding batching support
infinitylogesh e3798a5
moving num_return_sequences argument to arguments.py
infinitylogesh 138bde6
handling attention_mask for batch_size 1
infinitylogesh abeaabf
added multi_batch test and error handling
infinitylogesh 3e173e7
Updated docs
infinitylogesh 9090dad
Fix task id repeation lm_eval/utils.py
infinitylogesh af59009
add trust_remote_code and use_auth_token args
loubnabnl 76da6ed
update readme with trust_remote_code arg
loubnabnl b0f6785
change format of boolean arguments
loubnabnl 97ab344
change how bool args are called and fix typos
loubnabnl 09ca56f
device specific seed handling
infinitylogesh 8cb26ae
Remove superfluous comment
Muennighoff 8f9fae1
Merge branch 'main' into multi_batch
Muennighoff File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need this argument +
n_samples
- Aren't they kind of the same?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
n_samples
argument is to capture the overall number of samples to be generated for a prompt/task. While thenum_return_sequences
is for the number of samples to be generated in one single pass.There can be scenarios when
n_samples
>num_return_sequences
, like when then_samples
does not fit in the memory. In that case, the task/prompt is repeated ( multiple passes) to meet the overalln_samples
( as implemented here)For example, to calculate pass@100 I might need the
n_samples
to be 100 and due to memory limit I can havenum_return_sequences
to be 10, so the task is repeated 10 times to meet then_samples
count of 100.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But shouldn't the batch_size be responsible for handling the memory limitations? Can't we use it to infer
num_return_sequences
?IIURC it means that n_samples=16 batch_size=16 num_return_sequences=1 is the same as n_samples=16 batch_size=1 num_return_sequences=16, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree that both the settings are same for the case that you have shown. But I am not quite getting how we can infer
num_return_sequences
from batch_size. Can you please explain ? ThanksThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IIURC batch_size is used to pick batch_size new items, so I think sth like: