Repository navigation
Conversation
The bbh_fewshot and bbh_cot_fewshot templates use "Q" as a stop sequence,
meant as the boundary before the next "Q: ..." question. Generation is cut
at the first occurrence of any stop string, so every capital Q ends it:
- reasoning_about_colored_objects has options (A) to (R), and 7 of its 250
test answers are "(Q)". Those answers are truncated to "(" before any
filter runs, so no model can score them.
- Chains of thought that mention a word starting with Q before the answer
(e.g. "Qarabağ FK" in formal_fallacies) are cut short.
bbh_zeroshot and bbh_cot_zeroshot already use "Q:" (the latter since
EleutherAI#1356). Use it in the two fewshot templates as well. Scores change, so bump
the task templates (fewshot 2.0 -> 3.0, cot_fewshot 4.0 -> 5.0) and the
groups that aggregate them (bbh_fewshot, bbh_cot_fewshot and bbh,
3.0 -> 4.0), and add a changelog entry.
Replaying the code-davinci-002 outputs published with BBH through the
harness's own stop handling, filters and metric: bbh_cot_fewshot goes from
4803 to 4812 correct out of 6507 aligned rows, bbh_fewshot from 3401 to
3407, and none of those outputs goes from correct to incorrect. A
generation that continues on the same line with a capitalised Q word right
after the answer (e.g. "(A)Quite") used to be cut at the Q and no longer
is; none of the published outputs does that.
Author
|
Gentle ping on this one: the CI workflows are still waiting for a maintainer's approval, so the tests have not run yet. Happy to make any changes if needed. |
This branch has not been deployed
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What
bbh_fewshotandbbh_cot_fewshotlist a bare"Q"as a stop sequence (lm_eval/tasks/bbh/fewshot/_fewshot_template_yaml:14,lm_eval/tasks/bbh/cot_fewshot/_cot_fewshot_template_yaml:16). It is meant as the boundary before the nextQ: ...question, but stop strings match anywhere, so every generation ends at its first capital Q:reasoning_about_colored_objectshas options (A) to (R), and 7 of its 250 test targets are(Q). Those generations are cut to(before any filter runs, so no model can score them (7 of the 6511 rows in each group).formal_fallacies) are cut before "the answer is".bbh_zeroshotandbbh_cot_zeroshotalready use"Q:"(the latter since #1356). This PR does the same in the two fewshot templates;"Q:"still stops at the next question.Measured effect
I replayed the
code-davinci-002outputs published with BBH (suzgunmirac/BIG-Bench-Hard @ 9ee07bd,code-davinci-002-outputs/) through the harness's ownpostprocess_generated_text, the task filters andprocess_results. 6507 of the 6511 rows align withSaylorTwift/bbhby question text and target."Q"(main)"Q:"bbh_cot_fewshotreasoning_about_colored_objects, 2formal_fallacies)bbh_fewshotreasoning_about_colored_objects)The "now incorrect" column is about these published outputs only. A generation that continues on the same line with a capitalised Q word right after the answer (e.g.
(A)Quite) used to be cut at the Q and no longer is; none of these outputs does that, and I have not measured how often other models do.Versioning
Scores change, so the task templates are bumped (
bbh_fewshot_*2.0 → 3.0,bbh_cot_fewshot_*4.0 → 5.0), and so are the groups that aggregate them, since their scores change too (bbh_fewshot,bbh_cot_fewshotandbbh, 3.0 → 4.0;docs/new_task_guide.mdversions both tasks and groups).flan_held_outalso includes both groups but has no version field. Changelog entry inlm_eval/tasks/bbh/README.md.Tests
tests/test_bbh_stop_sequences.pyloads theuntillist of the four BBH templates and checks thatpostprocess_generated_textkeeps(Q)and... So the answer is (Q)., and still stops at\nQ: ...(a single newline, so it is the"Q:"stop that fires). 4 of its 12 cases fail on main (the(Q)cases for fewshot and cot_fewshot); all 12 pass here, as dotests/test_bbh_filters.py. The "Tasks Modified" job only selects changed files ending in.yaml, so it will not pick these extension-less templates; the unit test is what covers them.Related: #1086 (verify that stop sequences don't cut off valid answers).
Found and measured with AI coding agents working through a review process I set up. I went through the diff and reran the numbers and tests myself.