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

fix extra_match low if batch_size > 1 #2595

Merged
merged 3 commits into from
Dec 25, 2024
Merged

Conversation

sywangyi
Copy link
Contributor

No description provided.

Signed-off-by: Wang, Yi A <yi.a.wang@intel.com>
@sywangyi
Copy link
Contributor Author

lm_eval --model local-completions --tasks gsm8k --batch_size 1 --seed 10 --limit 20 --model_args model=meta-llama/Llama-3.1-8B-Instruct,base_url=http://127.0.0.1:80/v1/completions,num_concurrent=4,tokenized_requests=False,do_sample=False,seed=10

Tasks Version Filter n-shot Metric Value Stderr
gsm8k 3 flexible-extract 5 exact_match 0.7 ± 0.1051
strict-match 5 exact_match 0.6 ± 0.1124

before fix :
lm_eval --model local-completions --tasks gsm8k --batch_size 2 --seed 10 --limit 20 --model_args model=meta-llama/Llama-3.1-8B-Instruct,base_url=http://127.0.0.1:80/v1/completions,num_concurrent=4,tokenized_requests=False,do_sample=False,seed=10

Tasks Version Filter n-shot Metric Value Stderr
gsm8k 3 flexible-extract 5 exact_match 0.30 ± 0.1051
strict-match 5 exact_match 0.25 ± 0.0993
batch_size =2 and exact_match drop

after fix:
lm_eval --model local-completions --tasks gsm8k --batch_size 2 --seed 10 --limit 20 --model_args model=meta-llama/Llama-3.1-8B-Instruct,base_url=http://127.0.0.1:80/v1/completions,num_concurrent=4,tokenized_requests=False,do_sample=False,seed=10

Tasks Version Filter n-shot Metric Value Stderr
gsm8k 3 flexible-extract 5 exact_match 0.7 ± 0.1051
strict-match 5 exact_match 0.6 ± 0.1124

using same tgi server.

@sywangyi
Copy link
Contributor Author

https://platform.openai.com/docs/api-reference/completions/object. see this. there's a 'index' in "choices" array to indicate the index in batch

@baberabb
Copy link
Contributor

Was the bug that the choices were appearing out out order?

@sywangyi
Copy link
Contributor Author

sywangyi commented Dec 25, 2024

Was the bug that the choices were appearing out out order?

yes, the array items in "choices" do not have "index" in ascend order, the "index" is out of order.

@baberabb
Copy link
Contributor

Thanks! Nice catch!

@baberabb baberabb merged commit 59f9ad4 into EleutherAI:main Dec 25, 2024
6 of 7 checks passed
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